fix(iOS, Stack v5): Refactor header coordination to hide header when no headerConfig is provided - #4535
Open
kmichalikk wants to merge 1 commit into
Open
Conversation
kmichalikk
marked this pull request as draft
August 21, 2026 08:35
kmichalikk
force-pushed
the
@kmichalikk/stack-v5-hide-header-when-no-config
branch
from
August 21, 2026 13:04
44a02fe to
8cebc2f
Compare
kmichalikk
marked this pull request as ready for review
August 21, 2026 13:41
kmichalikk
requested review from
kligarski and
t0maboro
and
a balanced review from Copilot
and removed request for
kligarski
August 21, 2026 13:41
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors iOS Stack v5 header coordination so screens without a header configuration hide the native navigation bar, matching v4 behavior.
Changes:
- Wires header coordinators during child mounting.
- Updates navigation-bar visibility during screen appearance and configuration changes.
- Clears header coordinator resources when configurations unmount.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
ios/stack/screen/RNSStackScreenHeaderCoordinator.mm |
Centralizes navigation-bar visibility handling. |
ios/stack/screen/RNSStackScreenHeaderCoordinator.h |
Exposes the visibility update method. |
ios/stack/screen/RNSStackScreenController.mm |
Updates visibility before screen appearance. |
ios/stack/screen/RNSStackScreenComponentView.mm |
Wires and clears header coordination during mounting. |
ios/stack/header/RNSStackHeaderConfigComponentView.mm |
Uses the coordinator assigned by the parent screen. |
ios/stack/header/RNSStackHeaderConfigComponentView.h |
Adds the weak coordinator property. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/software-mansion/react-native-screens-labs/issues/1699
Description
Currently on v5 when no headerConfig is provided native header is rendered empty, with back button present. Additionally, the header is set to large variant by default, and that looks bad. This PR hides the header entirely when no config is provided, matching the behavior in v4.
Changes
viewWillAppearfiresscreen.viewWillAppearthat hides the header if no config provider is presentBefore & after - visual documentation
n/a
Test plan
Use simple navigation SFT, hide the header on one screen and navigate; use test-stack-header-subviews-ios, hide / show the header via prop updates. Verify that it hides.
Checklist