-
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
Fix users list not showing on split confirm #20277
Conversation
@amyevans @aimane-chnaif 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] |
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.
@kowczarz can you take care of the linter errors first please?
@amyevans done ✅ |
@aimane-chnaif can you review/complete the checklist please? |
Hey, FYI I will be OOO on next days, so I will be able to respond earliest on Wednesday. |
useEffect(() => { | ||
setSelectedOptions( | ||
ReportUtils.isPolicyExpenseChat(props.report) | ||
? OptionsListUtils.getPolicyExpenseReportOptions(props.report) | ||
: OptionsListUtils.getParticipantsOptions(props.report, props.personalDetails), | ||
); | ||
}, [props.report, props.personalDetails]); | ||
|
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.
personalDetails
is replaced with allPersonalDetails
in https://github.com/Expensify/App/pull/21113/files#diff-93b9622394e69d864cda6653a30240e791f97ce4cb4a1e0c2a0de679b2557fe9R111
This is what I suggest:
As withCurrentUserPersonalDetails
HOC already includes personalDetails
in props, allPersonalDetails
is redundant in MoneyRequestModal
component.
- So remove:
- allPersonalDetails: {
- key: ONYXKEYS.PERSONAL_DETAILS_LIST,
- },
-
replace all
allPersonalDetails
occurrences withpersonalDetails
-
And update default state value: (this is redundant because it's set again on component mount)
- const [selectedOptions, setSelectedOptions] = useState(
- ReportUtils.isPolicyExpenseChat(props.report)
- ? OptionsListUtils.getPolicyExpenseReportOptions(props.report)
- : OptionsListUtils.getParticipantsOptions(props.report, props.allPersonalDetails),
- );
+ const [selectedOptions, setSelectedOptions] = useState([]);
useEffect(() => { | ||
setSelectedOptions( |
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.
Also, it doesn't make sense to pre-fill participants list from FAB. Only from report screen.
useEffect(() => { | |
setSelectedOptions( | |
useEffect(() => { | |
if (!props.report.reportID) return; | |
setSelectedOptions( |
I see that in PR #17964 whole file was refactored and it seems it might fix the issue, but currently I'm not able to test if it works because deeplinks fails with error:
|
Please test production web and desktop app. If it's not reproducible anymore, we can close this PR. |
Closing per #19235 (comment) |
Details
Fixed Issues
$ #19235
PROPOSAL: #19235 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
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-06-07.at.14.54.27.mov
Mobile Web - Chrome
Screen.Recording.2023-06-07.at.15.22.48.mov
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-06-07.at.18.32.32.mp4
Desktop
Screen.Recording.2023-06-07.at.14.50.08.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-06-07.at.18.46.23.mp4
Android
Screen.Recording.2023-06-07.at.15.20.32.mov