-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Highlight autocomplete value #54403
Highlight autocomplete value #54403
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
src/libs/SearchAutocompleteUtils.ts
Outdated
@@ -131,6 +132,15 @@ function getAutocompleteQueryWithComma(prevQuery: string, newQuery: string) { | |||
return newQuery; | |||
} | |||
|
|||
function workletizedParser(input: string) { |
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.
Just noticed that this name is rather weird sounding, so I hope we can change it.
This is shaping up really nicely! Great work so far! |
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.
Went over the PR for the final time and it looks great 👍
I just have 2 last thoughts to improve this:
- my comment about duplication in SearchRouterInput
- actually I think this is a great time to rename this component, since we are doing some refactoring on it anyways. It's used both on Search results page and in the router, I think we could name it something much more generic. Perhaps simply
SearchInput
orSearchAutocompleteInput
is a better name?
I want other devs to associate this component with searching in general, not specifically with the router
src/components/Search/SearchRouter/SearchRouterInput/index.native.tsx
Outdated
Show resolved
Hide resolved
Nice! Thanks for addressing my comments. I agree that we can leave the border radius out for now so things are consistent across platforms. Additionally, a follow up to handle both syntax key styles and the exact query match highlights sounds good! |
I'll review again shortly! |
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.
Nice! Code LGTM and tests well! Thanks for the hard work!
@ikevin127 all yours |
🎉 LGTM, good work on this one! Thanks for promptly addressing all issues 👍 @289Adam289 Can you please resolve the conflicts ? Then I'll do a final check before 🟢 Approving. |
Everything should work now. cc @luacmartins @ikevin127 |
@289Adam289 we have conflicts again |
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.
♻️ Reviewed the latest updates and it LGTM 🚀
Given that the conflicts can be cleanly merged, I approved.
@luacmartins feel free to merge this as soon as the conflicts are resolved, but keep an eye on this merge freeze Slack announcement from Rory before merging.
ℹ️ I noticed this thing, which is probably not a blocker but wanted to mention it:
-
now both primary and secondary account emails (contact methods) are highlighted with green when inputted which is great, but when pressing Enter to actually perform search based in the input values, only the primary email will transform into
{displayName}
, while the secondary email remains as the email address.See video
WEB.mov
e4b4a9d
to
601aeb9
Compare
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
Failing checks are for hybrid with message:
|
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@luacmartins QA still ongoing on this one or how come it wasn't deployed yet ? 🤔 |
The last checklist was created on Jan 31st, before this PR was merged. We're waiting for the next deploy for it to hit staging. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.94-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.94-25 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.94-25 🚀
|
Explanation of Change
This PR implements Search syntax highlighting using latest version of
react-native-live-markdown
library.Autocomplete parser is currently parametrized with current user and workletized to be passed as
parser
prop toRNLMTextInput
component.Fixed Issues
$#50949
PROPOSAL:
Tests
from:user@user.com
)Offline tests
QA Steps
from:user@user.com
)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.2025-01-08.at.12.39.39.mp4
Android: mWeb Chrome
Screen.Recording.2025-01-28.at.15.09.25.mp4
iOS: Native
Screen.Recording.2025-01-08.at.12.32.46.mp4
iOS: mWeb Safari
Screen.Recording.2025-01-28.at.15.07.13.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-01-28.at.15.10.55.mp4
MacOS: Desktop