92969: Add "expand" button overlay to charts for full-screen mode#95249
92969: Add "expand" button overlay to charts for full-screen mode#95249abbasifaizan70 wants to merge 20 commits into
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
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 --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb9bb9f384
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
cc @Expensify/design this button doesn't look right to me at all. Can we use one of our standard icon buttons here? (fully circle, smaller icon, etc.) |
|
Totally agree. Please use our standard icon buttons, use a small 28x28 icon and it should probably be like 12px from the top and 12px from the right? |
|
@situchan I fixed above AI feedbacks. |
|
Much better. @shawnborton do you think we should only show that icon on hover? Basically exactly what we do for receipts? CleanShot.2026-07-06.at.11.28.54.mp4 |
|
Yup, that makes sense to me! Or we always show a three dots icon in the top right but I don't think that will look good based on how these things scale on mobile devices. Also, does clicking anywhere on the chart also expand it? Or just this button does? |
… clipping, lazy modal mount, hover perf
|
@situchan Addressed all points:
|
|
Let us know when there are new screenshots/videos to review. |
video.mov |
|
Can you expand the chart by simply tapping on it? That might be nice for mobile. When the chart is expanded in the attachment modal, can you zoom in? Again, that might be nice for mobile. |
Zoom feature not implemented yet. |
|
Sure, let's do that in a separate PR. |
|
@abbasifaizan70 please merge main |
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d81dfb060
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@situchan Updated with latest main and fixed CI/CD as well. |
|
🤖 Re-reviewed at 🟡 Fluid charts lose their container background/rounding when expandedFor a chart without numeric design dimensions, the inline path still routes through 🟢 Scale is measured against the padded box, so
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa02f48baa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🤖 Regression scan at 🟡 Verify: expand-button placement on wide native surfaces (tablet/iPad)The button is absolutely positioned ( 🟢 Intentional but note: button now overlays the top-right of every existing chart on touch
Cleared as NOT regressions (with evidence)
This is an automated regression scan — treat findings as risks to verify, not confirmed bugs. Reply with |
…hart width, style fluid modal fallback
|
@situchan Fixed above AI feedbacks and also updated with latest main branch. |
|
@abbasifaizan70 there's flicker when close modal. Can you please check? Screen.Recording.2026-07-19.at.6.39.50.PM.mov
|
| <View | ||
| style={[styles.pAbsolute, styles.t0, styles.r0, styles.m3, !shouldShow && styles.opacity0]} | ||
| pointerEvents={shouldShow ? 'auto' : 'none'} |
There was a problem hiding this comment.
Hidden button stays in the accessibility tree
When !shouldShow, the wrapper uses opacity0 + pointerEvents="none", but the Button (with accessibilityLabel="Expand") remains mounted and reachable by screen readers on web.
Consider accessibilityElementsHidden / aria-hidden (or display:none) while hidden so an invisible control isn't announced.
Any reason for using opacity instead of conditional rendering?
There was a problem hiding this comment.
accessibilityElementsHidden/importantForAccessibility="no-hide-descendants" while hidden, so it's out of the accessibility tree. Kept it mounted with opacity (rather than conditional rendering) to match the receipt-actions pattern and avoid remounting the button subtree on every hover in/out — with pointer events and a11y both disabled while hidden, it's inert.
I would think this modal should look exactly like the view attachment modal on all platforms. |
…ive expand button from a11y tree
|
@situchan @shawnborton the modal header now matches the attachment modal (close button on the right on wide layouts, back button on narrow), and the close flicker is fixed — it was the chart re-measuring mid-close animation; layout updates are now frozen while closing. Video attached. Screen.Recording.2026-07-20.at.6.32.43.PM.mov |
|
Great, that seems better to me 👍 |



Explanation of Change
Adds an expand button overlaid on the top-right corner of inline charts, which opens the chart in a centered full-screen modal. The modal reuses the already-parsed chart data and renders it scaled to the viewport, so the expanded chart matches the inline one exactly, just larger.
Fixed Issues
$ #92969
PROPOSAL: #92969 (comment)
Tests
Offline tests
same as tests.
QA Steps
same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
Screen.Recording.2026-07-07.at.2.33.29.AM.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-07-07.at.2.36.43.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-07-07.at.2.37.58.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-07.at.2.29.33.AM.mov