-
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
feat: policy distance rates edit #38237
feat: policy distance rates edit #38237
Conversation
…zyk/App into feat/policy-distance-rates-edit
…zyk/App into feat/policy-distance-rates-edit
…zyk/App into feat/policy-distance-rates-edit
…zyk/App into feat/policy-distance-rates-edit
…zyk/App into feat/policy-distance-rates-edit
…icy-distance-rates-edit
…icy-distance-rates-edit
@cubuspl42 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] |
I will update the description, add recordings and go through the checklist tomorrow as I'm almost done for today. This PR also fixes two issues: Apart from that it has some followup fixes for error handling from previous PR and small refactor of translations which was requested in the very first PR. |
…icy-distance-rates-edit
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.
LGTM, all yours @luacmartins
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.56-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|
testID={PolicyDistanceRateDetailsPage.displayName} | ||
includeSafeAreaPaddingBottom={false} | ||
style={[styles.defaultModalContainer]} | ||
shouldShowOfflineIndicatorInWideScreen |
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.
There was a regression from the PR. Issue : #41594 |
if (rateIDsToDelete.includes(rateID)) { | ||
optimisticRates[rateID] = { | ||
...currentRates[rateID], | ||
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, |
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.
You forgot to handle selection of the deleted distance rate correctly which caused #44154
}; | ||
} else { | ||
optimisticRates[rateID] = currentRates[rateID]; | ||
successRates[rateID] = currentRates[rateID]; |
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.
When we add new distance rate and delete existing distance rate in offline, the add pendingAction will be cloned in that code, this will create issue if the create request completed, because that pendingAction is not cleared.
This caused #51426
Details
Added a new page to edit distance rate and added handlers to few buttons on the main distance rates page.
This PR also fixes two other issues as its a followup to previous screens where these issues exist
Fixed Issues
$ #37514
$ #38673
$ #38662
PROPOSAL:
Tests
Same as QA steps
Offline tests
QA Steps
Precondition:
Verify that it is saved and is working as expected.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
android.native.mp4
Android: mWeb Chrome
android.web.mp4
iOS: Native
ios.native.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4