Repository navigation
Conversation
…labs/expensify-app-fork into Guccio163/header/centralPane
…WithBackButtonAndTitle Pulls the part2 changes into this branch. HeaderCentralPane keeps its own isHeadline prop (its 9 call sites still pass it) but now applies textHeadlineH2 via titleStyles internally instead of forwarding isHeadline to HeaderTitle, since the primitive no longer supports it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…-fork into Guccio163/header/centralPane
|
@gijoe0295 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
@MelvinBot Review this PR following these items:
|
|
🤖 Web test steps verification results: I found no accessibility regressions.
Not accessibility, but it contradicts "no visual change": the old header wrapped children in a |
|
Bug: No Help on Distance rates page Dev
Stag
Melvin flagged this too. |
gijoe0295
left a comment
There was a problem hiding this comment.
Some test cleanups:
- Several tests still mock
@components/HeaderWithBackButton, so those mocks no longer do anything: AgentsPageTest, CopilotPageTest,TroubleshootPageTest, PolicyAccountingPageAutoStartFlowTest and PolicyAccountingPageQBOTokenExpiryTest. - The
iconprop in this mock is not needed
…ralPane # Conflicts: # src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx # src/pages/workspace/tags/WorkspaceTagsPage.tsx # src/pages/workspace/vendors/WorkspaceVendorsPage.tsx
…-fork into Guccio163/header/centralPane
|
Hi @shawnborton @dannymcclain @dubielzyk-expensify , before moving on to the follow-up callsites I created a real-life scenario to show where the new design stands:
In this scenario I think the two icons look better further apart, but when Download is the only item, it doesn't need to space itself from the right edge. We can use this freedom to decide when we need this padding (keep separating custom actions from trailing items) and when it's redundant. Children shouldn't get right padding when they have nothing to separate from. If they end up too close to the border, they probably need a bigger padding of their own, just like the icons have now. Also @dubielzyk-expensify I think that the three-dot icon is narrowed by design. Nevertheless, design choices can change 😄 I'm happy to adjust it based on your feedback! To sum up, I'd love your input on the points above and to consult you on the follow-ups to make sure that the non-obvious callsites are handled correctly. Should I tag all of you, or only one of you? |
|
Feel free to tag all of us!
From your examples, C felt a little nicer to me? |
|
Agree C feels the best as well.
Do we know why? I don't see why we'd have 40x40 on other icons but one icon gets 20x40 tap target |
That's great news, because the C scenario is the clearer one! I went back through Header style evolution and it looks like the extra padding between custom children and those passed through options (three-dot, search, help etc.) is somewhat an oversight: what once was a 20px right padding became separate 8px gap inside and 12px padding right, through a couple of changes across 5 years. Since we agreed on 12px after-title padding, I propose we ditch the 8px gap and continue with a clearer design:
This way, we can apply extra padding just where it is needed because of the custom children’s design and dimensions. I'm really curious WDYT about this, I personally always figured why did we end splitting those two after-title groups of children 🤔
This change was introduced by @daledah's b75d284 commit fixing three-dot and RBR spacing in this PR: I'm not sure whether we should tinker with hitSlop, because it could mess with neighbours' pressability in the overlapping area - f.ex. Close icon button seen below 👇. Nevertheless we can bring three-dot's width back to 40px just for the Header if you prefer. It would look like this then: |
|
Yes, let's definitely fix that three dots icon in the header! |
|
Great thank you! I'll go forward with the simplified design, bring three-dot back to 40px width and will tag you all in the follow-up PRs! |
…-fork into Guccio163/header/centralPane # Conflicts: # src/pages/workspace/accounting/PolicyAccountingPage.tsx # src/pages/workspace/mcp/WorkspaceMCPPage.tsx # src/pages/workspace/merge/MergeConnectionsPageBase.tsx # src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx # tests/unit/PolicyAccountingPageAutoStartFlowTest.tsx
|
Hi, below I'm attaching screehshots of some of the migrated pages in this PR: Most of the affected pages have 1 or 2 custom buttons that align with trailing icon on wide screen and position below in narrow screens. Most of them also have Concierge icon: Wide screen
Narrow screen (unaffected)
With extra search icon
OtherWe have also screens that don't have Concierge icon, but custom children aligned right, including requested three-dot menu icon:
WDYT? |
|
@gijoe0295 this one (and the rest of the sub-issues) will be ready to pick up once designers sign off on the designs. Will you be available to help me push them forward over next week? |
…chant rule Reset link
|
Also just to confirm, the bottom parts of the screenshots above are like... Claude generated or something? They don't look like our UI so just confirming. |
Yes. Sure |
Custom buttons rendered inside the Header row now get 8px right padding (pr2) after the whole group, only when they are not displayed in a separate line under the Header. Drop redundant flexRow/w100 wrappers that collapsed the title on wide layouts.
|
@shawnborton The PR is ready, below I drop screenshots of the typical migrated callsites (for which the test-steps are written)
Ah, busted! Yes, those are from generated views to easily navigate between different Header compositions, they are exact copies of the real callsites 🪞 |
…-fork into Guccio163/header/centralPane
|
@gijoe0295 ready for review ✅ |
|
Looking good to me 👍 |
|
@gijoe0295 how is review going? |
|
On my list today. Catching up the context. |






































