Skip to content

Conversation

@t0maboro
Copy link
Contributor

@t0maboro t0maboro commented Jul 21, 2025

Description

This PR adds an option to update showSecondaryToggleButton prop dynamically. As for now, it requires some layout update to trigger refresh of the navbar to which this button is attached. After some investigation, we found that we can forcefully update that navbar by hiding it and opening again. With an assumption that it's done in a single transaction, no flicker/lag is observed.

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

Changes

  • Added native flag for signaling that secondary screen navbar update is needed.
  • Added logic for triggering updates for secondary navbar.

Screenshots / GIFs

Simulator.Screen.Recording.-.iPad.Pro.13-inch.M4.-.2025-07-21.at.13.05.11.mp4

Test code and steps to reproduce

Updated SplitViewBaseApp

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@t0maboro t0maboro requested a review from kkafar July 21, 2025 11:05
@t0maboro t0maboro self-assigned this Jul 21, 2025
Base automatically changed from @t0ms0n00/toggle-inspector to main July 21, 2025 13:53
@t0maboro t0maboro force-pushed the @t0maboro/secondary-only-button-updates branch from 272ff38 to 412104a Compare July 21, 2025 16:39
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. Thank you!

@t0maboro t0maboro force-pushed the @t0maboro/secondary-only-button-updates branch from 412104a to 61d9ce9 Compare July 22, 2025 09:49
@t0maboro t0maboro merged commit 7fb44e0 into main Jul 22, 2025
6 checks passed
@t0maboro t0maboro deleted the @t0maboro/secondary-only-button-updates branch July 22, 2025 10:13
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.

3 participants