-
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 suffix tree implementation #51954
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:
|
Raised a question here on slack about the failing eslint tests |
As discussed here |
Reviewer Checklist
Screenshots/Videos |
Thanks for the updates, I think userToInvite have been broken in the last changes 20241217194031580.mp4 |
This is a more effective implementation for https://github.com/Expensify/App/pull/54147/files which i reverted in this PR
254f263
to
9755323
Compare
This should be good again for testing @ahmedGaber93 |
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.
Tested well, All yours @marcaaron
* Builds a suffix tree and returns a function to search in it. | ||
* | ||
* @example | ||
* ``` |
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.
NAB
* ``` | |
* |
} | ||
|
||
// The user might separated words with spaces to do a search such as: "jo d" -> "john doe" | ||
// With the suffix search tree you can only search for one word at a time. Its most efficient to search for the longest 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.
NAB
// With the suffix search tree you can only search for one word at a time. Its most efficient to search for the longest word, | |
// With the suffix search tree, you can only search for one word at a time. It is most efficient to search for the longest word |
🚀 Deployed to staging by https://github.com/marcaaron in version: 9.0.79-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.79-5 🚀
|
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:
hanno@margelo.io
), 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