-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Changed the logic to be AND, also removed the usage of underscore #22411
Changed the logic to be AND, also removed the usage of underscore #22411
Conversation
src/libs/OptionsListUtils.js
Outdated
const matchRegex = new RegExp(Str.escapeForRegExp(word), 'i'); | ||
return matchRegex.test(valueToSearch) || (!isChatRoom && participantNames.has(word)); | ||
matching &&= matchRegex.test(valueToSearch) || (!isChatRoom && participantNames.has(word)); |
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.
@gedu From what I understood here, once matching
is set to false
it won't be set to true
anymore, right?
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.
Yes
@fedirjh will you get around to the checklist on this one today? Thanks |
@gedu could you please update the tests to give more examples and describe the preconditions too? Thanks! |
Reviewer Checklist
Screenshots/Videos |
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. I just wanted to note that the search results will include threads that have both foo
and bar
included in the threaded comments.
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.
@francoisl all yours!
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 👍
🚀 Deployed to staging by https://github.com/francoisl in version: 1.3.39-4 🚀
|
Heey, which preconditions? I think it is non, now it uses the AND, so for something to show app has to satisfies all the words in the query |
preconditions in a sense of what kinds of chats users already have. DMs and group chats and what should be matched. Its easier for QA to follow exact steps then having to figure it out on their own. ie search |
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.39-11 🚀
|
Details
Replaced the unique calculation to be a Set, and removed the main query from searchWords
Fixed Issues
$ #21627
PROPOSAL: #21627 (comment)
Tests
3a. Example:
foo
4a. Example:
foo bar
Offline tests
3a. Example:
foo
4a. Example:
foo bar
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
search_chrome.mp4
search_safari.mp4
Mobile Web - Chrome
not working
Mobile Web - Safari
search_iosSafari.mp4
Desktop
search_desktop.mp4
iOS
search_ios.mp4
Android
search_android.mp4