Search - Add Reset filters button to Advanced Filters page#48243
Search - Add Reset filters button to Advanced Filters page#48243luacmartins merged 6 commits intoExpensify:mainfrom
Conversation
Kicu
left a comment
There was a problem hiding this comment.
LGTM, left a small suggestion
| const {translate} = useLocalize(); | ||
| const [searchAdvancedFilters = {} as SearchAdvancedFiltersForm] = useOnyx(ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM); | ||
|
|
||
| const shouldShowResetFilters = Object.values(searchAdvancedFilters).some((value) => (Array.isArray(value) ? value.length !== 0 : value !== '')); |
There was a problem hiding this comment.
very small nitpick, but instead of this check value !== '' I would just check something like !!value. Just feels safer and more generalised to check if a value is truthy.
There was a problem hiding this comment.
I agree, it's more readable that way - corrected 👍
|
@rayane-djouah 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-29.at.11.27.42.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-29.at.11.26.04.PM.moviOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-29.at.23.16.28.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-29.at.23.25.40.mp4MacOS: Chrome / SafariScreen.Recording.2024-08-29.at.11.08.39.PM.movMacOS: DesktopScreen.Recording.2024-08-29.at.11.24.20.PM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@shawnborton your assumption makes sense 👍 This was discussed here on slack: https://swmansion.slack.com/archives/C036QM0SLJK/p1724857996895799?thread_ts=1724745439.819019&cid=C036QM0SLJK (not sure if this link will work for you. But I will remind @luacmartins to create an issue for it, and we'll clean this edge case along with it |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.27-1 🚀
|



Details
Added a button to reset selected filters in the header of
AdvancedFiltersPage.Design update
The design of the button has been updated, you can refer to it over on this slack conversation.
Fixed Issues
$ #48136
PROPOSAL:
Tests
Reset filtersbutton appears in the header of the page / modal when any filter is selected, press on it and confirm that it resets the filters to none.Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.NATIVE.mov
Android: mWeb Chrome
ANDROID.CHROME.mov
iOS: Native
IOS.NATIVE.mov
iOS: mWeb Safari
IOS.SAFARI.mov
MacOS: Chrome / Safari
CHROME.mov
MacOS: Desktop
DESKTOP.mov