Explanation of Change
Central Pane batch of the
HeaderWithBackButton→ composedHeadermigration. Adds aHeaderCentralPanepreset (src/components/Header/composed/HeaderCentralPane.tsx) for Split Navigator root screens (Workspace/Settings/Domain): headline title, a back button on narrow layout only, and the help button, with an optional child slot (e.g.SearchButtonon the Settings pages that need it).32 root screens (all top-level Settings pages, the Domain pages, and every
WorkspacePageWithSections-based workspace page) now useHeaderCentralPane. 31 non-root screens (workspace/rules/*,WalletStatementPage,ValidateCodeActionContent) keep theHeaderWithBackButtonAndTitlepreset from an earlier batch.DynamicTripDetailsPageandVictoryChartExpandModalcomposeHeaderprimitives directly since neither fits a preset. The now caller-lessHeaderWithBackButtonComposed/HeaderWithBackButton.tsxdrop-in is deleted. No behavior or visual change intended.Fixed Issues
$ #102546
PROPOSAL:
Tests
Use a brand-new account (created with the one-click "Join"), finish onboarding (the help icon in the Header only appears after onboarding is completed), and create a workspace (Workspaces tab > New workspace). In Workspaces > workspace > More features enable Tags, Taxes, Rules, Distance rates and Per diem (the workspace is free to upgrade to the Control plan: Rules > Add rule > Upgrade).
Check every scenario on wide layout (desktop web) and narrow layout (mWeb / native, or a desktop window narrower than 480px). Wherever a step says "same as main", compare with
mainside by side.How a Central Pane header looks
Left to right:
[back button – narrow layout only][title][custom buttons, if any][search icon – only where listed][help icon].main.main.main.mainit was 16px). It is only visible when the title is long enough to be cut off.1. Account pages with search and help icons
Open the Account tab and then, one by one: Profile, Subscription, Wallet, Preferences, Copilot, Security, Help, About, Troubleshoot, Save the world.
main.main.main).2. Workspace pages with only the help icon
Open Workspaces > workspace > Reports, Connections, More features.
main.main.3. Buttons with text in the header (wide layout)
On each page the buttons are on the same row as the title, to its right, and there are 8px between the last button and the help icon. The title is fully visible. Same as
main.4. The same pages in narrow layout
The buttons are not in the header. They are in a row under it (full width for a single button, side by side for two), with the page gutter on the left and right. The header shows only the back button, title, search icon (Account pages) and help icon. Same as
main.On Rooms, Create is a full-width button above the "Find room" field. Same as
main.5. Landscape on a phone
Rotate a phone or emulator to landscape and open Workspaces > workspace > Members and Taxes.
main.6. Selection mode
main.main.7. Expense defaults rule
Go to Workspaces > workspace > Rules > Add rule > Apply expense defaults > Merchant. The header (in the right-hand panel) shows the back button and the title. In "If any expense matches" tap Merchant, type "Starbucks" and Save. A blue Reset link appears at the right edge of the panel header. It has 8px of padding around the text, so its tap area is the same as on
main.8. Header with only a back button
Go to Account > Profile > Contact methods > New contact method. In the "Validate your account" panel the header shows only the back button and the title. Same as
main.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-profile-searchbutton-header.mp4
android-categories-nochild-header.mp4
Android: mWeb Chrome
iOS: Native
ios-profile-searchbutton-header.mp4
ios-categories-nochild-header.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web-profile-searchbutton-header.mp4
web-categories-nochild-header.mp4