-
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
Desktop - Chat - Infinite loading displayed on selected chat when navigate to RHP with deeplink #33225
Conversation
@narefyev91 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] |
@ikevin127 can you please also add videos for other platforms - to be sure - that all of them running fine |
src/libs/actions/Report.ts
Outdated
// When deep-linking to desktop app with `transition` route we don't want to call navigate | ||
// on the route because it will display an infinite loading indicator. | ||
// See issue: https://github.com/Expensify/App/issues/33149 | ||
if (getPlatform() === CONST.PLATFORM.DESKTOP && route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { |
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.
we should not use platform specific code
If you want to have something just only for desktop - you can create a function openReportFromDeepLink with .desktop.ts and index.ts - and use it in this file
ex. src/libs/getPlaidDesktopMessage
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.
@narefyev91 Moved the logic to platform-dependent files:
- @libs/actions/OpenReportFromDeepLink/index.ts
- @libs/actions/OpenReportFromDeepLink/index.desktop.ts
they are located in @libs/actions/...
because the openReportFromDeepLink
function performs Onyx.set()
which would throw lint error if placed in @libs/...
because of the eslint rule:
eslint(rulesdir/prefer-actions-set-data)
_
I also added videos for all platforms as discussed.
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.
Yup seems too many same logic goes in files
Can we just extract if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) this for a specific function nameOfFunction.desktop.ts? and all other code will stay at it is? @ikevin127
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.
@narefyev91 Sure, I think this way is better because there's no duplicated logic.
I created an action that checks if shouldSkipDeepLinkNavigation
, platform-dependent:
@libs/shouldSkipDeepLinkNavigation/index.desktop.ts
(implementation logic)@libs/shouldSkipDeepLinkNavigation/index.ts
(no-op, returns false)
Let me know if this needs any other changes!
…igate to RHP with deeplink
Reviewer Checklist
Screenshots/VideosDesktop8mb.video-ACm-FxfhX2n3.mp4 |
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!
🎀 👀 🎀 C+ reviewed
LGTM 👍 |
✋ 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/lakchote in version: 1.4.15-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.15-5 🚀
|
Details
We make sure that the transition route passed from the main electron process (desktop app) is NOT called by the navigator once we are transitioned to the desktop app.
Fixed Issues
$ #33149
PROPOSAL: #33149 (comment)
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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)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.2023-12-20.at.10.30.04.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
Screen.Recording.2023-12-20.at.10.58.06.mov
iOS: mWeb Safari
Screen.Recording.2023-12-20.at.10.59.46.mov
MacOS: Chrome / Safari
Screen.Recording.2023-12-20.at.11.01.51.mov
MacOS: Desktop
Screen.Recording.2023-12-15.at.18.51.24.mov