-
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
Search suffix tree implementation #51954
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 20af9f6.
@ahmedGaber93 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] |
cc @marcaaron since you also reviewed the first PR (and rory is on parental leave) |
BUG: search result display previous search result above the current search result
Expected: search for BUG: Ordering result prefer BUG: Duplicated result |
Thanks for testing, let me fix those! |
I split out a few changes here first: |
Status of fixed issues:
|
Thanks for testing! On the ordering bug, i looked into it and came to the conclusion that i first need to cleanup the OptionListUtils a little, its a lot of spaghetti 🍝 How it currently works is:
All of this is happening in like 2 functions and is very coupled. The reason why the ordering is broken with our SuffixTree is that right now it works like this:
My current approach is to cleanup the current code so the search works like this (before applying the changes from this PR):
This way the ordering should always give the same results. (Will keep opening a couple of cleanup PRs today) Cleanup PRs:
|
Great! We can wait cleanup PRs then retest. |
}; | ||
|
||
// There are certain characters appear very often in our search data (email addresses), which we don't need to search for. | ||
const charSetToSkip = new Set(['@', '.', '#', '$', '%', '&', '*', '+', '-', '/', ':', ';', '<', '=', '>', '?', '_', '~', '!', ' ', ',']); |
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.
should this be a CONST somewhere/do we forsee this list growing?
Is this PR on HOLD for #52250? |
Seems we are almost ready to continue now that the linked PR has been merged? |
Yes, will continue now. A few more cleanups / restructures are needed before but we are getting closer!! |
Next cleanup PR is available for review: |
Here is the final cleanup PR that will provide a clear separation between filtering and ordering here: |
Explanation of Change
Reapplying the changes from this reverted PR:
This PR makes sure to fix the following regressions as well:
Search-Search result shows fallback avatar and email instead of custom avatar and display name #51123Fixed Issues
$ #46591
PROPOSAL:
Tests
Test 1:
[email protected]
), make sure it's found. Then search forhannomargeloio
(removing all special chars), and make sure its still foundTest 2:
Test 3:
Offline tests
Same as testing steps
QA Steps
Same as testing steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Screen_Recording_20240927_212736_New.Expensify.Dev.mp4
Android: mWeb Chrome
Screen_Recording_20240927_211510_Chrome.mp4
iOS: Native
Screen.Recording.2024-09-27.at.21.28.56.mov
iOS: mWeb Safari
ScreenRecording_09-27-2024.21-34-17_1.MP4
MacOS: Chrome / Safari
Screen.Recording.2024-09-27.at.21.08.10.mov
MacOS: Desktop
Screen.Recording.2024-09-27.at.21.28.10.mov