Add close button to filter chip to clear individual filter#89256
Conversation
|
@aimane-chnaif 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.
|
|
Going to run a build on this now. CC: @Expensify/design for a looksie too. |
|
@aimane-chnaif can you review it today? Would be great if we catch the deploy on this one. |
|
🚧 @trjExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Visually these look good to me, cc @dubielzyk-expensify for final confirmation One thing we discussed in Slack - it feels pretty redundant to show the keyword filter chip when you see it in the search box right to the left. Can we not show the keyword chip?
Maybe while we're at it, the close button probably needs to be closer to the right edge of the input: |
|
Are the chips supposed to stay sticky on the views? Like if I choose to see only Expenses from myself, then head to a different section, I would expect the same filter to be applied on Expenses when I return: CleanShot.2026-04-30.at.14.59.52.mp4 |
They are not, no |
Done
The clear button has 4px horizontal margin by default, so all components that use it have that style. Should this change for that input only, or for all?
Updated |
|
🚧 @shawnborton 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! 🧪🧪
|
|
Nice, feeling good to me 👍 |
I would just change it here for this small size. |
Updated |
|
🚧 @shawnborton 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! 🧪🧪
|
|
Sweet, all good on my end 👍 |
|
jest is failing |
|
Looks like a flaky test, merged with main to rerun it |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
| return PopoverComponent({closeOverlay: toggleOverlay, isExpanded: isOverlayVisible, setPopoverWidth: setCustomPopoverWidth}); | ||
| }, [PopoverComponent, toggleOverlay, isOverlayVisible]); | ||
|
|
||
| const showCloseButton = !!onClosePress; |
There was a problem hiding this comment.
NAB: as a boolean, rename to shouldShowCloseButton
|
Code Review Clean implementation. The close button pattern (split button with divider) follows existing UI conventions well, and the filter clearing logic correctly handles compound filters (date sub-keys, amount modifiers, report fields). A few observations:
Otherwise LGTM — the design approvals are in, the reviewer checklist is complete, and the logic is sound. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3a22b4650
ℹ️ 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".
|
✋ 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.3.67-0 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are needed. PR #89256 introduces a close button on filter chips, which is a new user-facing interaction not currently documented. I updated the Getting Started with the Spend Page article to add a section explaining how to clear an individual filter by clicking the close button (X) on its chip. Draft PR: #89645 |




Explanation of Change
Fixed Issues
$ #84878
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
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
web.mp4