Repository navigation
add dark mode support for chart - #93258
Conversation
|
@luacmartins 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aeb0336882
ℹ️ 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".
…nderer/utils/resolveChartThemeColor.ts Co-authored-by: Carlos Martins <luacmartins@gmail.com>
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb Chromemchrome.moviOS: HybridAppios-dark.moviOS: mWeb SafariMacOS: Chrome / Safariweb-dark.movios-web-light.mov |
|
@daledah conflicts |
situchan
left a comment
There was a problem hiding this comment.
Please update server test images as outdated.
And conflicts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a50967cae
ℹ️ 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".
| [colors.productLight200, 'cardBG'], | ||
| [colors.productLight900, 'heading'], | ||
| [colors.productLight800, 'textSupporting'], |
There was a problem hiding this comment.
Include the existing chart colors in the dark-mode map
Charts already covered by this renderer still use nearby hex values that are not in this exact-match map: server/victory-chart-renderer/tests/fixtures/monthly-spend.xml and the top-categories fixtures set the card background to #F7F2EF, and monthly/top-employees use supporting text #73857E. In dark theme those values fall through unchanged while mapped heading/border colors change, so those existing chart payloads render with a light card instead of a dark card; please add these aliases or normalize the incoming palette.
Useful? React with 👍 / 👎.
Code Review🔴 Blocking: the server/headless renderer now produces dark charts unconditionally — this is a regression, not the intended theming. The new I verified this against the golden images themselves:
The 5 golden PNGs in this PR were regenerated to dark, which makes Fix: wrap the server tree in Secondary observations (non-blocking)
Client-side (in-app) rendering is correct — Next Steps: Reply with |
|
@situchan i updated the screenshot and resolved conflict |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @luacmartins 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.4.9-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required This PR adds dark mode support to the internal Victory chart renderer — charts embedded in chat messages now adapt their colors (axes, labels, legends, bars/slices) to the active theme. The changes are purely a rendering implementation: Why no docs update is needed:
I checked I did not create a draft PR since no help site content needs to change. If you believe a specific article should be updated, let me know which one and I'll draft it. @daledah, please confirm whether you agree no help site updates are required for this change. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.9-0 🚀
|
Explanation of Change
Fixed Issues
$ #92958
PROPOSAL:
Tests
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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