-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update Who Paid section when can modify participants #21945
Conversation
@chiragsalian 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] |
@chiragsalian please assign me as reviewer, seems the contributor linked issue improperly. |
@Santhosh-Sellavel According that conversation, I think I should make like the video. But if you want to make like the previous proposal like below, I can update. |
Maybe I miss understood, We can select the user by clicking anywhere in the row, showing disabled only there near the check mark alone does not make sense and it's kind of misleading as we still show the cursor over the user name. Disabling the whole row should be good only when it's from a group. cc: @amyevans any thoughts? |
Please check and correct me if I'm wrong. That is how the previous proposal looks. Split from GroupSplit.from.Group.movSplit from FABSplit.From.FAB.mov |
Yes looks good 👍 Please check the above and confirm. Let's be sure that our OP expectations are aligned |
Quick bump for confirmation @shawnborton @amyevans . |
I think this makes sense, so all good on my end. Curious for @amyevans's thoughts too. |
I think I can continue my work. She asked you about what we should proceed before. |
@Santhosh-Sellavel I have just pushed commit, and updated screenshots/videos. |
Reviewer Checklist
Screenshots/VideosWeb & DesktopScreen.Recording.2023-07-04.at.1.17.24.AM.movMobile Web - Chrome && Mobile Web - SafariScreen.Recording.2023-07-05.at.3.02.06.AM.moviOS & AndroidScreen.Recording.2023-07-06.at.3.19.37.AM.mov |
@ginsuma Fix the lint checks. Make sure you linked the issue properly issue as follows $ In preview, both will look like Tests steps could be improved Step 1 Instead of Modify as
For Step 4
|
@@ -132,6 +132,7 @@ function MoneyRequestConfirmationList(props) { | |||
|
|||
const selectedParticipants = useMemo(() => _.filter(props.participants, (participant) => participant.selected), [props.participants]); | |||
const payeePersonalDetails = useMemo(() => props.payeePersonalDetails || props.currentUserPersonalDetails, [props.payeePersonalDetails, props.currentUserPersonalDetails]); | |||
const canModifyParticipants = !props.isReadOnly && props.canModifyParticipants && props.hasMultipleParticipants; |
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.
Can we have a better naming here canModifyParticipants
off as we are not modifying who paid anyway?
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.
How's about shouldDisableWhoPaidSection
?
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.
Okayish make the changes, thanks!
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 made it, thank you.
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.
LGTM, All your @amyevans!
getParticipantsWithAmount, | ||
selectedParticipants, | ||
payeePersonalDetails, | ||
translate, |
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.
Not sure why we need translate
here.
NAB (as it's not added 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.
It gets flagged as a missing dependency by the linter otherwise (of course we could ignore the linter in this case, but I think it's fine to just include it).
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.
translate
is a prop from withLocalize
, and it is used in above useMemo
.
When user change their language from another tab/window, it should update the title in section.
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.
Oh interesting, thanks for calling that out. I was previously under the impression that including translate
in the dependency array was in case the function changed, not what the function returns 🙃
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, you're right. Maybe the below make it clear.
App/src/components/MoneyRequestConfirmationList.js
Lines 102 to 104 in b595101
// Destructure functions from props to pass it as a dependecy to useCallback/useMemo hooks. | |
// Prop functions pass props itself as a "this" value to the function which means they change every time props change. | |
const {translate, onSendMoney, onConfirm, onSelectParticipant} = props; |
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, but let's update step 5 of the test for clarity. Instead of
Notice who paid? card section, the cursor is shown as the mouse pointer
Perhaps this:
Hover over the
who paid?
section and verify the cursor is thenot-allowed
(disabled) style
Also your web/desktop recordings are outdated (based on first iteration of code), so please update those
getParticipantsWithAmount, | ||
selectedParticipants, | ||
payeePersonalDetails, | ||
translate, |
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.
It gets flagged as a missing dependency by the linter otherwise (of course we could ignore the linter in this case, but I think it's fine to just include it).
I updated it. Thank you. |
✋ 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/amyevans in version: 1.3.38-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.38-7 🚀
|
Details
Web - Mouse cursor is shown as hand icon (on a not clickable section) on who paid, split bill.
Fixed Issues
$ #21695
PROPOSAL: #21695 (comment)
Tests
Offline tests
N/A
QA Steps
Same as tests
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-07-06.at.9.14.09.PM.mp4
Mobile Web - Safari
ios_safari.mov
Mobile Web - Chrome
android_chrome.mov
Desktop
Screen.Recording.2023-07-06.at.9.17.31.PM.mp4
iOS
ios.mov
Android
android_app.mov