-
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
[HybridApp] Add shortcut support in HybridApp #48780
[HybridApp] Add shortcut support in HybridApp #48780
Conversation
const {initialURL} = useContext(InitialURLContext); | ||
|
||
useEffect(() => { | ||
if (!NativeModules.HybridAppModule || !initialURL || !initialURL.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { | ||
return; | ||
} | ||
|
||
Navigation.isNavigationReady().then(() => { | ||
Navigation.navigate(initialURL); | ||
}); | ||
}, [initialURL]); | ||
|
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.
❤️
@aimane-chnaif 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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.
I am not able to test correctly since this requires HybridApp
access.
src/ROUTES.ts
Outdated
@@ -1425,6 +1425,8 @@ const ROUTES = { | |||
const HYBRID_APP_ROUTES = { | |||
MONEY_REQUEST_CREATE: '/request/new/scan', | |||
MONEY_REQUEST_SUBMIT_CREATE: '/submit/new/scan', |
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: Isn't it better to rename this to MONEY_REQUEST_CREATE_TAB_SCAN
?
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.
Yeah, agree with this minor improvement.
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.
Updated! 😄
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
We did not find an internal engineer to review this PR, trying to assign a random engineer to #47469 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@staszekscp looking at the video at the OP, did you action on this one? I can still see
|
Just holding on this. |
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 work, just holding on two comments above
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@trjExpensify @Julesssss Yeah, I've tested the Just FYI, because I've noticed you've fired an ad-hoc build: The shortcuts work only on HybridApp, since there is no support in ND yet (it requires some additional native changes) w_5c033b370f343327a18046afe597cc6e3b2a7d27-2024-09-10.12_29_48.834.mp4w_02412833f2192bece42b2429357b5fb5feb90fba-2024-09-10.12_29_41.456.mp4 |
Right, but the button label is still showing as |
Oh, sorry! I've missed that! In that case, we'll have to change it in the |
@trjExpensify The PR fixing the label is opened! |
Excellent, 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.
Perfect
Linked PR mentioned above is also merged 👍 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
cc: @AndrewGable
Details
The PR fixes shortcuts on HybridApp
Fixed Issues
$ #47469
PROPOSAL: N/A
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
w_7885f0c3711c0af5eada7f0a4285608f992a8ff8-2024-09-09.12_28_52.432.mp4
Android: mWeb Chrome
N/A
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-09-09.at.14.26.10.mp4
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A