feat: implement SearchBarChart component#80658
feat: implement SearchBarChart component#80658neil-marcellini merged 47 commits intoExpensify:mainfrom
SearchBarChart component#80658Conversation
|
|
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.
|
SearchBarChart componentSearchBarChart component
|
🚧 @puneetlath has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@Expensify/design this is our first chart! Mind giving the ad-hoc a spin and sharing your feedback? |
|
Looks like it's crashing on web but mobile is working. To test it, type this into the Reports page search |
|
Dang, excited to see this on web! But will take mobile for a spin in the meantime. |
|
Hmm I can't seem to sign in on the mobile adhoc build, I keep getting an "invalid authentication code" even though I'm pasting directly from the authenticator app. So 2FA seems broken for some reason, though my Expensify magic code is working. Not sure if that's a separate problem on main somewhere. |
|
@shawnborton on the iOS adhoc build app I can sign-in with Google to bypass magic code/2FA etc. |
|
I saw a bar chart on mobile! I can't scroll the page when it's rendered though, so it's hard to check it out properly at this point. |
|
(Sidenote: I think maybe we leave it for now until we can test more, but I've started some explorations in Figma on how to better show negative values on the chart) |
|
Should we consider making charts horizontally scrollable on mobile when they have > X bars? Otherwise they feel pretty poor and illegible. Agree that the axis labels are feeling pretty odd as well. |
I think the plan is to figure this out after V1 👍 |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Reviewer Checklist
Screenshots/VideosiOS: HybridApp |
neil-marcellini
left a comment
There was a problem hiding this comment.
One thing to change
|
It crashes on native iOS and Android. Screen.Recording.2026-01-30.at.4.06.31.AM.mov |
I think you need to rebuild your app. This error states that native module cannot be found so probably you haven't compiled it yet |
|
Makes sense, I'll check by creating a fresh build. |
|
🚧 @trjExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
@ShridharGoel that one is something we're going to patch upstream, so @mateuuszzzzz will create a separate issue for it shortly. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.3.11-16 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|






Explanation of Change
This PR introduces the
SearchBarChartcomponent as part of the Insights project, enabling a bar chart visualization in the search view when the user typesview:barwithgroup-by.New Charts infrastructure:
BarChartcomponent built on top of Victory Native and@shopify/react-native-skia, with platform-specific entry points for web and nativeChartHeader(displays title and selected value),ChartTooltip(shows details on bar hover/press)useChartInteractions,useChartInteractionState), label formatting (useChartLabelFormats), and label layout (useChartLabelLayout)Search integration:
SearchChartViewwhich fetches search data and transforms it intochart-compatible format, grouping results by category with currency-based
Y-axis values
queryJSON.view === 'bar'
CurrencyUtilsfor axis labelsFixed Issues
$ #80534
PROPOSAL:
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13830
Tests
type:expense group-by:category view:bar- verify bars display correctly<category> • <amount> (<percentage>)type:expense category:"<selected>"Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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