-
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
[HOLD for payment 2022-03-22] [$1,000] Back arrow on chat doesn't work after decreasing the browser size - Reported by @Tushu17 #7091
Comments
Triggered auto assignment to @yuwenmemon ( |
@parasharrajat I think this issue is a side effect of this PR #6356 |
Ok. Thanks for pointing out @kakajann. Let this issue be triaged and we can find a solution. |
Triggered auto assignment to @bfitzexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @thienlnam ( |
I have been looking into this issue. The bug is coming from From the docs:
Please let me know if this proposal sounds good so I can take on the job. |
Would you like to link some code in our app? So that I know which component are you talking about? |
|
Ok, Thanks.
I don't think this is correct. |
I tested the code and it's working just fine. |
https://www.awesomescreenshot.com/video/6823807?key=90ed83be4bafc44948931864ee2bffba |
ProposalAfter debugging I found out that changing the it is happening when we remount the navigator and change the we need remounting to fix the layout issues when the browser is resized. So to fix this issue, we have to make sure that we don't update the const BaseDrawerNavigator = (props) => {
const [defaultStatus] = useState(Navigation.getDefaultDrawerState(props.isSmallScreenWidth));
const content = (
<Drawer.Navigator
backBehavior="none"
key={`BaseDrawerNavigator${props.isSmallScreenWidth}`}
defaultStatus={defaultStatus} I will use the class component. I can tell that @brianmuks was close to finding the solution and his proposal, discussed about But I consider his contributions to be valuable. I would like to fix this issue cc: @thienlnam (Some discussion about the issue ) 🎀 👀 🎀 C+ reviewed and proposed. |
Thanks for the proposal and the comment @parasharrajat. I've looked over your proposal and it looks good, and I agree that @brianmuks was close to finding the solution and had an investigation that proved useful to your proposal. With that being said, @parasharrajat You have the 🟢 from me to start on the PR and @brianmuks we're discussing a compensation for your efforts towards the solution |
@thienlnam thanks for your consideration. |
Update: I think the solution that I found is not sufficient. It does not work on the Desktop. I will debug more. But for now, I retract my review. |
It looks like this issue is back on the table and ready to take more proposals. @bfitzexpensify Could we get this doubled? |
You bet - doubled to $1,000. |
Updated Proposal:I spent more time debugging this. I found out the real cause of the issue. The issue is caused by the wrong drawer history App/src/libs/Navigation/CustomActions.js Lines 104 to 108 in 0e3bbe7
This history is used to close the drawer when we navigate to the report screen so that users don't see LHN instead of chats. But this logic is incorrect. // Force drawer to close
// https://github.com/react-navigation/react-navigation/blob/94ab791cae5061455f036cd3f6bc7fa63167e7c7/packages/routers/src/DrawerRouter.tsx#L142
const hasDrawerhistory = _.find(state.history || [], h => h.type === 'drawer');
if (!hasDrawerhistory || currentState.type !== 'drawer') {
history.push({
type: 'drawer',
// If current state is not from drawer navigator then always use closed status to close the drawer
status: currentState.type !== 'drawer' || currentState.default === 'open' ? 'closed' : 'open',
});
} React-navigation usage following logic to close the drawer and we should use the same. https://github.com/react-navigation/react-navigation/blob/94ab791cae5061455f036cd3f6bc7fa63167e7c7/packages/routers/src/DrawerRouter.tsx#L142 According to this,
In the change above, I am doing the following:
I have tested it in the following scene:
It works well. I found this solution after going through many iterations. |
@parasharrajat The proposal looks good to me, thanks for the thorough explanation! |
PR is ready. |
@bfitzexpensify I've just merged the PR, leaving this note here for you once the PR is deployed and the regression period is complete Tushu17 - Reporting payout - $250 |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.42-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2022-03-22. 🎊 |
Looks like the posts expired because they were posted a while back. Have recreated them: @brianmuks please apply here @parasharrajat please apply here |
I have done so thanks. |
Thanks! OK, all paid out and complete. Thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
User should be able to use Back button
Actual Result:
User is unable to use back button. User has to resize browser back to navigate to LHN
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.26-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
screen-capture.A.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Tushu17
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1640369999109800
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: