-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Always call OpenReport when deeplinking within the app #15897
Always call OpenReport when deeplinking within the app #15897
Conversation
@@ -221,7 +221,7 @@ class ReportScreen extends React.Component { | |||
)} | |||
> | |||
<FullPageNotFoundView | |||
shouldShow={!this.props.report.reportID} | |||
shouldShow={!this.props.report.reportID && !this.props.report.isLoadingReportActions} |
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.
This prevents the No Access screen from showing while the OpenApp
call is loading
|
@AndrewGable 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/Videosdue to urgency i havent taken screenshots, there are videos fro Jasper in the PR body WebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
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.
Look
src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js
Outdated
Show resolved
Hide resolved
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.
👍
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.
would be nice to leave some comment for why but looking good
@@ -47,6 +48,11 @@ const AnchorRenderer = (props) => { | |||
// If we are handling a New Expensify link then we will assume this should be opened by the app internally. This ensures that the links are opened internally via react-navigation | |||
// instead of in a new tab or with a page refresh (which is the default behavior of an anchor tag) | |||
if (internalNewExpensifyPath) { | |||
if (attrPath.indexOf('r/') === 0) { |
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: should we check for this instead?
if (attrPath.indexOf('r/') === 0) { | |
if (attrPath.startsWith('r/') === 0) { |
…dDeepLinkingWithinApp Always call OpenReport when deeplinking within the app (cherry picked from commit 0553fee)
…-15897 🍒 Cherry pick PR #15897 to staging 🍒
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.2.83-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.2.83-3 🚀
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Details
This solves a problem where we don't call
OpenReport
when deeplinking from within the App.componentDidMount
never fires when you're deeplinking from within the app. OnlycomponentDidUpdate
fires, but that early returns for public reports. We could callOpenReport
incomponentShouldUpdate
, but that's an anti-pattern that could cause some unintended consequences.Therefore, this updates the AnchorRenderer to call
OpenReport
before navigating to a report within the app.Fixed Issues
$ N/A
Tests/QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.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
Web
web.mov
Mobile Web - Chrome
mweb-chrome.mov
Mobile Web - Safari
mweb-safari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mov