-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix/30378: Update correct pendingFields #31172
Conversation
@@ -59,7 +59,7 @@ function addStop(transactionID: string) { | |||
function saveWaypoint(transactionID: string, index: string, waypoint: RecentWaypoint | null, isEditingWaypoint = false) { | |||
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, { | |||
pendingFields: { | |||
comment: isEditingWaypoint ? CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE : CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | |||
waypoints: 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.
In here we should update pendingFields.waypoints like we did when changing waypoint in EditRequestPage
Line 689 in 0888bda
const pendingFields = _.mapObject(transactionChanges, () => CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE); |
I log pendingFields here anh Let's see this video
Screen-Recording-2023-11-10-at-14.57.38.mp4
@@ -686,7 +686,7 @@ describe('actions/IOU', () => { | |||
waitForCollectionCallback: true, | |||
callback: (transaction) => { | |||
Onyx.disconnect(connectionID); | |||
expect(transaction.pendingAction).toBe(CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD); | |||
expect(transaction.pendingAction).toBeFalsy(); |
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.
Why the pending action changed to false instead of 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.
@ArekChr In this UT case, there are some errors while creating transaction. We removed pendingAction in FailureData in the logic so we also need to update UTs here
We have updated author checklist template, but the automated GH Action doesn't work on this PR. I updated template manually. But |
Hi @DylanDylann, I've encountered an issue where the 'distance request' option becomes greyed out when I go offline, comparing to staging there is no such case. Could you please investigate this? |
@ArekChr Updated. We need to clear pendingFields in sucessData and FailureData |
Testing |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb.chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb.safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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. |
looks like this regression is related #31639 (comment) |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.1-13 🚀
|
Details
Update pending fields for failure data
Update correct pendingFields in saveWaypoint Function
Fixed Issues
$ #30378
PROPOSAL: #30378 (comment)
Tests
Offline tests
Same above
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screencast.from.14-11-2023.02.45.26.webm
Android: mWeb Chrome
Screencast.from.14-11-2023.02.54.05.webm
iOS: Native
Screencast.from.14-11-2023.02.21.01.webm
iOS: mWeb Safari
Screencast.from.14-11-2023.02.26.06.webm
MacOS: Chrome / Safari
Screencast.from.14-11-2023.02.02.07.webm
MacOS: Desktop
Screencast.from.14-11-2023.02.05.08.webm