Add support for view:line and view:pie#80768
Conversation
- Add LINE: 'line' and PIE: 'pie' to CONST.SEARCH.VIEW - Add VIEW: 'view' to CONST.SEARCH.SEARCH_USER_FRIENDLY_KEYS Part of implementing view:line and view:pie support in search query language
- Add test cases for view:line parameter parsing - Add test cases for view:pie parameter parsing - Tests verify that view values are correctly parsed in search queries
- Add viewAutocompleteList useMemo to generate view suggestions - Add VIEW case to autocompleteSuggestions switch in SearchAutocompleteList - Add userFriendlyViewList constant for validation - Add VIEW validation case in filterOutRangesWithCorrectValue function This enables autocomplete suggestions for view values (table, bar, line, pie) when users type 'view:' in the search query.
- Add tests for view:bar, view:line, and view:pie in getQueryWithUpdatedValues - Fix buildSearchQueryString to preserve view when it differs from default - View parameter is now correctly preserved when query is updated Tests verify that view values are correctly parsed and preserved in search queries.
- Add test to verify all view values (table, bar, line, pie) are included - Add test to verify view values are correctly mapped to user-friendly values - Tests ensure view autocomplete suggestions work correctly These tests verify that the view autocomplete list generation logic correctly includes all four view types and maps them properly.
- Add 'view' to autocompleteKey rule in autocompleteParser.peggy - Regenerate autocompleteParser.js - This enables autocomplete suggestions to appear when typing 'view:' Previously, view was missing from the autocompleteKey rule, so the parser didn't recognize 'view:' as a key that should trigger autocomplete suggestions. Now autocomplete works for view: just like it does for group-by:
- Fix nullish coalescing operator usage in buildSearchQueryString - Replace require() with proper import for getUserFriendlyValue in tests - All lint errors resolved, tests passing
This comment was marked as resolved.
This comment was marked as resolved.
…utocomplete validation - Add 7 tests for buildSearchQueryString covering view parameter edge cases - Add 8 tests for view filter validation in parseForLiveMarkdown - Cover all view types (table, bar, line, pie) individually - Tests verify view is included/excluded correctly based on rawFilterList and default values
- Add VIEW to SearchFilterKey type to fix TypeScript errors in switch statements - Add VIEW filter key to FILTER_KEYS constant - Add VIEW property to SearchAdvancedFiltersForm type definition - Resolves typecheck errors in SearchAutocompleteUtils and SearchAutocompleteList
|
@srikarparsi 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] |
|
Screen.Recording.2026-01-29.at.2.10.30.AM.mov |
|
Bug: This is probably because Screen.Recording.2026-01-29.at.2.16.49.AM.mov |
|
|
- Add viewAutocompleteList to dependency array to satisfy ESLint exhaustive-deps rule - Ensures hook correctly tracks all dependencies for maintainability - Consistent with other autocomplete lists (groupByAutocompleteList, statusAutocompleteList)
Yes, thanks for the confirmation. |
|
Working on the other two issues. |
|
Ok, so I looked into the other two and they have to do with the fact that this isn't an in-product filter and only available when you enter manually. So they should get addressed in #80779. So I think you can proceed @ShridharGoel |
trjExpensify
left a comment
There was a problem hiding this comment.
Core PR for a WN project, no qualms from me! 👍
|
@cristipaval or @neil-marcellini can you take the internal review with the context? |
srikarparsi
left a comment
There was a problem hiding this comment.
Looks good to me as well. @ShridharGoel would you be able to complete the reviewer checklist?
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-01-29.at.1.56.34.AM.mov |
|
@mjasikowski 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] |
|
We've got plenty of reviews, so going to merge. |
|
✋ 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/puneetlath in version: 9.3.11-16 🚀
|
|
This PR failing because of the issue 1.mp4 |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|

Explanation of Change
Adds support for
view:lineandview:piein the query language, with auto-complete support.Fixed Issues
$ #80760
$ #80762
Tests
type:expense group-by:categoryinto the search barview:view:bananaOffline tests
Same as online 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
CleanShot.2026-01-28.at.12.05.14.mp4