-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 2023-09-21] [$500] [Distance] - There is NO animation of the transition when I have entered start and finish points #26723
Comments
Triggered auto assignment to @puneetlath ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - There is NO animation of the transition when I have entered start and finish points. What is the root cause of that problem?The line App/src/components/DistanceRequest.js Line 174 in 8150ce0
What changes do you think we should make in order to solve the problem?We should modify App/src/components/DistanceRequest.js Line 174 in 8150ce0
scrollViewRef.current.scrollTo({y:height, animated: true});
Solution WorkingScreen.Recording.2023-09-04.at.4.40.43.PM.movWhat alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.There is NO animation of the transition when I have entered start and finish points What is the root cause of that problem?We are using usePrevious hook to save the previous waypoint. When this component is re-render 2 times, for example, waypoints are 2. The first re-rendering Waypoints is updated to 3 and previousWaypoints is updated to 2, the second re-rendering Waypoints is not updated but the previousWaypoints still updated to 3 (the value of Waypoints in the first time). It causes that numberOfWaypoints = numberOfPreviousWaypoints App/src/components/DistanceRequest.js Lines 173 to 175 in 6b1a667
scrollToEnd function is not called because numberOfWaypoints = numberOfPreviousWaypoints What changes do you think we should make in order to solve the problem?App/src/components/DistanceRequest.js Lines 173 to 175 in 6b1a667
In here, we can remove the condition numberOfWaypoints > numberOfPreviousWaypoints Screen.Recording.2023-09-05.at.15.30.44.movWhat alternative solutions did you explore? (Optional)We only update numberOfPreviousWaypoints if numberOfWaypoints changed
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Adding a new stop to the distance request didn't scroll the waypoint list to the bottom. This issue only happens if we fill in at least 2 valid waypoints. What is the root cause of that problem?Adding a new stop will increase the number of waypoints. We use ScrollView App/src/components/DistanceRequest.js Lines 172 to 177 in 1223e1e
The failing condition in our case is
App/src/components/DistanceRequest.js Lines 85 to 88 in 1223e1e
However, App/src/components/DistanceRequest.js Lines 155 to 161 in 1223e1e
App/src/components/DistanceRequest.js Line 97 in 1223e1e
So let's say we have 2 valid waypoints, then we add a new stop. That's why the issue only happens when we have at least 2 valid waypoints. What changes do you think we should make in order to solve the problem?I think checking the ScrollView content height changes is unnecessary. Adding a new stop will always increase the content height. I believe what we want is to always scroll to the bottom every time we add a new stop, so both my main and alternative solutions will not depends the content height value. The simplest solution is to scroll to the bottom on every "Add stop" button click. Transaction.addStop(iou.transactionID).then(/** scroll to bottom **/);
What alternative solutions did you explore? (Optional)Scroll to the bottom immediately when the number of waypoints is changed. useEffect(() => {
if (numberOfWaypoints > numberOfPreviousWaypoints) {
scrollViewRef.current.scrollToEnd({animated: true});
}
}, [numberOfWaypoints, numberOfPreviousWaypoints]); |
Job added to Upwork: https://www.upwork.com/jobs/~0116cd2b0228d37197 |
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
@jjcoffee thoughts on the proposals so far? |
@jscardona12's proposal lacks enough detail to fully review - there's no "why" in either the RCA or the proposed solution. Maybe the solution works (as the video demonstrates), but we'd want to be sure we're actually fixing a problem, not just making something work without understanding what we're doing. @DylanDylann's proposal has the correct RCA ( @bernhardoj's proposal - love the level of detail and clarity here! The RCA is correct too, but also explains why the behaviour happens only once you add the start and finish points. I agree with him that we always want to scroll to the bottom when a new waypoint is added, regardless of To summarise, happy to go with @bernhardoj's alternative solution! 🎀👀🎀 C+ reviewed |
Current assignees @puneetlath and @arosiclair are eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@bernhardoj's alternate solution LGTM too 👍 |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @jjcoffee |
🎯 ⚡️ Woah @jjcoffee / @bernhardoj, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 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 2023-09-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
|
All 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!
Issue found when executing PR #26610
Action Performed:
Expected Result:
Should be an animation of the transition of the list elements to the end
Actual Result:
There is NO animation of the transition of the list elements to the end
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.63-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Bug6188423_Recording__6138.3.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: