You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-01-17] [$500] Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor #33460
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 1.4.15-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Go to request details view of IOU/task report
Click on any field to open RHP
Double click outside RHP
Expected Result:
User stays on the same page
Actual Result:
User is returned to previous page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor[/-][+][$500] Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor[/+]on Dec 21, 2023
What changes do you think we should make in order to solve the problem?
We should not create the new state to prevent unnecessary re-renders. Beside, onPress is called async so the state may not be updated before the second call
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@thesahindia] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@thesahindia] Determine if we should create a regression test for this bug.
[@thesahindia] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
@thesahindia can you please provide details on why @tienifr 's proposal was selected above others that were posted before? Thx
For such minor issues I also look for small details. Since @tienifr suggested the correct implementation details I preferred going with them. Also they added the reason for not using the state and it shows they tested things thoroughly.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor[/-][+][$500] Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor[/+]melvin-bot commentedon Dec 21, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b870d525be430c1d
melvin-bot commentedon Dec 21, 2023
Triggered auto assignment to @mallenexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 21, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 21, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)gijoe0295 commentedon Dec 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Double clicking overlay navigates back.
What is the root cause of that problem?
This happens to all RHP screens.
We navigate back on pressing the
Overlayhere:App/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Line 26 in ad634d1
Since
Overlayis wrapped in an animated view, it may not unmount yet, causingonPressto be triggered twice on double clicking.What changes do you think we should make in order to solve the problem?
We should create a state/ref to check if
onPresshas already been triggered before inOverlay. This is to avoid future issues if we reusedOverlay.What alternative solutions did you explore? (Optional)
NA
ZhenjaHorbach commentedon Dec 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - IOU & Task - User is redirected to previous page when double clicking outside RHP editor
What is the root cause of that problem?
The main problem is that when we click on Overlay
We have time to do it again
As a result we navigate back again
App/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Line 25 in ad634d1
What changes do you think we should make in order to solve the problem?
We just need to bind the overlay to the navigation state
And as soon as we press on Overlay the first time
The RHP will be out of focus
And we won't be able to reuse the overlay
App/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Line 25 in ad634d1
What alternative solutions did you explore? (Optional)
NA
tienifr commentedon Dec 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Task - User is redirected to previous page when double clicking outside RHP editor
What is the root cause of that problem?
When press outside RHP, the overlay is not close immediately, so users can press 2 or even more times on overlay
-> navigation.goBack is called many times
App/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Line 25 in ad634d1
What changes do you think we should make in order to solve the problem?
We should not create the new state to prevent unnecessary re-renders. Beside, onPress is called async so the state may not be updated before the second call
Solution 1: Just create the new ref
Solution 2: We can edit the hook useSingleExecution
Currently this hook is not supported on web, we can change it as blow
gijoe0295 commentedon Dec 22, 2023
Using
useSingleExecutionfor Web can cause this issue: #24482 (comment). I think we should note this in source file to avoid future issues.22 remaining items
melvin-bot commentedon Jan 10, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
melvin-bot commentedon Jan 19, 2024
@blimpich, @mallenexpensify, @thesahindia, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Jan 24, 2024
@thesahindia can you please address my question above?
#33460 (comment)
@thesahindia can you also plz complete the regression test steps?
Contributor: @tienifr paid $500 via Upwork
Contributor+: @thesahindia owed $500 via NewDot
melvin-bot commentedon Jan 29, 2024
@blimpich, @mallenexpensify, @thesahindia, @tienifr Huh... This is 4 days overdue. Who can take care of this?
thesahindia commentedon Jan 29, 2024
For such minor issues I also look for small details. Since @tienifr suggested the correct implementation details I preferred going with them. Also they added the reason for not using the state and it shows they tested things thoroughly.
thesahindia commentedon Jan 29, 2024
Not sure if there's any PR that is responsible for this, I think we can skip the checklist.
We don't need to add a test case. It's a normal flow and the expected behaviour is obvious.
mallenexpensify commentedon Jan 30, 2024
Thanks @thesahindia !
JmillsExpensify commentedon Apr 10, 2024
$500 approved for @thesahindia