-
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
Hide search input caret while search modal is animating #52659
Hide search input caret while search modal is animating #52659
Conversation
@@ -46,9 +46,10 @@ import type {AutocompleteItemData} from './SearchRouterList'; | |||
|
|||
type SearchRouterProps = { | |||
onRouterClose: () => void; | |||
hideInputCaret?: boolean; |
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.
hideInputCaret?: boolean; | |
shouldHideInputCaret?: boolean; |
/** Whether the input caret should be hidden or not */ | ||
caretHidden?: boolean; | ||
|
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.
Let's not redefine types. Use Pick<TextInputProps, 'caretHidden'>
@@ -7,9 +7,12 @@ import CONST from '@src/CONST'; | |||
import SearchRouter from './SearchRouter'; | |||
import {useSearchRouterContext} from './SearchRouterContext'; | |||
|
|||
const isMobileSafari = Browser.isMobileSafari(); |
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.
Please add a comment explaining why this is needed only for mWeb Safari
Done |
/** Whether the input caret should be hidden or not */ | ||
caretHidden?: TextInputProps['caretHidden']; |
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.
Use Pick
so we don't have to define the prop. Do it for other props that we are just forward e.g. autoFocus.
... & Pick<TextInputProps, 'autoFocus' | 'caretHidden'>
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb-chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Please complete the QA steps. Or actually just remove the "TODO" |
updated |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/pecanoro in version: 9.0.65-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.65-5 🚀
|
Explanation of Change
Hiding the input caret until the modal animation finishes.
Fixed Issues
$ #52382
PROPOSAL: #52382 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA 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
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4