Skip to content

Conversation

@kmichalikk
Copy link
Contributor

@kmichalikk kmichalikk commented Jan 7, 2026

Description

Closes https://github.com/software-mansion/react-native-screens-labs/issues/355

Changes

This PR removes the react-native-edge-to-edge dependency form Paper and Fabric example applications in favor of core RN API. For android, the transparent 3-button navigation bar is enabled to match the removed package behavior.

setNavigationBarContrastEnforced(false) is called in onAttachedToWindow() for each app's Activity so the navigation bar looks like this (prior to the PR):

image

instead of like this (the default without react-native-edge-to-edge):

image

Test plan

Run BottomTabsTest, verify that nothing changed in terms of edge-to-edge. Turn on 3-button navigation in Android setttings & verify that its view is transparent / matches the color of tab bar.

@kmichalikk kmichalikk self-assigned this Jan 7, 2026
@kmichalikk kmichalikk changed the title chore: Remove react-native-edge-to-edge chore: Remove react-native-edge-to-edge from example apps Jan 7, 2026
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just please check that other example test screens work correctly.

Copy link
Contributor

@t0maboro t0maboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we can remove
# This property is supported for RN >= 0.81.
# For RN < 0.81, react-native-edge-to-edge package is necessary.

from Example/android/gradle.properties either

  1. Test2949 is using SystemBars from react-native-edge-to-edge and it's now crashing with
TurboModuleRegistry.getEnforcing(...): 'RNEdgeToEdge' could not be found. 

@kmichalikk
Copy link
Contributor Author

@t0maboro

  1. I intentionally left it here because old Example can be used with 0.80
  2. My bad, the test needs to be removed then, because its purpose was to test the behavior with edge-to-edge

@kmichalikk
Copy link
Contributor Author

kmichalikk commented Jan 12, 2026

ad 2. The test was created because screens were hardcoding some values for statusBar which would trigger overwriting system defaults when going back from another screen. The issue was fixed and to show the problem react-native-edge-to-edge API was used in order to change the color/translucency. Since we remove the library, the API is not available. We could rewrite the test to use core APIs, or, remove it as I did here. FWIW, the issue was orthogonal to the lib we remove. What would be more correct, considering https://github.com/software-mansion/react-native-screens-labs/pull/759 ?

cc @kkafar

@t0maboro
Copy link
Contributor

ad 2. The test was created because screens were hardcoding some values for statusBar which would trigger overwriting system defaults when going back from another screen. The issue was fixed and to show the problem react-native-edge-to-edge API was used in order to change the color/translucency. Since we remove the library, the API is not available. We could rewrite the test to use core APIs, or, remove it as I did here. FWIW, the issue was orthogonal to the lib we remove. What would be more correct, considering software-mansion/react-native-screens-labs#759 ?

cc @kkafar

Thanks for the clarification. If only StatusBar is important for our case, I'd check if using the core API, we could achieve the same effect, e.g. https://reactnative.dev/docs/statusbar#barstyle . If both system bars are necessary, tbh I don't have a good recommendation as for now. If having the navigation bar in the TC is crucial and there's any reason to merge this PR quickly, I'm okay with temporarily disabling the example to unblock, but it needs to be resolved in the follow-up PR in the near future. Please link the issue ticket then.

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. I have few questions for code changes I do not understand. Please answer them.

I'll test the runtime once we're green on the code part.

@kkafar
Copy link
Member

kkafar commented Jan 12, 2026

Regarding the Test2949 - we're no longer testing our API there. While it in some sense tests our integration with the react-native-edge-to-edge package I'm more in favour of dropping it.

@kmichalikk kmichalikk requested a review from kkafar January 13, 2026 16:55
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kmichalikk kmichalikk merged commit ed24576 into main Jan 14, 2026
7 checks passed
@kmichalikk kmichalikk deleted the @kmichalikk/react-native-edge-to-edge-remove branch January 14, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants