-
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
[CP Staging] fix: regression 28417 #28458
Conversation
@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] |
@@ -109,7 +109,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu | |||
if (!currency || !_.isNumber(amount)) { | |||
return; | |||
} | |||
const amountAsStringForState = CurrencyUtils.convertToFrontendAmount(amount).toString(); | |||
const amountAsStringForState = amount ? CurrencyUtils.convertToFrontendAmount(amount).toString() : ''; |
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.
Isn't this equivalent to !== 0
? I think that would be preferrable
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.
Yes, I believe it's equivalent, amount will be the number and amount ?
mean amount !== 0 ?
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.
I think that would be preferrable
I meant that if this is the case, the code should be changed to !== 0
; or, otherwise, to:
const amountAsStringForState = amount === 0 ? '' : CurrencyUtils.convertToFrontendAmount(amount).toString();
Whichever you prefer
Reviewer Checklist
Screenshots/VideosAuthor included screenshots and I have tested this platform agnostic change in web Mobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
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.
Thanks for the PR, please next time link it to the deploy blocker too so we can find it from there.
I think the current solution is fine, the other solution might be argued as easier to read but I dont think that is a blocker
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[CP Staging] fix: regression 28417 (cherry picked from commit 9e96d04)
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.75-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.77-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.77-7 🚀
|
Details
Fixed Issues
$ #26945
$ #28417
PROPOSAL:
Tests
Offline tests
Same as 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
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)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
Web
Screen.Recording.2023-09-29.at.17.13.54.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android