fix: Combined report is more grayed#49633
Conversation
|
@dukenv0307 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] |
Co-authored-by: dukenv0307 <129500732+dukenv0307@users.noreply.github.com>
Co-authored-by: dukenv0307 <129500732+dukenv0307@users.noreply.github.com>
|
@dukenv0307 i updated, please check again |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-27.at.11.38.06.movAndroid: mWeb ChromeScreen.Recording.2024-09-27.at.11.27.59.moviOS: NativeScreen.Recording.2024-09-27.at.11.39.10.moviOS: mWeb SafariScreen.Recording.2024-09-27.at.11.29.41.movMacOS: Chrome / SafariScreen.Recording.2024-09-27.at.11.13.27.movScreen.Recording.2024-09-27.at.11.14.25.movMacOS: DesktopScreen.Recording.2024-09-27.at.11.43.08.mov |
| return ( | ||
| <OfflineWithFeedback | ||
| pendingAction={report.pendingFields?.[fieldKey]} | ||
| pendingAction={pendingAction ? undefined : report.pendingFields?.[fieldKey]} |
There was a problem hiding this comment.
Can we add a comment to explain why we return undefined if there is a pendingAction?
There was a problem hiding this comment.
We need to return the pending field action here as undefined if the pendingAction is not undefined to avoid the duplicate pending action because if pendingAction exists, we already wrapped OfflineWithFeedback outside the MoneyRequestView
There was a problem hiding this comment.
Gotcha, can we add this context as a comment in the code? I don't think it would be obvious to the next person who reads this code.
| } | ||
| const pendingAction = transaction?.pendingAction; | ||
| const getPendingFieldAction = (fieldPath: TransactionPendingFieldsKey) => transaction?.pendingFields?.[fieldPath] ?? pendingAction; | ||
| const getPendingFieldAction = (fieldPath: TransactionPendingFieldsKey) => (pendingAction ? undefined : transaction?.pendingFields?.[fieldPath]); |
There was a problem hiding this comment.
Same reason as above
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MariaHCD in version: 9.0.44-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.44-12 🚀
|
Details
Fixed Issues
$ #46200
PROPOSAL: #46200 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov