Navigate to correct report on push notification tap#8353
Conversation
|
Ok updated, ready for reviews. |
|
Bump @roryabraham or @marcaaron for a review please! |
marcaaron
left a comment
There was a problem hiding this comment.
Mostly have a question or two here, but changes look good.
| */ | ||
| function isReady() { | ||
| return navigationRef.isReady(); | ||
| } |
There was a problem hiding this comment.
noting: we have a usage of navigationRef.isReady() in the canNavigate() method. Looks like they're kind of doing the same thing - but one is logging if we aren't ready. Is that something we should use instead of creating a new method?
There was a problem hiding this comment.
👍 - I can use canNavigate instead
| Navigation.navigate(ROUTES.getReportRoute(reportID)); | ||
| } else { | ||
| // Navigation container is not yet ready, use deeplinking to open to correct report instead | ||
| Navigation.setDidTapNotification(); |
There was a problem hiding this comment.
I'm trying to remember why we have setDidTapNotification(), but can't quite recall. Is it not something we need in the first part of this if/else and only when we are using deep linking? Maybe we can leave a comment if it's not too hard to figure out.
There was a problem hiding this comment.
IIRC the reason we have setDidTapNotification is:
// Navigation container is not yet ready, use deeplinking to open correct report instead.
// By default, the main drawer will start in the open state when the navigation container mounts.
// So you'll see the LHN, but we instead want to link to a specific report.
// We use the `setDidTapNotification` flag here to force the main drawer to mount in the closed state.
Co-authored-by: Marc Glasser <marc.aaron.glasser@gmail.com>
|
I didn't have time to test this but don't want to block. Code LGTM so I'm merging. |
|
✋ 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 @roryabraham in version: 1.1.52-0 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.1.52-0 🚀
|
Details
Tweaks the navigation for push notifications to navigate to the correct report when a push notification is tapped.
Fixed Issues
$ #6079
Tests
PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Screenshots
iOS
RPReplay_Final1648752525.MP4