-
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
Fix: back handler for Drawer #5745
Conversation
One issue that I found is when we open the Workspace Settings route, it does not open the Card page at the click of the Card link. This is known to me and I am fixing it #5131 here. |
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.
Tests are looking great!
One weird Android thing I noticed: When viewing the app in the simulator, I have to press twice on any report to navigate to it. Once I navigate to a report I can close it and navigate to it again with one click, but if I close and want to navigate to a new report I have to click that report twice :( But it looks like that's also happening on main
so not caused by this 👍
Still can't merge b/c n6
hold
The PR which I mentioned in the above comment is solving this. |
@parasharrajat Sorry, which PR are you thinking will fix the issue I mentioned? |
Well, don't trust me on this. Your issue is indeed different. Didn't get a good look from Cellphone. I will check that later with your reproduction steps. |
Aah ok 😆 I'll post in #expensify-open-source to see if others saw the same issue recently |
@Beamanator Do not merge it yet. I have to test something. |
All right. It will cause two new issues.
@Beamanator What should I do now? |
@parasharrajat I just tested this fork again and noticed:
|
I looked at the diff between the versions. There are a couple of changes which can be directly the cause of our issues.
I think the first can be fixed directly in our app. We are managing the state ourself and thus we could be wrong somewhere. For 2, I am yet to analyze the changes and their effect. |
OK, @Beamanator I have to open another issue with R-navigation for 2 on the above list 👨 🔫 . It's clearly a regression from the above commit. My suggestion
We can hold the payment for all the above until this PR and other issues are fixed. What do you suggest as the best path forward? |
Great ideas @parasharrajat , I definitely like this path to move forward, and I agree that you've already completed a few milestones and we should open a few more. Here's what I'm thinking (almost exactly what you mentioned, plus one milestone you missed, and I want to confirm with Rory about #5027) Milestones / tasks completed
New milestones / tasks
About point 1 from this comment, I don't see how this is related to changes in this PR, if you can convince me then I'll absolutely be on board it's a new issue & new job |
Well. @Beamanator There are a few things that you are missing.
But I am still investigating the 2. I am looking at the code to see if this could a bug with our configuration so I will complete the repro to compare. For 1, I believe it's related as it was not happening earlier and only after these changes. I have checked the changes and the lib author has changes regarding drawer history which are causing our logic to fail. App/src/libs/Navigation/CustomActions.js Lines 75 to 87 in 550dfe6
Let me debug it further. |
@Beamanator I just fixed point 2. testing in Native Devices. Working on an easy one now 1. |
@Beamanator You would be happy to know. I have fixed both issues and We are ready to light this up.
AnalysisI looked at the code for the drawer router and come to know that it usages history to determine the Drawer Status. But when we are resetting the state, we are not sending any history for drawer status. Thus it takes the Default status. |
Updated. |
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.
Sorry, I know this has been a long PR, but these changes seem to have caused a not so great regression with navigating to a report
- Navigate to a report
- Press back button in header
- Search for a user
- Select chat
- Land on LHN instead of chat 💥
// Drawer's implementaion is buggy. Modern implementaion does not work on mobile web and legacy breaks the layout on Desktop while resizing. | ||
// For some reason, drawer never closes when opening the Drawer screen on mobile web. | ||
// So we will switch between implementations based on the device width. |
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.
// Drawer's implementaion is buggy. Modern implementaion does not work on mobile web and legacy breaks the layout on Desktop while resizing. | |
// For some reason, drawer never closes when opening the Drawer screen on mobile web. | |
// So we will switch between implementations based on the device width. | |
// On mobile web, the non legacy version of the DrawerNavigator breaks the layout on Desktop while resizing | |
// and the drawer gets stuck in an open state when navigating |
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.
Is there any issue we are tracking for this?
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.
No. I will create one.
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.
No yet, I will create one in our repo.
"babel-plugin-transform-remove-console": "^6.9.4", | ||
"babel-polyfill": "^6.26.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.
Just curious, what needed babel-polyfill
?
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.
I followed https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support. I don't know the consequences of removing this.
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.
I followed https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support. I don't know the consequences of removing this.
I kind of know what is causing this. I will look at it asap. |
Updated. Ready for review. |
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.
Nice working good now thanks!
All yours @Beamanator. |
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.
Overall the changes look great, the back button on android is working great 👍 and resizing the window in desktop & web have no regressions 👍
The only 🤷 things are:
- refreshing on web / desktop when you have a chat open, takes you back to the LHN
- As mentioned in earlier comments, you're planning to fix this in another PR, right?
- the comment below
- If you disagree with me / I'm confused, no change is necessary :D
Unfortunately, we won't be solving the #5027 (comment) anymore. But yeah It would have been solved separately. |
@Beamanator Comment updated. Ready for merge. |
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.
Thanks for all of this 💪
🚀 Deployed to staging by @Beamanator in version: 1.1.11-6 🚀
|
"react-native-reanimated": "^2.3.0-alpha.1", | ||
"react-native-reanimated": "^2.3.0-beta.3", |
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.
Hey @Beamanator @parasharrajat this change here seems to have broken the Attachment Picker for me on iOS: https://expensify.slack.com/archives/C01GTK53T8Q/p1635874753343600
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.
Hey, @kidroca this is PR is reverted now. Thanks for notifying me.
🚀 Deployed to production by @yuwenmemon in version: 1.1.12-3 🚀
|
Details
Issues
Fixed Issues
$ #4211
$ #5971
Tests | QA Steps
#4211
#5971
There are no clear instructions for testing it but I believe this PR will fix this issue due to the reason that we are using upgraded Drawer Lib. The new version has removed transformation from the View for the permanent drawer which means it should remain static.
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android