-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
advanced filters category #46197
advanced filters category #46197
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
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.
The code looks ok, there are some changes on the Category page itself that you will have to do.
Also called @luacmartins and @blazejkustra for some help :)
Please be advised that this is a draft and is blocked by my PR: #46022 (should be ready on Monday I hope)
newCategories = activeItems?.filter((category) => category !== item.value); | ||
} else { | ||
newCategories = [...(activeItems ?? []), item.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.
@luacmartins we need some help with deciding what kind of input UI to use for selection of multiple values.
Also how should it behave?
A. user selects multiple values and has to click some kind of green Save
button update filters - just like on dates
B. user selects multiple values and on every click we update the form data, so that when there is no Save
button
@289Adam289 can you please drop 1-2 screenshots in this thread so show how the picker looks right now?
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.
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.
Option A is my preference. cc @Expensify/design for input.
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.
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.
Yup, big time agree with Danny there that we should use the checkbox pattern we have.
@ikevin127 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] |
@luacmartins hi! It's ready for review |
@289Adam289 TS and performance checks are failing |
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
All yours @ikevin127 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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.
Code and UI wise this is on point 🚀
The only thing that I found to be off with the functionality is that once applied e.g. the Car filter does not seem to change anything in the search Expenses list compared to before applying the filter.
For example the reviewer checklist Web video:
MacOS: Chrome / Safari
web.mov
@luacmartins @289Adam289 If this is expected for now, and will be fixed to actually work once all filter categories are implemented then we're good to go here 🟢, but if this is supposed to work differently than in the video shown above then I think it should be fixed here before merging.
+1 to that, but otherwise from a visual perspective, this is looking good 👍 |
That is expected for now until this PR gets merged |
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. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.16-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.16-8 🚀
|
@@ -36,6 +36,11 @@ function getFilterDisplayTitle(filters: Partial<SearchAdvancedFiltersForm>, fiel | |||
return dateValue; | |||
} | |||
|
|||
if (fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY && filters[fieldName]) { | |||
const categories = filters[fieldName] ?? []; | |||
return categories.join(', '); |
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.
You did not sort the categories before showing which caused #48496
Details
This PR adds page for category filter
Fixed Issues
$#46038
PROPOSAL:
Tests
visit route
/search/filters
test category filter and whether navigation behaves correctly
Verify that no errors appear in the JS console
Offline tests
QA Steps
Same steps as Tests
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.mov
Android: mWeb Chrome
android_web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios_web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov