-
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] Uneven splits follow up #41717
Conversation
@cristipaval 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] |
Looks like we're missing screenshots. |
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Pushing one more fix for split amounts not shown in smartscanned split details page |
This should be ready for review @cristipaval! |
Looks like it's pretty late for Cristi, @allroundexperts has jumped to the rescue |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-08.at.2.13.23.AM.movScreen.Recording.2024-05-08.at.2.12.24.AM.movAndroid: mWeb ChromeScreen.Recording.2024-05-08.at.2.11.13.AM.movScreen.Recording.2024-05-08.at.2.08.58.AM.moviOS: NativeScreen.Recording.2024-05-08.at.2.07.16.AM.moviOS: mWeb SafariScreen.Recording.2024-05-08.at.2.03.30.AM.movScreen.Recording.2024-05-08.at.2.04.22.AM.movMacOS: Chrome / SafariScreen.Recording.2024-05-08.at.2.01.54.AM.movScreen.Recording.2024-05-08.at.1.56.08.AM.movMacOS: DesktopScreen.Recording.2024-05-08.at.2.00.47.AM.movScreen.Recording.2024-05-08.at.1.52.18.AM.mov |
|
||
// This function expects the length of participants without current user | ||
const splitAmount = IOUUtils.calculateAmount(accountIDs.length - 1, amount, currency, isPayer); | ||
const participantsLength = newAccountIDs.includes(userAccountID) ? newAccountIDs.length - 1 : newAccountIDs.length; |
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.
Context: newAccountIDs
may or may not contain the current user accountID depending on where this is called from. If we're splitting from within an existing group, it will have the user's accountID. If from Global Create, it won't. We need to send the participants length - 1 to calculateAmount
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.
Looks good to me!
@NikkiWines 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] |
@youssef-lr Can you please create a payment issue for this PR? |
on it! |
Done #41758 (comment) |
[CP Staging] Uneven splits follow up (cherry picked from commit dcda83e)
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 1.4.71-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.71-6 🚀
|
Details
cc @dubielzyk-expensify
Follow up to #40386 and Fixes this issue where the participants show up as being focused
Fixed Issues
$ #41761
$ #41758
Tests
Offline tests
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-05-07.at.20.34.16.mov
MacOS: Desktop