-
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: Distance - No error when editing the default rate to 4 decimal places and creating a same one. #53610
Conversation
…laces and creating a same one. Signed-off-by: krishna2323 <[email protected]>
@@ -20,7 +20,10 @@ function validateRateValue( | |||
const errors: FormInputErrors<RateValueForm> = {}; | |||
const parsedRate = MoneyRequestUtils.replaceAllDigits(values.rate, toLocaleDigit); | |||
const decimalSeparator = toLocaleDigit('.'); | |||
const ratesList = Object.values(customUnitRates).filter((rate) => currentRateValue !== rate.rate); | |||
const ratesList = Object.values(customUnitRates) |
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.
Reviewing
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-12-09.at.17.43.44.movAndroid: mWeb ChromeScreen.Recording.2024-12-09.at.17.44.27.moviOS: NativeScreen.Recording.2024-12-09.at.17.41.43.moviOS: mWeb SafariScreen.Recording.2024-12-09.at.17.37.47.movMacOS: Chrome / SafariScreen.Recording.2024-12-09.at.17.36.43.movMacOS: DesktopScreen.Recording.2024-12-09.at.17.39.25.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. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
🚀 Deployed to staging by https://github.com/MariaHCD in version: 9.0.73-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.73-8 🚀
|
Explanation of Change
This is a follow-up PR. The original PR prevents users from creating distance rates with the same value. However, in offline mode, the validation was failing because the rate value conversion on the frontend was not the same as on the backend. This PR uses
parseFloat(Number(rateRate || 0).toFixed(10))
to ensure that all rates match the backend conversion in the validation function.Fixed Issues
$ #53427
PROPOSAL:
Tests
Offline tests
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4