-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 empty workspace detail in money request page #27742
[CP Staging] Fix empty workspace detail in money request page #27742
Conversation
Existing issues:
Is it actually expected to be able to split bill with workspace? If yes, then I can report the above error.
|
Why can't we fix this here? |
As the changes touch the SplitBillDetailsPage, I also test opening the split bill details page. Screen.Recording.2023-09-19.at.12.58.36.movI can't test the split bill in workspace as it requires control policy expense chat (idk what that is) |
I'm still looking for the problem, I will push it if it's simple |
Fixed the recent list issue. |
Please pull main. Freeze issue is now fixed. |
BUG: Amount input shows when split bill with workspace on distance request. For any distance requests, amount is calculated automatically, right? Screen.Recording.2023-09-20.at.11.41.43.AM.mov |
@situchan it happens on the main too. When we press Add to split, it should go to the confirm page. But in the confirm page, we have a guard to prevent users from accessing it if App/src/pages/iou/steps/MoneyRequestConfirmPage.js Lines 105 to 107 in 5d71d32
However, App/src/libs/MoneyRequestUtils.ts Lines 70 to 72 in 5d71d32
We should either disable the split option when doing distance requests or allow split bill for distance requests. |
@situchan updated |
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Outdated
Show resolved
Hide resolved
// the app from crashing on native when you try to do this, we'll going to hide the button if you have a workspace and other participants | ||
const hasPolicyExpenseChatParticipant = _.some(participants, (participant) => participant.isPolicyExpenseChat); | ||
const shouldShowConfirmButton = !(participants.length > 1 && hasPolicyExpenseChatParticipant); | ||
const isAllowToSplit = !isDistanceRequest && !isScanRequest; |
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.
grammar fix: isAllowedToSplit
or shouldAllowSplit
. I prefer latterformer one
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.
Updated
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.
Just saw the edit, I think I will keep the latter one
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.
Or maybe not, I updated to use the former one
Reviewer Checklist
Screenshots/VideosWebweb-split.movweb.movMobile Web - ChromeMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroid |
@bernhardoj please update QA step based on new expected behavior |
/** | ||
* Check if scan request or not | ||
*/ | ||
function isScanRequest(selectedTab: ValueOf<typeof CONST.TAB>): boolean { |
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.
This is inconsistent with isDistanceRequest
which also accepts iouType
as param but I think that's fine as we'll be supporting split bill on scan request as well.
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 didn't include that because of that reason
Updated the test step |
Lovely - thank you both so much for keeping with this! |
…tail-money-request (cherry picked from commit 3098119)
✋ 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/thienlnam in version: 1.3.72-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|
Details
Selecting workspace as a split bill participant will show an empty detail.
Fixed Issues
$ #27510
PROPOSAL: #27510 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Split disabled for scan and distance request
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-20.at.15.02.05.mov
Mobile Web - Chrome
Screen.Recording.2023-09-19.at.12.50.38.mov
Mobile Web - Safari
Screen.Recording.2023-09-19.at.12.49.58.mov
Desktop
Screen.Recording.2023-09-19.at.12.49.15.mov
iOS
Screen.Recording.2023-09-19.at.12.51.32.mov
Android
Screen.Recording.2023-09-19.at.12.53.05.mov