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

Fix the back arrow on intial Load #8067

Merged
merged 2 commits into from
Mar 10, 2022
Merged

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Mar 10, 2022

Details

Follow-up PR of #7801. I reverted this part somehow from the previous PR before merging. This is the first part of the proposal #7091 (comment).

Fixed Issues

$ #7091

Tests

  1. Open the app on a web browser.
  2. open any chat.
  3. resize the browser to mobile view.
  4. Click the back arrow to open the LHN.
  • Verify that no errors appear in the JS console

Contributor (PR Author) Checklist

  • I verified the PR has a small number of commits behind main
  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I clearly indicated the environment tests should be run in (Staging vs Production)
  • I wrote testing steps that cover success & fail scenarios (if applicable)
  • I included screenshots or videos for tests on all platforms
  • I ran the tests & verify they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
    • I followed the JSDocs style guidelines (in STYLE.md)
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I corroborated the UI performance was not affected (the performance is the same than main branch)
  • If I created a new component I verified that a similar component doesn't exist in the codebase

PR Reviewer Checklist

  • I verified the PR has a small number of commits behind main
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the testing environment is mentioned in the test steps
  • I verified testing steps cover success & fail scenarios (if applicable)
  • I checked that screenshots or videos are included for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components are not impacted by changes in this PR (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified the UI performance was not affected (the performance is the same than main branch)
  • If a new component is created I verified that a similar component doesn't exist in the codebase

QA Steps

  1. Open the app on a web browser. (do not navigate to any chat).
  2. resize the browser to mobile view (If applicable: On Web and Desktop)
  3. Click the back arrow to open the LHN.

Note: Test this PR with #7801

  • Verify that no errors appear in the JS console

Screenshots

Web

screen-2022-03-05_06.22.22.mp4

Mobile Web

screen-2022-03-06_13.34.11.mp4

Desktop

screen-2022-03-06_13.27.57.mp4

iOS

screen-2022-03-06_13.20.18.mp4
screen-2022-02-23_01.19.17.mp4

Android

screen-2022-03-06_12.01.23.mp4

@parasharrajat parasharrajat requested a review from a team as a code owner March 10, 2022 17:37
@MelvinBot MelvinBot requested review from thienlnam and removed request for a team March 10, 2022 17:37
@parasharrajat
Copy link
Member Author

@thienlnam This PR needs to go before awaiting PROD deploy so that it can be tested on next QA cycle with the main PR.

@thienlnam
Copy link
Contributor

@parasharrajat Good point, I'll prioritize this review then. Taking a look now

Copy link
Contributor

@thienlnam thienlnam left a comment

Choose a reason for hiding this comment

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

Changes look good, only have a small comment regarding comments and possibly a link

Testing steps need to be updated to be specific about which platforms need to be tested

Since you can only resize web and (maybe desktop?): It should indicate that we're checking resizing in those and in the rest of the platforms just verify that navigation around the app works

Comment on lines 45 to 48
// calculate the defaultStatus only once on mount to prevent breaking the navigation internal state.
// Directly passing the dynamically calculated defaultStatus to drawer Navigator breaks the internal state
// And prevents the Drawer actions from reaching to action Drawer Navigation while screen is resized on from Web to mobile Web.
defaultStatus: Navigation.getDefaultDrawerState(props.isSmallScreenWidth),
Copy link
Contributor

Choose a reason for hiding this comment

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

Small comments here:

// Calculate

Can you link to an issue regarding comment #2 if it exists?

// Prevents drawer action

Copy link
Member Author

Choose a reason for hiding this comment

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

I will update it after your testing. But I don't have any links to the issue that I have mentioned here. Here is the explanation Why.

This component uses a key prop to remount the navigator when the browser resizes. This hack was done to prevent the layout from breaking on the drawer. Now due to that, it is somehow breaking the internal navigation state on change of defaultStatus. Rest of the explanation is in linked proposal.

@thienlnam
Copy link
Contributor

Screen Shot 2022-03-10 at 11 55 31 AM

Also ?? 😕

@parasharrajat
Copy link
Member Author

parasharrajat commented Mar 10, 2022

I don't know about this. Maybe, you have write access that's why you see this. the commit is actually from the forked repo and I am making a PR from fork to this repo. If you are seeing this first time, it is possible that Github added this feature recently.

@thienlnam
Copy link
Contributor

thienlnam commented Mar 10, 2022

Hmm, it doesn't show up on your other commits from different PRs so I'm not sure what's happening. I'm noticing this is working off the merged branch, did you rebase master? (Maybe won't make a difference but mind merging in main after your next commit for comments?)

@parasharrajat
Copy link
Member Author

Yeah, I used the old branch from the previous PR so maybe it is picking up that branch again as that was not deleted from newDot repo. it is up-to-date with main.

@thienlnam
Copy link
Contributor

Verified testing, just the small comments above left!

@parasharrajat
Copy link
Member Author

Changes done.

Copy link
Contributor

@thienlnam thienlnam left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@thienlnam thienlnam merged commit b8543d2 into Expensify:main Mar 10, 2022
@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 to staging by @thienlnam in version: 1.1.42-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀

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

@marcaaron marcaaron mentioned this pull request May 18, 2022
89 tasks
@parasharrajat parasharrajat deleted the back-arrow branch November 20, 2023 13:08
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.

3 participants