-
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
set error when click outside onboarding flow #42339
set error when click outside onboarding flow #42339
Conversation
@shubham1206agra 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] |
Screen.Recording.2024-05-19.at.5.27.00.PM.mov@suneox Can you please add the similar logic too this page please? |
@shubham1206agra I would like to confirm this is an extended scope? due to the expected result only show error message at onboarding purpose and on this PR is prevented validation on |
Oh |
const handleKeyDown = useCallback((e: KeyboardEvent) => { | ||
if (e.key !== CONST.KEYBOARD_SHORTCUTS.ESCAPE.shortcutKey) { | ||
return; | ||
} | ||
OnboardingRefManager.handleOuterClick(); | ||
}, []); | ||
|
||
useEffect(() => { | ||
window?.addEventListener?.('keydown', handleKeyDown); | ||
return () => { | ||
window?.removeEventListener?.('keydown', handleKeyDown); | ||
}; | ||
}, [handleKeyDown]); |
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.
const handleKeyDown = useCallback((e: KeyboardEvent) => { | |
if (e.key !== CONST.KEYBOARD_SHORTCUTS.ESCAPE.shortcutKey) { | |
return; | |
} | |
OnboardingRefManager.handleOuterClick(); | |
}, []); | |
useEffect(() => { | |
window?.addEventListener?.('keydown', handleKeyDown); | |
return () => { | |
window?.removeEventListener?.('keydown', handleKeyDown); | |
}; | |
}, [handleKeyDown]); | |
useKeyboardShortcut(CONST.KEYBOARD_SHORTCUTS.ESCAPE, handleOuterClick, {shouldBubble: true}); |
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.
@suneox This is the shorter and cleaner version of the code.
Reviewer Checklist
Screenshots/VideosAndroid: NativeNA Android: mWeb ChromeNA iOS: NativeNA iOS: mWeb SafariNA MacOS: Chrome / SafariScreen.Recording.2024-05-20.at.5.24.57.PM.movMacOS: DesktopScreen.Recording.2024-05-20.at.5.30.36.PM.mov |
@mountiny Can you ask for translation confirmation please? |
@mountiny Can we merge this now? |
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.
@suneox Can you please confirm the translations per the classic process, thanks
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.
Thanks!
✋ 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/mountiny in version: 1.4.77-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀
|
Details
Handle show error message when click outside of the onboarding purpose screen
Fixed Issues
$ #39965
PROPOSAL: #39965 (comment)
Tests
Offline tests
QA Steps
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
Screen.Recording.2024-05-17.at.16.34.08.mov
Android: mWeb Chrome
Screen.Recording.2024-05-17.at.16.27.44.mov
iOS: Native
Screen.Recording.2024-05-17.at.16.16.40.mov
iOS: mWeb Safari
Screen.Recording.2024-05-17.at.15.54.25.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-17.at.16.20.20.mov
MacOS: Desktop
Screen.Recording.2024-05-17.at.16.19.40.mov