[Experimental] Left-align all Spend table columns and headers#96781
[Experimental] Left-align all Spend table columns and headers#96781MelvinBot wants to merge 2 commits into
Conversation
Co-authored-by: Danny McClain <dannymcclain@users.noreply.github.com>
|
🚧 dannymcclain has triggered a test Expensify/App build. You can view the workflow run here. |
|
I looked into the checks — there's no code failure to fix here. 🎉 The only red check is PR Author Checklist / checklist, and it's failing for two expected reasons, not because of the code:
Neither is fixable by pushing code — the checklist just needs a human author to tick the boxes (or it can be safely ignored on an experimental preview PR). Everything that actually validates the change is green: ESLint, TypeScript, Bun tests, all 8 So no push was needed. If you want the Author Checklist to go green, tick the boxes in the PR description; otherwise it's fine to leave as-is for a preview PR. |
This comment has been minimized.
This comment has been minimized.
|
@MelvinBot the status badges inside the Status column are still centered. Can you investigate and make them left aligned? |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Co-authored-by: Danny McClain <dannymcclain@users.noreply.github.com>
|
Fixed and pushed. The status badges now left-align in the Status column. Why they were still centered: the previous change removed the center override from the column container, but the badge was centering itself. The shared Fix: |
|
Re-checked after the new commit ( The only red check is PR Author Checklist / checklist, which fails for expected, non-code reasons — the Author Checklist boxes aren't ticked and it can't verify engineering membership for the author ( Everything that validates the code is green — including TypeScript (the new So no push was needed. Tick the Author Checklist boxes if you want that check green; otherwise it's safe to ignore on a preview PR. |
|
🚧 dannymcclain 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! 🧪🧪
|
Explanation of Change
🧪 Experimental / preview PR requested by
dannymcclain— no linked issue.Left-aligns the text and the column headers for every column in the Spend (Search results) table. Previously some columns were right-aligned (the amount/total columns) and a few were center-aligned (icon/status/action columns), while the rest were left-aligned. This makes the whole table consistently left-aligned so the requester can preview that layout.
What changed:
src/styles/utils/index.ts→getReportTableColumnStyles()drives the per-column container alignment for both the header row and the data cells. Removed thealignItemsEnd(right-align) override from the amount columns (TOTAL,TOTAL_AMOUNT,GROUP_TOTAL,ORIGINAL_AMOUNT,TOTAL_PER_ATTENDEE,REIMBURSABLE_TOTAL,NON_REIMBURSABLE_TOTAL,TAX_AMOUNT) and thealignItemsCenter(center) override from the icon/status columns (COMMENTS,RECEIPT,AVATAR,STATUS,GROUP_WITHDRAWAL_STATUS,TYPE,ACTION,EXPORTED_TO). Each now falls through to the default left alignment.src/components/TransactionItemRow/DataCells/TotalCell.tsxandTaxCell.tsx→ removed the cell-texttextAlignRightso the amount/tax text renders left. In the inline-edit state of the amount cell, switched the input totextAlignLeftand the scroll container tojustifyContentStart.src/components/Search/SearchList/ListItem/TotalCell.tsx→ removedtextAlignRightfrom the grouped report-row total.Notes:
getReportTableColumnStyles,TransactionItemRow/DataCells/*and the SearchTotalCellare shared by the Search/Spend table and the money-request report transaction tables, so those report tables pick up the same left-alignment. This is expected for a consistency preview — flag it if you only want it scoped to Spend.Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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