-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search - Add Reset filters button to Advanced Filters page #48243
Search - Add Reset filters button to Advanced Filters page #48243
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left a small suggestion
import AdvancedSearchFilters from './AdvancedSearchFilters'; | ||
|
||
function SearchAdvancedFiltersPage() { | ||
const styles = useThemeStyles(); | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tests well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✋ 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 filters
button 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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