Skip to content

Update Expensify card UI#89379

Merged
nkuoch merged 41 commits into
Expensify:mainfrom
ShridharGoel:cardUI
May 19, 2026
Merged

Update Expensify card UI#89379
nkuoch merged 41 commits into
Expensify:mainfrom
ShridharGoel:cardUI

Conversation

@ShridharGoel

@ShridharGoel ShridharGoel commented May 1, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Updated the Expensify card details pages to match the new UI:

  • Moved cardholder names onto the card artwork where needed.
  • Moved card actions into buttons below the card artwork.
  • Centered status text and action buttons for frozen cards.
  • Added the frozen card icon and updated the unfreeze label.
  • Moved the workspace card name row above other card fields.
  • Matched remaining limit text size with the other fields.
  • Added the shared card details action button helper used by this card details layout.

Fixed Issues

$ #87497
PROPOSAL: N/A

Tests

  1. Open a workspace Expensify Card details page.
  2. Verify the card artwork, cardholder/card name placement, and action button placement match Figma.
  3. Verify Freeze card and View transactions are shown as centered action buttons when the card is active.
  4. Freeze the card.
  5. Verify the frozen status text is centered and has the expected spacing above the action buttons.
  6. Verify Unfreeze card and View transactions stay side by side when there is enough width and wrap centered when needed.
  7. Open an Expensify card details page.
  8. Verify the UI matches the new design mentioned in the linked issue.
  • Verify that no errors appear in the JS console

Offline tests

  1. Open an Expensify card details page.
  2. Turn off the network connection.
  3. Verify disabled card action buttons stay disabled where needed.
  4. Verify the page layout stays the same.

QA Steps

Same as tests.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native Screenshot 2026-05-02 at 12 37 34 AM Screenshot 2026-05-02 at 12 37 24 AM
iOS: mWeb Safari
Screen.Recording.2026-05-02.at.12.43.37.AM.mov
MacOS: Chrome / Safari Screenshot 2026-05-02 at 12 22 28 AM Screenshot 2026-05-02 at 12 22 12 AM

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/components/CardPreview.tsx 100.00% <100.00%> (ø)
src/styles/variables.ts 100.00% <ø> (ø)
...pages/settings/Wallet/CardDetailsActionButtons.tsx 94.44% <94.44%> (ø)
src/libs/CardNavigationUtils.ts 0.00% <0.00%> (ø)
.../pages/settings/Wallet/ExpensifyCardPage/index.tsx 73.18% <70.00%> (+2.45%) ⬆️
src/components/FrozenCardHeader.tsx 0.00% <0.00%> (ø)
...e/companyCards/WorkspaceCompanyCardDetailsPage.tsx 0.00% <0.00%> (ø)
...xpensifyCard/WorkspaceExpensifyCardDetailsPage.tsx 0.00% <0.00%> (ø)
... and 76 files with indirect coverage changes

@melvin-bot

melvin-bot Bot commented May 1, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@ShridharGoel ShridharGoel changed the title Improve card details page layout Align Expensify card details with Figma May 1, 2026
@ShridharGoel ShridharGoel changed the title Align Expensify card details with Figma Update Expensify card UI May 1, 2026
@ShridharGoel ShridharGoel marked this pull request as ready for review May 1, 2026 18:54
@ShridharGoel ShridharGoel requested a review from a team as a code owner May 1, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refreshes the Expensify card details UI across personal, workspace Expensify, and workspace company card pages to match a new design. It moves cardholder names onto the card artwork, replaces inline menu rows for primary actions (View transactions / Freeze / Unfreeze / Update card) with a shared centered button row, adds a frozen card icon to the unfreeze button, and reorders/restyles card details (name above other fields, remaining limit hint). A small shared helper component and a navigation utility for "view transactions" are introduced and reused.

Changes:

  • New shared CardDetailsActionButtons/CardDetailsActionButton UI and navigateToCardTransactions helper, adopted by the three card detail pages.
  • FrozenCardHeader redesigned: status text centered, freeze icon moved onto the unfreeze button (now labeled "Unfreeze card"), optional children rendered next to it with equal width.
  • Reorganized fields and removed cardholder/MenuItem rows on workspace card pages; renamed the "Reveal details" CTA to "Reveal" (with translations and test updates).

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/pages/settings/Wallet/CardDetailsActionButtons.tsx New shared centered action buttons row with equal-width context.
src/libs/CardNavigationUtils.ts New helper to navigate to a card's transactions search.
src/components/FrozenCardHeader.tsx Centers status, adds freeze icon to unfreeze button, supports children.
src/components/CardPreview.tsx Sets fixed height when an overlay image is present.
src/pages/settings/Wallet/ExpensifyCardPage/index.tsx Adopts new action buttons, reorders rows, renames "Reveal details" → "Reveal".
src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx Adopts new layout/buttons; moves card name row above.
src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx Adopts new layout/buttons; replaces last-updated row and update menu item.
src/styles/variables.ts Adds cardDetailsActionButtonMinWidth.
src/languages/*.ts Adds cardPage.cardDetails.reveal translation.
tests/ui/WalletExpensifyCardPageTest.tsx Updates tests to look up the renamed translation key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nkuoch nkuoch merged commit d9d00eb into Expensify:main May 19, 2026
44 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 @nkuoch has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@DylanDylann

Copy link
Copy Markdown
Contributor

@ShridharGoel There's a gap below the Change PIN row. It appears to be caused by this change

Screenshot 2026-05-20 at 00 02 50

@shawnborton

Copy link
Copy Markdown
Contributor

Good catch - let's follow up and fix that. I think that would be grouped in the rows below, right?

@ShridharGoel

Copy link
Copy Markdown
Contributor Author

How to get a card with this PIN option?

@Pujan92

Pujan92 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Let's wrap all MenuItems in the View with a top margin in the last part

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/nkuoch in version: 9.3.78-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@MelvinBot

Copy link
Copy Markdown
Contributor

Yes, a help site update is needed. PR #89379 renamed the virtual card button from Reveal details to Reveal, which is referenced in the cardholder help article.

Draft PR created: #91127

Change: Cardholder-Settings-and-Features.md line 82 — updated Reveal DetailsReveal to match the new UI label.

No other help articles reference this button text.

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #91137 was identified to be related to this PR.

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #91138 was identified to be related to this PR.

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #91139 was identified to be related to this PR.

@Pujan92

Pujan92 commented May 20, 2026

Copy link
Copy Markdown
Contributor

Let's wrap all MenuItems in the View with a top margin in the last part

@ShridharGoel can you plz work on this

@ShridharGoel

Copy link
Copy Markdown
Contributor Author

@Pujan92 Yes handling it in #89396

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.78-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@Pujan92 Pujan92 mentioned this pull request May 28, 2026
52 tasks
FitseTLT pushed a commit to FitseTLT/App that referenced this pull request Jun 5, 2026
The card details page button was renamed from "Reveal details" to
"Reveal" in Expensify#89379. Update the help article to match.

Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
@m-natarajan

Copy link
Copy Markdown

@ShridharGoel @Pujan92
The actual design of Expensify card details tab differs from expected. There are additional rows on tab: Spend rules, Card name, Card limit. Checked both tabs: in Wallet and in Expensify cards (workspace). Is this expected?

REC-20260608101625.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.