Repository navigation
[TabBar] The “There’s a report awaiting action” UI is pushing other content out, leaving blank space displayed #89893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mountiny
merged 24 commits into
Expensify:main
from
software-mansion-labs:borys3kk-fix-debug-mode
May 25, 2026
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
21693ae
potential fix
borys3kk a7a184f
adjust width
borys3kk 241b2e2
fix: debugTabView wrong positioning, not overlapped by rhp backdrop
borys3kk 761546d
merge main
borys3kk 4404392
fix missing declaration of SCREENS_WITH_TAB_BAR
borys3kk c77ea96
remove unused eslint directive
borys3kk 6f26a56
fix review comments (conditionally render DebugTabView, fix animation…
borys3kk 2849006
merge main
borys3kk 946fa08
merge main again
borys3kk 799e197
fix lint
borys3kk 5e54bc6
Merge branch 'main' of github.com:Expensify/App into borys3kk-fix-deb…
borys3kk 8b49f29
fix debug mode bugs after changes
borys3kk bbddd4a
merge main
borys3kk 9585a71
fix lint
borys3kk 0c753ac
fix display condition
borys3kk 26d12f1
fix width on workspaces list
borys3kk 50a1ed3
fix failing tests
borys3kk d1bf14f
move container styles to styles
borys3kk a525f98
fix potential regression
borys3kk ec63a9b
melvin review comments
borys3kk 9b926f2
fix no style for narrow layout
borys3kk 631ed8b
fix failing tests
borys3kk de41d53
Merge branch 'main' of github.com:Expensify/App into borys3kk-fix-deb…
borys3kk 96e8998
merge main
borys3kk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
14 changes: 14 additions & 0 deletions
14
src/components/Navigation/NavigationTabBar/ROUTE_TO_NAVIGATION_TAB.ts
|
borys3kk marked this conversation as resolved.
Resolved
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import type {ValueOf} from 'type-fest'; | ||
| import NAVIGATORS from '@src/NAVIGATORS'; | ||
| import SCREENS from '@src/SCREENS'; | ||
| import NAVIGATION_TABS from './NAVIGATION_TABS'; | ||
|
|
||
| const ROUTE_TO_NAVIGATION_TAB: Record<string, ValueOf<typeof NAVIGATION_TABS>> = { | ||
| [SCREENS.HOME]: NAVIGATION_TABS.HOME, | ||
| [NAVIGATORS.REPORTS_SPLIT_NAVIGATOR]: NAVIGATION_TABS.INBOX, | ||
| [NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR]: NAVIGATION_TABS.SEARCH, | ||
| [NAVIGATORS.SETTINGS_SPLIT_NAVIGATOR]: NAVIGATION_TABS.SETTINGS, | ||
| [NAVIGATORS.WORKSPACE_NAVIGATOR]: NAVIGATION_TABS.WORKSPACES, | ||
| }; | ||
|
|
||
| export default ROUTE_TO_NAVIGATION_TAB; |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import type {NavigationState, PartialState} from '@react-navigation/native'; | ||
| import NAVIGATORS from '@src/NAVIGATORS'; | ||
| import SCREENS from '@src/SCREENS'; | ||
| import getFocusedLeafScreenName from './getFocusedLeafScreenName'; | ||
|
|
||
| /** | ||
| * Leaf screen names that represent the root/landing view of each tab. | ||
| * Used to decide tab-bar visibility. | ||
| */ | ||
| const SCREENS_WITH_TAB_BAR = new Set<string>([ | ||
| SCREENS.HOME, | ||
| SCREENS.INBOX, | ||
| SCREENS.SEARCH.ROOT, | ||
| SCREENS.SETTINGS.ROOT, | ||
| SCREENS.WORKSPACES_LIST, | ||
| SCREENS.WORKSPACE.INITIAL, | ||
| SCREENS.DOMAIN.INITIAL, | ||
| ]); | ||
|
|
||
| // Count as tab-root when they surface as the resolved leaf. | ||
| const TAB_WRAPPER_NAVIGATORS = new Set<string>([ | ||
| NAVIGATORS.REPORTS_SPLIT_NAVIGATOR, | ||
| NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR, | ||
| NAVIGATORS.SETTINGS_SPLIT_NAVIGATOR, | ||
| NAVIGATORS.WORKSPACE_NAVIGATOR, | ||
| ]); | ||
|
|
||
| const isAtTabRootLevel = (name: string | undefined): boolean => !name || SCREENS_WITH_TAB_BAR.has(name) || TAB_WRAPPER_NAVIGATORS.has(name); | ||
|
|
||
| // Deepest `screen` in a `{screen, params}` chain (e.g. WORKSPACE_NAV → WORKSPACE_SPLIT_NAV → WORKSPACE.INITIAL). | ||
| const getPushTargetLeaf = (params: unknown): string | undefined => { | ||
| const p = params as {screen?: unknown; params?: unknown} | undefined; | ||
| if (typeof p?.screen !== 'string') { | ||
| return undefined; | ||
| } | ||
| return getPushTargetLeaf(p.params) ?? p.screen; | ||
| }; | ||
|
|
||
| type TabRouteLike = { | ||
| state?: NavigationState | PartialState<NavigationState>; | ||
| params?: unknown; | ||
| }; | ||
|
|
||
| /** | ||
| * Returns true when the active tab route resolves to a tab's root view. | ||
| * Trusts the focused leaf as the source of truth. Falls back to the push target only when the | ||
| * navigator state hasn't hydrated yet (Android cold start), so the tab bar doesn't flash on the | ||
| * push target during the transition. Tab-level params can be stale after within-tab back | ||
| * navigation, so they must not override an already-hydrated focused leaf. | ||
| */ | ||
| function isTabRouteAtRoot(route: TabRouteLike | undefined): boolean { | ||
| const focusedLeaf = getFocusedLeafScreenName(route?.state); | ||
| return isAtTabRootLevel(focusedLeaf ?? getPushTargetLeaf(route?.params)); | ||
| } | ||
|
|
||
| export default isTabRouteAtRoot; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from #99976 BugZero checklist:
This PR missing handle the wide-layout debug banner overlaps and partially covers the last row of the Workspaces list. and renders at sidebar width on Domains. Moving the banner out of flow fixed the blank-space bug here, but no space-reservation contract was added for full-width tab roots, so any account-level indicator now paints over list content. The fix in #100766 reserves the banner height in the wide-layout pages and corrects the Domains geometry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOMAINS_LISTdid not exist when this PR merged. #90204 added that full-width page and never updated the debug whitelist