-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CP Staging] Fix: Correct Footer Display in MoneyRequestConfirmationList Component #40659
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
Conversation
|
@eh2077 PR ready for review. Thank you! |
|
@brunovjk Can you add Screenshots/Videos? |
Sure :D give me a moment. What did you think about the Test Steps here? |
They look good! I think you can just test all flows on web and pick up one random case to test on other platforms. |
| shouldUseStyleForChildren={false} | ||
| optionHoveredStyle={canModifyParticipants ? styles.hoveredComponentBG : {}} | ||
| footerContent={!isEditingSplitBill && footerContent} | ||
| footerContent={!isReadOnly && footerContent} |
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.
So, in the previous PR, we merged
| footerContent={(!!iou?.id || isEditingSplitBill) && footerContent} |
and
| footerContent={!isEditingSplitBill && footerContent} |
Note
isEditingSplitBill is undefined in MoneyTemporaryForRefactorRequestConfirmationList, so !isEditingSplitBill is always true
to
footerContent={!isEditingSplitBill && footerContent}@brunovjk Can you explain why this change fixes the issue?
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.
In the 'old' MoneyRequestConfirmationList.tsx, utilized in SplitBillDetailsPage.tsx, the footer is conditionally rendered based on isEditingSplitBill, in the Scan type you can edit. However, in MoneyTemporaryForRefactorRequestConfirmationList, as you mentioned, the footer is consistently rendered.
@eh2077 We need a new logic to approach both scenarios, I believe by utilizing isReadOnly we ensure that, what do you think? I've already tested it on the web and will upload the videos soon. My Android build is giving me troubles.
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 we can go further. If we just do this:
footerContent={footerContent}
Since footerContent depends on isReadOnly anyway:
App/src/components/MoneyRequestConfirmationList.tsx
Lines 635 to 638 in a04f40e
| const footerContent = useMemo(() => { | |
| if (isReadOnly) { | |
| return; | |
| } |
But I'm not sure what problems this could cause.
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.
Cool, then I think we can go with footerContent={footerContent}
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.
Nice, let me do some testing
Reviewer Checklist
Screenshots/Videos |
|
@eh2077 I believe that the next |
|
@brunovjk Just want to confirm - only this flow |
As far as I know, yes. |
|
@brunovjk Can you update tests and recordings? Please let tag me when you complete them, thanks. Btw, you can run |
|
Awesome @eh2077, Im on it. |
Fix: Correct Footer Display in MoneyRequestConfirmationList Component (cherry picked from commit 4b0e4ee)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.4.64-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.4.64-1 🚀
@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.4.64-6 🚀
|








Details
Fixes footer display condition in MoneyRequestConfirmationList component to ensure correct rendering when editing
Fixed Issues
$ #39559
PROPOSAL: #39559 (comment)
$ #40709
Tests
Validate Footer Display:
send,split,request,track-expense) using bothmanual,scan, anddistancerequest types.formErrorif validation error occurs) is visible on theConfirmation Pagefor each request type.Edit Scan SplitBill:
SplitBillDetailsPage.Offline tests
Same as Tests
QA Steps
Same as Tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop