-
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 SearchRouter component and context to display it #48785
Add SearchRouter component and context to display it #48785
Conversation
@luacmartins here is a draft that I created when describing the doc, take a quick look. |
Nice! You guys make it look too easy 😄 |
53ec64f
to
f8803d3
Compare
0966fad
to
aa224c6
Compare
height: variables.componentSizeNormal, | ||
}, | ||
|
||
searchContainer: { |
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.
I searched in all project files using IDE (webstorm) search and found no usages of this. I believe these are leftovers after some temporary old search feature which was removed.
aa224c6
to
2a2796b
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.
Code looks good. Requested two small changes
@289Adam289 I've fixed both suggestions, take a look |
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!
8ed1946
to
08fd7e4
Compare
08fd7e4
to
2772431
Compare
@ikevin127 this PR is ready for review. This is only available on dev right now |
How much feedback do you all want from a design perspective? |
That would be my expectation, that the router is pre-filled with the current query that you are looking at. |
There's no overlay planned (yet) - but we did have some slight box shadow happening around it from our mockups. |
@ikevin127 please prioritize reviewing this issue since it unblocks others. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
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 🚀
Observation: The Cancel
button only shows-up on narrow layout devices, probably that's intended but I thought I should mention it anyway in case it's not.
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
|
||
return ( | ||
<PressableWithoutFeedback | ||
accessibilityLabel="" |
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 we'll need to update this
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
ESlint was failing on AuthScreens, it's unrelated to this PR. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
The failing Eslint was a new check, details: #48785 (comment) |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.38-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.38-4 🚀
|
value={value} | ||
onChangeText={onChangeText} | ||
onSubmitEditing={onSubmit} | ||
autoFocus |
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.
Coming from this Issue #51010, We are adding autoFocus here, but it doesn’t always work consistently on Android. To handle this, we’ve an existing prop (shouldDelayFocus) for TextInput that enables autoFocus with a delay specifically for Android #51010 (comment)
} | ||
|
||
return ( | ||
<PressableWithoutFeedback |
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.
FYI this PR missed adding a tooltip for the search button and caused this issue: #50977
Details
SearchRouter
and unblocks all other work around SearchRouter and 2.4Done
SearchRouter
which uses a modal, and allows to submit search viaENTER
key (the clickable list will come in a different PR) - it's responsible for managing the parsing of query and performing the actual search (viaNavigation.navigate()
)SearchRouterInput
which is responsible for displaying the input to the user (in future we plan to add autocomplete there)SearchContext
that controls whether the router should be shown or hiddenSearchButton
to display the new router but ONLY in development (not staging or prod) - I understand that the TopBar looks weird with old and new search, but that is the easiest way to add it both for large and small screens; we don't want to display the new router to the users until it's fully doneFixed Issues
$ #49118
$ #49119
PROPOSAL:
Tests
Offline tests
QA Steps
Nothing to test for QA at this point, we'll do tests once the feature is more complete
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
rec-search-android.mp4
Android: mWeb Chrome
iOS: Native
rec-search-ios.mp4
iOS: mWeb Safari
rec-search-ios-web.mp4
MacOS: Chrome / Safari
rec-search-web.mp4
MacOS: Desktop