Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const SCREENS_WITH_TAB_BAR = new Set<string>([
SCREENS.DOMAIN.INITIAL,
]);

const isAtTabRootLevel = (name: string | undefined): boolean => !name || SCREENS_WITH_TAB_BAR.has(name) || TAB_WRAPPER_NAVIGATORS.has(name);
const isAtTabRootLevel = (name: string | undefined): boolean => !!name && (SCREENS_WITH_TAB_BAR.has(name) || TAB_WRAPPER_NAVIGATORS.has(name));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Treat missing leaf route as tab-root

Changing isAtTabRootLevel() to require a truthy name makes isAtRoot false whenever the focused leaf cannot be resolved yet, which is common for the Home tab (activeRoute.state is undefined because Home is not a nested navigator) and during initial tab-state hydration. In those cases shouldHide becomes true on narrow layouts, so the bottom tab bar stays hidden even on root screens where it should remain visible. This regresses core mobile navigation visibility beyond the sign-in flow.

Useful? React with 👍 / 👎.


// Deepest `screen` in a `{screen, params}` chain (e.g. WORKSPACE_NAV → WORKSPACE_SPLIT_NAV → WORKSPACE.INITIAL).
const getPushTargetLeaf = (params: unknown): string | undefined => {
Expand Down
Loading