-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 #17662] [$1000] Double sliding animation on Send/Request money #17710
Comments
Triggered auto assignment to @MitchExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
@mountiny @luacmartins Just sharing my thoughts for this. It looks like this is regression from this PR #16919 Which modified src/pages/iou/MoneyRequestModal.js line 116 from So this the root cause of this problem. If we set |
Yeah this is a valid problem |
Job added to Upwork: https://www.upwork.com/jobs/~01e04e92b347a09af4 |
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Triggered auto assignment to @puneetlath ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Whenever go to send/request money flow, it will show sliding animation two times i.e. first time when initial loader shows, and thereafter when transition end. What is the root cause of that problem?We can see at line 375 it shows App/src/pages/iou/MoneyRequestModal.js Lines 375 to 380 in 1cd304c
During component load here is the state for App/src/pages/iou/MoneyRequestModal.js Lines 116 to 117 in 1cd304c
Directions are decided based on the functions below: App/src/pages/iou/MoneyRequestModal.js Lines 166 to 189 in 1cd304c
So here during component load it will trigger the third condition i.e. line 178 as shown in code above. So this is the root cause of the problem. What changes do you think we should make in order to solve the problem?We can to set // const [previousStepIndex, setPreviousStepIndex] = useState(-1); // Old
const [previousStepIndex, setPreviousStepIndex] = useState(0); // Updated This will solve the issue as shown in result video. What alternative solutions did you explore? (Optional)We can keep const [previousStepIndex, setPreviousStepIndex] = useState(-1);
const [currentStepIndex, setCurrentStepIndex] = useState(0);
const direction = useMemo(() => {
...
if (previousStepIndex === amountIndex && currentStepIndex === confirmIndex) {
return 'out';
}
if (previousStepIndex === -1 && currentStepIndex === 0) { // *** Add if condition here ***
return null;
}
...
// Doesn't animate the step when first opening the modal
// if (previousStepIndex === currentStepIndex) { // *** Remove this if condition as it is not need ***
// return null;
// }
}, [previousStepIndex, currentStepIndex, steps]); ResultsWeb.mp4 |
The confirmation page animation is also wrong it slides from the right. That should only be the behavior when editing a field. |
@chiragxarora mind applying to the Upwork job for eventual reporting payment? Thank you! |
Hi @MitchExpensify |
Nope just apply so I know your Upwork profile, easy! @chiragxarora 👍 |
Done! |
@PrashantMangukiya Thanks for the proposal. Your RCA makes sense. But I think we need to understand why such change was required. @yuwenmemon Was there any reason to change the default |
@luacmartins |
ProposalPlease re-state the problem that we are trying to solve in this issue.There're 2 problems here regarding the animation:
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
If true, it will return App/src/pages/iou/MoneyRequestModal.js Line 186 in 214658e
previousStepIndex to be equal to currentStepIndex .
We cannot set App/src/pages/iou/MoneyRequestModal.js Line 234 in 214658e
previousStepIndex -1 is relied on in the navigation logic.
Currently what we do is:
I suspect the reason for that is that we're using the same UI for both steps. We need to change to:
What alternative solutions did you explore? (Optional)NA |
Looks like something related to As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our Feel free to drop a note in #expensify-open-source with any questions. |
@s77rt here are the steps to reproduce and a video. If we agree that it's an issue, I can edit the OP to include this.
bug.mov |
@luacmartins Yes, let's add that. |
Cool, added to the OP. |
Still on hold. |
Moving to Weekly while it's on hold. |
Still on hold. |
Still on hold. |
Same ^ |
Same ^ |
Same ^ but getting close |
Going to un-assign myself for now, per the new process. |
#17662 is resolved. This issue is no longer reproducible. Can we close this? (or do we need to pay the bug reporter in this case?) |
Yes :) |
@MitchExpensify this is fixed now |
Reporting bonus paid! 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:
Additionally:
bug.mov
Expected results:
Single sliding animation like in other components like new chat, new group
Actual results:
Double sliding animation
Confirmation page animation should be consistent.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.2
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
Notes/Photos/Videos: Any additional supporting documentation
bandicam.2023-04-19.14-36-34-321.mp4
Recording.284.mp4
Expensify/Expensify Issue URL:
Issue reported by: @chiragxarora
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681895092997009
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: