-
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
Add keyword advanced filter for Search #46799
Add keyword advanced filter for Search #46799
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.
Looks simple and legit 👍
@@ -3670,6 +3670,8 @@ export default { | |||
after: (date?: string) => `Después de ${date ?? ''}`, | |||
}, | |||
status: 'Estado', | |||
keyword: 'Palabra clave', | |||
hasKeywords: 'Tiene palabras clave', |
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 please verify
@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 ready for review! |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Note The implementation only works as expected with 1 keyword, if we add 2 or more -> we get infinite loading. Note: The main issue has to do with using more than 1 keyword with different separators in between (comma, space).
Important
ℹ️ Note: I think it would be useful from a UI / UX POV to have a subtitle on the keyword input that mentions a certain separator can be used i case the user wants to have multiple keywords (cc @Expensify/design) and possible look at ways to make sure other separators / symbols won't show page not found or infinite loading when used. @Kicu Please let me know if these are within the scope of this PR and if they should be addressed before moving forward. There are some conflicts as well. Once all of these are addressed, I will be able to 🟢 Approve. |
Would love a video/screenshot to see how this looks with some weird string examples like:
|
@dubielzyk-expensify 👋 I dropped 3 videos in the #46799 (comment) above, are you now able to see them ? They are related to the following scenarios:
Didn't try emojis yet. |
FYI the keyword filter is not yet supported in the backend and is throwing this error. I'm working on a PR to fix that. |
That being said...
For each of these what should be the final value of |
PR to handle keyword filter in review |
I think for now, we should treat space and commas as separators and do an
would search for
would search for
would search for The keyword filter is one that we'll have to refine over time, e.g. drop common words like |
From @ikevin127 's third example, when the user types in The filter title spits it out as three separate keywords: Why is that? Even if we are searching three separate words, it feels weird to the user that the string got chopped up. Can we just use |
✅ That was fixed after another PR was recently merged and is now fixed on this one as well after sync w/ main: In summary, to callback to the issues found (#46799 (comment)), what's needed here in order to move forward with Approval and merge:
|
Hmm I still think, as a user, I would expect to see |
Agree with you Shawn. Cause it's be weird if you add comma in your string, then see double commas. |
I agree. I think we need to change the grammar to combine all filters with the same key. |
@ikevin127 2. Page not found using semicolon problem comes up in multiple filters. After discussing it with team and @luacmartins we agreed to handle it as a follow up. Carlos have you had a chance to create a issue for that? If not would you mind? Thanks! |
I agree with Shawn here. 👍 |
@289Adam289 created issue here |
@289Adam289 it seems like we still need to address some comments on how we display the filters to the user. |
Much better! |
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 PR is looking good. There are a few issues with the parser grammar that make some of the results weird when using special characters, e.g. ,
, ;
, etc I think those can be addressed in a follow up though.
I'm gonna merge this PR and create a follow up issue to update the parser grammar so it handles the special character cases better.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Created issue to update parser grammar here |
FYI I believe this was deployed to prod yesterday, from this checklist - #47219 |
Details
Fixed Issues
$#46027
PROPOSAL:
Tests
visit root
/search/filters
test keyword 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.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4