Restore transaction when not saving distance in edit page#32334
Conversation
|
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@hoangzinh Updated. |
@dukenv0307 the text "revert" in the title is scary. It usually means revert a PR or something. Can we change it to "Restore original transaction when..." |
|
Make sense. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-04.at.20.54.48.android.mp4Android: mWeb ChromeScreen.Recording.2023-12-04.at.20.34.51.-.android.chrome.moviOS: NativeScreen.Recording.2023-12-04.at.20.30.36.-.ios.mp4iOS: mWeb SafariScreen.Recording.2023-12-04.at.20.32.43.-.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2023-12-04.at.20.22.41.-.web.mp4MacOS: DesktopScreen.Recording.2023-12-04.at.20.28.47.-.desktop.mp4 |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks pretty good, but I have some questions. Could you pleas also test the distance edit flow after creation to make sure there are no regressions?
| if (!isEditing) { | ||
| if (!isEditingNewRequest) { |
There was a problem hiding this comment.
I don't understand this change, would you please explain it and include a comment in the code?
There was a problem hiding this comment.
@neil-marcellini We add isEditingNewRequest prop in NewDistanceRequestPage to centralize the onSubmit logic on this page so we replace all isEditing with isEditingNewRequest.
There was a problem hiding this comment.
Ok yes I understand isEditingNewRequest is true when we click the distance field from the confirmation screen while creating a new request. This condition is deciding whether to return only content, or to wrap it with a screen wrapper and header. We don't need the header for the new distance request page, nor for the editing request page, but we are missing a header when editing a new distance request with the current change 😕

There was a problem hiding this comment.
@neil-marcellini Not see any header is missing from my testing.
web21.mov
|
@neil-marcellini I tested the edit flow locally before creating the PR. Should we add the test step for edit flow here? |
Yes please. We should test flows that might break in relation to our changes, and editing an existing distance request could certainly be effected. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Thanks for the updates. Looks like we need a few more changes. I also found a bug. Please test all related flows with test steps and videos.
|
@neil-marcellini Can you share the bug which you found? |
|
|
@neil-marcellini Updated test steps and videos. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Ok I tested again and it's working great 🚀
new-edit-1080.mov
existing-edit-1080.mov
existing-edit-1080.mov
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.11-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀
|
Details
Restore transaction when not saving distance in edit page
Fixed Issues
$ #31816
PROPOSAL: #31816 (comment)
Tests
Offline tests
None
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android-1.mov
android-1.mov
Android: mWeb Chrome
Screen.Recording.2023-12-01.at.15.27.35.mov
chrome-1.mov
iOS: Native
Screen.Recording.2023-12-01.at.15.34.41.mov
ios-1.mov
iOS: mWeb Safari
Screen.Recording.2023-12-01.at.15.29.11.mov
safari-1.mov
MacOS: Chrome / Safari
web-1.mov
web-1.mov
MacOS: Desktop
Screen.Recording.2023-12-01.at.15.37.09.mov
desktop-1.mov