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:: Account details stuck in RHN when switching chats #7725

Merged
merged 4 commits into from
Feb 17, 2022

Conversation

hiteshagja
Copy link
Contributor

@hiteshagja hiteshagja commented Feb 14, 2022

@chiragsalian @parasharrajat

Details

Re-written navigateBackToRootDrawer method to resolve #6720 and related issues if any.

Fixed Issues

$ #6720

Tests

By far I have checked following routes and they worked as expected.
bank-account - working
settings - working
settings/profile - working
settings/preferences - working
settings/security - working
settings/security/closeAccount - working
settings/security/password - working
settings/about - working
settings/about/app-download-links - working
settings/payments - working
settings/payments/add-paypal-me - working
settings/payments/add-debit-card - working
settings/payments/add-bank-account - working
settings/payments/transfer-balance - working
settings/payments/choose-transfer-account - working
new/group - working
new/chat - working
r/:reportID - working
iou/request - working
iou/request/:reportID - working
iou/split - working
iou/split/:reportID - working
iou/send - working
iou/split/currency - working
iou/split/currency/:reportID - working
iou/send/currency - working
iou/send/add-bank-account - working
iou/send/add-debit-card - working
iou/send/enable-payments - working
iou/details/add-bank-account - working
iou/details/add-debit-card - working
iou/details/enable-payments - working
iou/details/${chatReportID}/${iouReportID} - working
search - working
details?login=${encodeURIComponent(login)} - working
r/:reportID/participants - working
r/${reportID}/participants/details?login=${encodeURIComponent(login)} - working
r/:reportID/details - working
r/:reportID/settings - working
iou/send/currency/:reportID - working

QA Steps

Here are many of the routes which I checked with following steps

  1. Home -> go to any report -> click on header -> open detail -> ctrl+K -> search -> select any report

  2. Home -> ctrl+k -> search -> select any report

  3. Home -> click on search icon -> search -> select any report

  4. Home -> click on groupReport -> click on header -> open group detail -> click on any member of group profile -> detail open -> ctl+k -> search -> select any report

  5. Home -> click on profile -> setting -> ctrl + k -> search -> select any report

  6. Home -> click on plus icon -> start new chart -> ctrl + k -> search -> select any report

  7. Home -> click on plus icon -> split bill -> enter amount -> select user -> split

  8. Home -> setting -> change password -> update password

  9. Home -> setting -> Profile -> update Profile

  10. Home -> setting -> workspace -> general setting -> click on header (?) -> get assistance -> chat with concierge

  11. Home -> setting -> workspace -> click on more(3 dot) on header -> delete workspace

Tested On

  • Web
  • Android
  • iOS
  • Desktop

Screenshots

Web

Untitled.2.mp4

Android

Untitled.mp4

iOS

ios-expensify_xdLqyc9d.mov

Desktop

expensifyDesktopApp.mp4

@hiteshagja hiteshagja requested a review from a team as a code owner February 14, 2022 05:27
@MelvinBot MelvinBot requested review from chiragsalian and parasharrajat and removed request for a team February 14, 2022 05:27
@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@hiteshagja
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Please add Screenshots/clips for all platforms. It is a must. Add QA and testing steps to test this change.
As this change affects the whole app. Please be detailed in your QA steps and cover most of the different navigation cases. LHN, RHN, two Side-modals as per the issue, etc.

Don't forget to sign your commits.

Comment on lines 22 to 29
const activeState = getActiveState();
navigationRef.current.dispatch({
...StackActions.popToTop(),
target: activeState.key,
Copy link
Member

Choose a reason for hiding this comment

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

Please add a descriptive comment about what is happening here. And also mention why does this works and when will it not work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Code comment added.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Please sign your commits and add videos for all platforms and tick those checkboxes in the template.

/**
* @returns {Object}
*/
function getActiveState() {
Copy link
Member

Choose a reason for hiding this comment

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

There is a duplicate method for this....Please remove the other one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks rajat. Just wanted to add to remember to always test your PR before putting it out for review. If you test the current code on ios you'll see,
image

which would quickly guide you to remove the extra method. Additionally, if you need more time you can always create a draft PR first without any assignees such that once its ready for review you can click on the ready for review button and it will then auto assign the reviewers.

Comment on lines 24 to 25
//Dispatch "popToTop" action takes you back to the first screen in the stack at the same time
//it will prevent bubbling of action and limit it to activeState by specifing target.
Copy link
Member

@parasharrajat parasharrajat Feb 14, 2022

Choose a reason for hiding this comment

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

Suggested change
//Dispatch "popToTop" action takes you back to the first screen in the stack at the same time
//it will prevent bubbling of action and limit it to activeState by specifing target.
// To navigate to the main drawer route, pop to the first route on the Root Stack Navigator as the main drawer is always the first route that is activated.
// It will pop all fullscreen and RHN modals that are over the main drawer.
// It won't work when the main drawer is not the first route of the Root Stack Navigator which is not the case ATM.

@chiragsalian
Copy link
Contributor

chiragsalian commented Feb 14, 2022

Also @parasharrajat, locally i removed the extra getActiveState and tested the flow mentioned here.

Is this the correct expectation?
https://user-images.githubusercontent.com/14356145/153959753-7726a35e-bb8b-46e8-9910-e5b3626a5dd5.mov

@parasharrajat
Copy link
Member

parasharrajat commented Feb 15, 2022

@hiteshagja You would have to sign all of your commits before we can merge this. Also, a test on each platform is required. Please add the remaining platforms back to the description and tick them when tested.

@parasharrajat
Copy link
Member

@chiragsalian It does not seem like Be taken to directly NewDot setup bank account page is passing from your steps. But this Pr only affects going back to the main drawer which can be seen working in your video. So I think it is a pass.

As a side note, we should look at why we are not landing on the bank page(if It should). I am actually sure what is that feature. Maybe Rory can help here. But this is surely out of scope of this PR.

@hiteshagja hiteshagja force-pushed the 6720 branch 3 times, most recently from 1c9ec59 to 7749bb4 Compare February 15, 2022 12:37
@hiteshagja
Copy link
Contributor Author

@hiteshagja You would have to sign all of your commits before we can merge this. Also, a test on each platform is required. Please add the remaining platforms back to the description and tick them when tested.

@parasharrajat I am testing for iOS for now and will update you for the same. Also I tried to sign old commits but command didn't work in 6720 branch with some strange reason. However, it's working fine if I create new branch.

So, shall I close this repo and create new branch with single commit in it and raise new PR?

@parasharrajat
Copy link
Member

parasharrajat commented Feb 15, 2022

There is a small command to sign existing commits https://superuser.com/a/1123928/1035336. I don't think it is a good idea to close this PR and create new ones. We have discussed some important stuff here.

During the rebase please merge the duplicate commits as well. I see there are some on this PR.

let me know if you have some trouble with it.

@hiteshagja
Copy link
Contributor Author

There is a small command to sign existing commits https://superuser.com/a/1123928/1035336. I don't think it is a good idea to close this PR and create new ones. We have discussed some important stuff here.

During the rebase please merge the duplicate commits as well. I see there are some on this PR.

let me know if you have some trouble with it.

Thanks!

signed all commits.

parasharrajat
parasharrajat previously approved these changes Feb 15, 2022
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

LGTM.

cc: @chiragsalian.

Leaving final testing to Chirag.

🎀 👀 🎀 C+ reviewed

@hiteshagja
Copy link
Contributor Author

Shall I commit for that lint error?

@parasharrajat
Copy link
Member

Yes. Thanks.

Copy link
Contributor

@chiragsalian chiragsalian left a comment

Choose a reason for hiding this comment

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

LGTM

@chiragsalian chiragsalian merged commit 4b04f73 into Expensify:main Feb 17, 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.

@hiteshagja
Copy link
Contributor Author

@parasharrajat , just wanted to check, in which upwork job I have to submit my proposal?

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @chiragsalian in version: 1.1.40-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Mar 1, 2022

🚀 Deployed to production by @yuwenmemon in version: 1.1.40-2 🚀

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

@Stutikuls
Copy link

Stutikuls commented Mar 8, 2022

Issue 1 -

Title-[Medium] Chrome + Jaws: Screen reader : Focus does not lands on the new expanded content after activating the setting control.
Actual - Focus does not lands on the new expanded content of the setting control, focus moves to the next element (List elements) after activating the setting control.
Expected - After activating the setting control focus lands on the close(X) button of the new expanded window.
WCAG failure - 2.4.3
Reproducible in staging?: - Yes
Version Number: - v1.1.40-2
Platforms - Web(Chrome + Jaws), Desktop(MAC)

7725_Focus.does.not.lands.on.the.expanded.conent.mp4

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.

[HOLD for payment 2022-03-08] [$500] Account details stuck in RHN when switching chats
5 participants