Skip to content
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

Add SCREENS constants. Navigate without linkTo from drawer component. #2387

Merged
merged 4 commits into from
Apr 14, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Apr 14, 2021

Details

Pretty weird issue, but starting to think the navigation ref linkTo() is in some cases unreliable (at least when navigating from within the drawer). Switched to passing a navigation object to the drawer component using navigationRef.navigate(screen, params) and URL handling works as intended on mobile web.

Push state issue still remains.

Fixed Issues

Fixes #2188

Tests

QA Steps

  1. Login with an account that has multiple conversations
  2. Click on one chat
  3. Verify the reportID changes in the URL
  4. Go back to the LHN
  5. Click on another chat
  6. Verify the reportID changes in the URL
  7. Verify the reportID does not quickly change back to the wrong id in the URL
  8. Re-test on all platforms to make sure navigation works normally.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron requested a review from a team as a code owner April 14, 2021 02:55
@marcaaron marcaaron self-assigned this Apr 14, 2021
@MelvinBot MelvinBot requested review from roryabraham and removed request for a team April 14, 2021 02:55
@marcaaron marcaaron marked this pull request as draft April 14, 2021 03:01
@marcaaron
Copy link
Contributor Author

Gonna throw this back into draft actually I think maybe the important bit is that we are not using the linkTo() method. Something is up with it.

@marcaaron marcaaron changed the title Add SCREENS constants. Navigate with navigation object passed to Drawer. Add SCREENS constants. Navigate without linkTo from drawer component. Apr 14, 2021
undo a few things

simplify solution

add missing return
@marcaaron marcaaron force-pushed the marcaaron-fixMobileWebUrl branch from ffc443b to 81f5858 Compare April 14, 2021 03:47
src/ROUTES.js Outdated Show resolved Hide resolved
@marcaaron marcaaron marked this pull request as ready for review April 14, 2021 03:48
@marcaaron
Copy link
Contributor Author

This one is ready for a review.

@marcaaron
Copy link
Contributor Author

There are no visual changes but I will go test this on various platforms.

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and passed testing on iOS Safari 👍

@marcaaron marcaaron merged commit dba06b5 into master Apr 14, 2021
@marcaaron marcaaron deleted the marcaaron-fixMobileWebUrl branch April 14, 2021 21:56
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 [Deployed](https://github.com/Expensify/Expensify.cash
/actions/runs/765130740) 🚀 to
staging on Mon Apr 19 2021 at 22:41:56 GMT+0000 (Coordinated Universal Time)

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented May 8, 2021

🚀 Deployed to production in version: 1.0.39-5🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URL on mobile web does not update correctly at mobile screen sizes
3 participants