-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Allow Editing Distance Requests #26141
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
Conversation
…ify/App into jasper-editDistanceRequests
|
We have some weird bugs
CleanShot.2023-09-26.at.11.13.01.mp4 |
|
@fedirjh Thank you for reporting that. I am finding it extremely difficult to work around the API limitations here, so I don't think this is going to work very well until the API is refactored in https://github.com/Expensify/Expensify/issues/312241. I am going to chat with @neil-marcellini and @arosiclair about it this morning to see if we can come up with a better API strategy to deal with this problem. For now, I think it's OK to merge this with this known limitation (so we can unblock others that are waiting on a lot of the changes in this PR). |
|
@neil-marcellini this is ready for another review from you. Also, let me know what you think about the API issues above. The problem is that the |
Reviewer Checklist
Screenshots/VideosWebCleanShot.2023-09-27.at.16.17.46.mp4CleanShot.2023-09-27.at.16.19.08.mp4Mobile Web - ChromeCleanShot.2023-09-27.at.16.49.55.mp4Mobile Web - SafariCleanShot.2023-09-27.at.16.22.36.mp4DesktopCleanShot.2023-09-27.at.17.03.47.mp4iOSCleanShot.2023-09-27.at.16.36.51.mp4AndroidCleanShot.2023-09-27.at.17.07.58.mp4 |
|
Thank you! I will handle the first bug as part of #26538 and is not a blocker for this PR. For the second bug, I would prefer to merge this PR as-is, and then can you please report that bug through normal channels so that (you) or a contributor can pick it up to fix it? |
Comments were addressed and I am trying to get this merged
|
✋ 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/tgolen in version: 1.3.75-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
|
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.76-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
| subtitle={hasErrors && isEmptyMerchant ? translate('common.error.enterMerchant') : ''} | ||
| subtitleTextStyle={styles.textLabelError} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused a regression #28498. The error was displayed via the errors prop and not as a subtitle. This made the error appears next to the field instead of below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks! I imagine that got lost in the shuffle of conflicts I kept having to resolve.
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, { | ||
| pendingFields: { | ||
| comment: isEditingWaypoint ? CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE : CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasperhuangg Hi, I have a bit curious about this change. Why do you add pendingFields here? Normally, we only add pendingFields in optimisticData (before sending API) and reset pending field in successData and FailureData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from #32120.
It looks like this pendingFields is not needed, we have removed it to prevent premature updates of data in the distance message preview.
| // On mount, create the backup transaction. | ||
| TransactionEdit.createBackupTransaction(transaction); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from issue #52413, The effect is also executed when refreshing the page on web, which causes the changes to be saved upon refresh.
Proposal: #52413 (comment)
PR: #54475

Need https://github.com/Expensify/Web-Expensify/pull/38594 and #25707Details
Fixed Issues
$ #22715
Tests/QA
Comment out this block so you can receive Pusher events.
Offline tests
Note: There is a separate issue for implementing the RBR for server errors during this process.
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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)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
Web
web_1.mov
Mobile Web - Chrome
Mobile Web - Safari
mweb_safari_1.mp4
Desktop
desktop_1.mov
iOS
ios_1.mp4
Android