Skip to content

Stop syncing Modal system bars from Activity on Android#56916

Open
zoontek wants to merge 1 commit into
facebook:mainfrom
zoontek:remove-modal-system-bars-sync
Open

Stop syncing Modal system bars from Activity on Android#56916
zoontek wants to merge 1 commit into
facebook:mainfrom
zoontek:remove-modal-system-bars-sync

Conversation

@zoontek
Copy link
Copy Markdown
Contributor

@zoontek zoontek commented May 21, 2026

Summary:

This PR removes updateSystemAppearance() and syncSystemBarsVisibility() along with their now-unused imports.

On Android, every time a <Modal> is shown, ReactModalHostView.updateSystemAppearance() reaches into the host activity's WindowInsetsController and copies its status bar / navigation bar style and visibility onto the dialog window. This was the only way to keep modal windows visually consistent with the activity, since native modules like StatusBarModule only operated on the activity window.

This is now obsolete:

The navigation bar half of updateSystemAppearance() is owned by third-party libraries (expo-navigation-bar, @zoontek/react-native-navigation-bar). Their next releases will implement ExtraWindowEventListener the same way StatusBarModule does, syncing nav bar style and visibility to modal windows from the module that owns them.

At that point updateSystemAppearance() is fully redundant: every concern it covered is handled by the module responsible for that configuration.

Changelog:

[ANDROID] [REMOVED] - Remove manual system bar sync from ReactModalHostView; modal windows are now configured by modules implementing ExtraWindowEventListener (e.g. StatusBarModule).

Test Plan:

  • Open a <Modal> on Android and confirm the status bar style matches the host activity (light / dark content), now driven by StatusBarModule's ExtraWindowEventListener.
  • Change <StatusBar barStyle="light-content" /> / "dark-content" while a modal is open and confirm the change applies to the dialog window.
  • Toggle <StatusBar hidden /> before and during a modal presentation and confirm the dialog stays in sync with the activity.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 21, 2026
@facebook-github-tools facebook-github-tools Bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels May 21, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 21, 2026

@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D106013785.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant