[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] |
| return; | ||
| } | ||
| const amountAsStringForState = CurrencyUtils.convertToFrontendAmount(amount).toString(); | ||
| const amountAsStringForState = amount ? CurrencyUtils.convertToFrontendAmount(amount).toString() : ''; |
There was a problem hiding this comment.
Isn't this equivalent to !== 0? I think that would be preferrable
There was a problem hiding this comment.
Yes, I believe it's equivalent, amount will be the number and amount ? mean amount !== 0 ?
There was a problem hiding this comment.
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 |
mountiny
left a comment
There was a problem hiding this comment.
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 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
Screen.Recording.2023-09-29.at.17.13.54.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android