Skip to content

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Jan 20, 2025

Description

Important context

For all apps targeting Android SDK 35 the edge-to-edge mode is enabled by default (it is effectively enforced, opting out takes some effort) and everything indicates that it will be enforced in future SDKs.

For SDKs below 35 the status / navigation bar APIs affected by this PR are deprecated or deprecated & disabled (see above links ☝🏻 ).

Currently minimal target sdk level for google app store is 34 (source). We can't really foresee when SDK level 35 will be required, however it can be clearly seen that edge-to-edge will be the promoted and supported way of designing UI on Android.

We want to get rid of these props for one more reason. These are Android-specific props and translucency is implemented by (not) consuming appropriate window insets, which leads to conflicts with other libs and we can't set right defaults, since it is not really possible to detect whether the app is in edge to edge or not leading to some buggy behaviour (initial content jump etc.).

Changes

  • Deprecate navigationBarColor
  • Deprecate navigationBarTranslucent
  • Deprecate statusBarColor
  • Deprecate statusBarTranslucent
  • Deprecate topInsetEnabled

Test code and steps to reproduce

No runtime changes.

Checklist

  • Ensured that CI passes

@kkafar kkafar marked this pull request as ready for review January 20, 2025 12:41
@kkafar kkafar merged commit b69ea04 into main Jan 20, 2025
4 of 5 checks passed
@kkafar kkafar deleted the @kkafar/deprecate-some-android-props branch January 20, 2025 13:37
kligarski added a commit that referenced this pull request Apr 9, 2025
…ry authors (#2851)

## Description

Small changes in docs.

## Changes

- add deprecation messages to navigation/status bar related props
deprecated in
#2638 in
`GUIDE_FOR_LIBRARY_AUTHORS.md`
- fix typo in `src/types.tsx`
- update information about `formSheet` in `GUIDE_FOR_LIBRARY_AUTHORS.md`
kkafar pushed a commit to react-navigation/react-navigation that referenced this pull request Apr 9, 2025
…rops (#12539)

**Motivation**
For all apps targeting Android SDK 35 the edge-to-edge mode is enabled
by default (it is effectively enforced, opting out takes some effort)
and everything indicates that it will be enforced in future SDKs.

For SDKs below 35 the status / navigation bar APIs affected by this PR
are deprecated or deprecated & disabled.

For details please see this PR:
software-mansion/react-native-screens#2638

`react-native-screens` deprecated `navigationBarColor`,
`navigationBarTranslucent`, `statusBarColor`, `statusBarTranslucent`
props. This PR makes them deprecated also in
`react-navigation/native-stack`.

`topInsetEnabled` was also deprecated. No changes connected with this
prop has been implemented yet.
kligarski added a commit that referenced this pull request May 9, 2025
…rops in native code (#2913)

## Description

Deprecate native props and methods related to status/navigation bars
that will be no longer relevant after edge-to-edge is enforced (they
were deprecated already in this PR:
#2638).

## Changes

- deprecate deprecate status/navigation bar edge to edge related props
in native code
- add EdgeToEdge detection utility
- prevent adding `ScreenWindowTraits`' `windowInsetsListener` to
`InsetsObserverProxy` if edge-to-edge is enabled

## Checklist

- [ ] Ensured that CI passes
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.

1 participant