[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]); | ||
|
|
|
@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 |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Code looks good.
I am not able to test correctly since this requires HybridApp access.
| @@ -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.
NAB: Isn't it better to rename this to MONEY_REQUEST_CREATE_TAB_SCAN?
There was a problem hiding this comment.
Yeah, agree with this minor improvement.
|
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. |
Julesssss
left a comment
There was a problem hiding this comment.
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! |
|
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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