Repository navigation
[No QA] Add a collapsing flat navigation bar - #102023
shawnborton wants to merge 56 commits into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… to the top bar Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts: # src/components/AccountSwitcher.tsx # src/pages/Search/SearchPageWide.tsx # src/pages/inbox/sidebar/InboxTabSelector.tsx # src/pages/inbox/sidebar/ProfileAvatarWithIndicator.tsx
…e Spend tabs Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ation Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…n rows Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts: # src/styles/variables.ts
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…youts Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dius Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: The diff is too large to include in this comment (65KB), so I've created a gist for you: 📋 View the translation diff here 📋 Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
…bill eligibility rule
Explanation of Change
This builds on the flat navigation bar and adds a collapsing left bar on wide layouts. It is opened as a separate pull request so that the other one keeps its own test build to compare against.
This replaces the 72px skinny left bar on web and desktop with a 220px flat navigation bar, and reworks the narrow layout's bottom bar to match.
Wide layout
Every destination is a full-width row with a horizontal icon and label. The Spend pages no longer render a second left nav — their searches move into the main nav as child rows, so there is one navigation surface instead of two.
The nav lists Home, Inbox, Expenses, Reports, Accounting, Saved, Insights (behind the
insightsPagebeta) and Workspaces, then an account row with your avatar and name. Reports, Accounting and Saved reveal their searches as child rows only while that group is the active destination. A collapsed group carries its children's combined count as a badge; expanding it drops that badge so the children's own counts do not double-report the same work.At the top sit the Expensify wordmark and a small green create button that opens the global create menu.
Narrow layout
The bottom bar is Home, Inbox, Expenses, Reports and More. The Spend tab row shows only the group you are in — Reports shows its four searches, Accounting its five — and hides entirely for Expenses, which is a group of one. The page title names the group, so it holds still while you tab within it.
More opens a page of navigation rows: Accounting, Saved, Insights and Workspaces. Each row returns you to where you last were inside that destination rather than to its first page, and each of those pages gets a back arrow to the More list. Tapping More while you are inside one of its destinations climbs back to the list.
Collapsing the bar
A toggle in the bar's header narrows it from 220px to a 60px icon rail, and the central pane follows. Every row keeps its normal padding while collapsed, so the icons stay on the same column and none of them move as the bar animates; the labels, badges, group children and hover menus simply go away.
Hovering a collapsed bar peeks it back open over the content rather than pushing the page around, and moving the pointer away closes it again.
The collapsed state reuses the store the Spend sidebar already had,
SearchSidebarCollapseStore. That sidebar is the surface this navigation replaced, so sharing one persisted flag and one peek state avoids two that can disagree. The flat navigation bar adds its own width hooks alongside the existing ones.Three places assumed the bar was a fixed 220px and now read its live width: the navigator's own container, which is what slides the central pane;
DebugTabView's absolute positioning; andSearchRowSkeleton, which right-aligns against the left pane.Shared changes
navigationRowSelected(product-300) andnavigationRowHovered(product-200). They apply to the flat nav, the Inbox LHN, and the Workspace, Domain and Account editor menus. The editor menus opt in through a newshouldUseNavigationRowColorsprop onMenuItem, so popover and context menus that also usefocusedkeep their current colors.getSplitNavigatorSidebarWidthresolves the width from the navigator's sidebar route so the sidebar and the central pane offset always agree.Two fixes that reach beyond the new navigation
WORKSPACES_TAB_SETdid not listSCREENS.DOMAINS_LIST, so the Workspaces tab could not restore onto its Domains tab and always fell back to Workspaces. This is reproducible onmaintoday: open Workspaces, switch to Domains, leave the tab, and come back.SearchRowSkeletonpositioned its trailing elements against a left pane that included the Spend sidebar this PR removes, leaving a gap on the right of every skeleton row.Fixed Issues
$
PROPOSAL:
Tests
Wide layout
Narrow layout
Collapsing the bar
Failure and edge scenarios
insightsPagebeta. Verify no Insights row appears in either place, and that Account is still reachable from the top right.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
🤖 Generated with Claude Code