-
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
Fix split bill flow in App #13385
Fix split bill flow in App #13385
Conversation
@mananjadhav @MonilBhavsar One of you needs to 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] |
@luacmartins Can this be reviewed and tested right now? Is it deployed on staging? |
@mananjadhav not yet! I’ll ping you once the API PR is merged! |
Thanks @luacmartins |
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 one NAB, changes look good to me otherwise
function splitBill(participants, currentUserLogin, amount, comment, currency, locale, existingGroupChatReportID = '') { | ||
const {groupData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, amount, comment, currency, locale, existingGroupChatReportID); | ||
|
||
API.write('SplitBill', { | ||
reportID: groupData.chatReportID, |
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.
@luacmartins As Monil pointed out, we are not passing the existingGroupChatReportID
to the API here.
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.
requesting a change
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.
We actually don't need to pass this param to the API. We have both SplitBill
and SplitBillAndOpenReport
commands and that's enough for the API to figure out what it needs to do without the need to pass this param.
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.
The front end needs the ID to get the groupChat when it's created from within a chat though
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.
That makes sense!
function splitBill(participants, currentUserLogin, amount, comment, currency, locale, existingGroupChatReportID = '') { | ||
const {groupData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, amount, comment, currency, locale, existingGroupChatReportID); | ||
|
||
API.write('SplitBill', { | ||
reportID: groupData.chatReportID, |
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.
requesting a change
I fixed the typo. Ready for another review! |
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.
Code looks good. I'll get to testing today
Quick bump is it ready for C+ review and testing? |
@mananjadhav thanks for the bump. Yes, the API changes are in staging already! |
@luacmartins For the offline tests too it should post in the existing group? Also I am currently testing this flow, but a bit blocked by the mobile web not working. |
Is this because of the backend issues, right?
Yeah I would say the offline should do that same as online if successful |
Yeah none of us are able to run the app web or mobile web unless the IP is whitelisted |
I think it is ok at the current situation to skip the mweb or some internal employee can test those and you test the rest. |
Reviewer Checklist
Screenshots/VideosWebweb-workspace-split-bill.movweb-split-bill-flow.movMobile Web - Chromemweb-chrome-split-bill-1-participant.movmweb-chrome-split-bill-participants.mp4mweb-chrome-workspace-split-bill.movMobile Web - Safarimweb-safari-split-bill-flow-2-participants.mp4mweb-safari-split-bill-flow-1-participant.movmweb-safari-workspace-split-bill.movDesktopdesktop-workspace-split-bill.movdesktop-split-bill-flow.moviOSios-split-bill-flow.movAndroidandroid-workspace-split-bill.movandroid-split-bill-flow.mov@mountiny @MonilBhavsar I've tested the mobile web to the best possible means for me. I had a terrible network but it's IP was whitelisted so you can see a lot of lag there. But I managed to test it across all the platforms and have more than one videos for each test. |
Thanks @mananjadhav. Still holding on Web-E. |
Web-E is in prod. Merging this one! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
🚀 Deployed to staging by @luacmartins in version: 1.2.42-0 🚀
|
🚀 Deployed to production by @yuwenmemon in version: 1.2.42-2 🚀
|
Details
Refactors SplitBill to have the expected behavior
cc @mountiny @aldo-expensify since you reviewed the original split bill PR
Fixed Issues
$ #13378
Tests
No extra groups created
Splitting a bill with a single participant
Split a bill from a policy room
+ > New Workspace
Workspace > Manage members > Invite
announce
room, selectSplit bill
from the+
icon inside the chatOffline tests
Same as Tests steps but the Split and Requested messages will be greyed out
QA Steps
Same as test steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting 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)Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov