Cleanup completing a split bill - #29568
Conversation
Deploying with
|
| Latest commit: |
71064ed
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://86ba1924.helpdot.pages.dev |
| Branch Preview URL: | https://youssef-cleanup-completespli.helpdot.pages.dev |
|
@thesahindia 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] |
| isScanRequest: false, | ||
| shouldShowSmartScanFields: true, | ||
| isPolicyExpenseChat: false, | ||
| shouldAllowScrollingInputs: false, |
There was a problem hiding this comment.
This prop is not used anywhere
| shouldShowSmartScanFields: PropTypes.bool, | ||
|
|
||
| /** Whether we should show the amount, date, and merchant fields. */ | ||
| isScrollable: PropTypes.bool, |
There was a problem hiding this comment.
I think we can remove this prop and make this component always scrollable.
And instead remove scroll views in MoneyRequestConfirmPage
There was a problem hiding this comment.
I don't think we can do that. It would alter the behavior in the search page where we want the search bar to remain fixed on top.
There was a problem hiding this comment.
This component is used only in 2 places - SplitBillDetailsPage, MoneyRequestConfirmationPage
There's no search bar
There was a problem hiding this comment.
Ah yes sorry. I mistakenly thought the comment was under BaseOptionsSelector
There was a problem hiding this comment.
You might have got confused with OptionsSelector that has search input
|
|
||
| const {shouldAllowScrollingChildren} = this.props; | ||
| function ScrollWrapper({children}) { | ||
| if (!shouldAllowScrollingChildren) { | ||
| return children; | ||
| } | ||
| return ( | ||
| <ScrollView contentContainerStyle={[styles.flexGrow1]}> | ||
| <ScrollView | ||
| horizontal | ||
| contentContainerStyle={[styles.flex1, styles.flexColumn]} | ||
| > | ||
| {children} | ||
| </ScrollView> | ||
| </ScrollView> | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
Can we move this out of component lifecycle?
There was a problem hiding this comment.
Not sure where, what do you suggest? And what's the issues if we keep it here? thanks!
There was a problem hiding this comment.
I was thinking of static function but I think it's better to make separate component in /components.
I see double scroll view was used in several places so it can be reused once we make it.
There was a problem hiding this comment.
Ended up removing the component all together, I searched in the codebase and could only find the double scroll view used once in MoneyConfirmationList, let me know what you think!
There was a problem hiding this comment.
Fine to me. I found only one occurrence in AddressSearch
App/src/components/AddressSearch/index.js
Lines 266 to 273 in fe282b4
|
please fix lint |
|
Is ready for review? |
|
Yup @situchan, thanks! |
Reviewer Checklist
Screenshots/VideosWebweb1.movweb2.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopiOSios.movAndroidandroid.mov |
Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com>
|
Thanks @situchan for the thorough review! |
mountiny
left a comment
There was a problem hiding this comment.
thanks for the thorough review @situchan
I am slightly worried about the changes to the BaseOptionsSelection in sense that there might be regressions coming. Lets be on a look out for some potentially weird behaviour in staging.
|
cc @tgolen this touches the MoneyRequestConfirmationList FYI |
|
Hope there would be no regressions as affected only when |
|
Also note for the future, the |
|
Yep I agree there should not be regressions hopefully, still just ideally we are cautious of this in case some odd issues pop over now and tomorrow |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
| isScanRequest: PropTypes.bool, | ||
|
|
||
| /** Whether we're editing a split bill */ | ||
| isEditingSplitBill: PropTypes.bool, |
There was a problem hiding this comment.
For the future, please name the props for the effect they should have inside the component. When only reviewing code inside this component, if you saw the prop isEditingSplitBill, you would have no idea what that prop should do or how it should be applied. For example, the prop below is called shouldShowSmartScanFields which is much more explicit and its purpose is understood immediately.
There was a problem hiding this comment.
Hey @tgolen - sorry for the late reply! Will keep this in mind, however, I think it's a bit difficult in this component as it handles different IOUs. What would be a better naming here?
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
| result.alternateText = `${lastActorDisplayName}: ${lastMessageText}`; | ||
| } else { | ||
| result.alternateText = lastMessageTextFromReport.length > 0 ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet'); | ||
| result.alternateText = lastAction && lastMessageTextFromReport.length > 0 ? lastMessageText : Localize.translate(preferredLocale, 'report.noActivityYet'); |
There was a problem hiding this comment.
This seems unintended? The lastAction check is not needed for this case

Details
Fixed Issues
Polish of
$ https://github.com/Expensify/Expensify/issues/322303
Tests
P2P
Workspace
Offline tests
QA Steps
P2P
Workspace
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
(The error that occurs in the beginning is on dev only and is a warning, we have an issue to fix it later and make split commands 1:1:1)
Screen.Recording.2023-10-15.at.21.44.39.mov
MacOS: Desktop