-
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]: Inconsistency in limitation when adding members via FAB and group details page #40537
Conversation
@cubuspl42 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] |
Facing some issues with iOS built due to |
PR ready for your review @cubuspl42 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativea.movAndroid: mWeb Chromeaw.moviOS: Nativei.moviOS: mWeb Safariiw.movMacOS: Chrome / Safariw.movMacOS: DesktopScreen.Recording.2024-04-25.at.1.47.35.PM.mov |
src/pages/NewChatPage.tsx
Outdated
|
||
const [sections, firstKeyForList] = useMemo(() => { | ||
const sectionsList: OptionsListUtils.CategorySection[] = []; | ||
let firstKey = ''; | ||
|
||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, personalDetails, maxParticipantsReached); | ||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, personalDetails, false); |
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.
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, personalDetails, false); | |
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, 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.
I think the default value for parameter is false, so no need to pass 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.
are you sure @ahmedGaber93 ?
I see can't makes sense of the assignment:
App/src/libs/OptionsListUtils.ts
Lines 2176 to 2181 in d8e6990
function formatSectionsFromSearchTerm( | |
searchTerm: string, | |
selectedOptions: ReportUtils.OptionData[], | |
filteredRecentReports: ReportUtils.OptionData[], | |
filteredPersonalDetails: ReportUtils.OptionData[], | |
maxOptionsSelected: boolean, |
Does the above assignment means it is set to false?
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.
@GandalfGwaihir Ah, you are right, it is not having default value, ignore this change it is not affected.
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.
Why do we still need this param? Is there some case where maxOptionsSelected
applies anymore?
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.
Okay missed this, I will check if there are any additional constraints for this to happen, will let you know by EOD
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, do you know why there was a limit on Money request participant selector in the first place?
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.
@marcaaron , made the changes, can you review it when you find time
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.
Reviewing today.
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, do you know why there was a limit on Money request participant selector in the first place?
Sure! And sorry, I should have caught this sooner. But it's because the "split" request lands on a Group DM between you and all the other participants. Since we had a previous restriction on that. Now that there is none for Group Chats we can do the same behavior everywhere.
@GandalfGwaihir just small change in tests step. Instead of "The expected result here is that we will not limit the number of participants added to the group". |
I guess we're all set @ahmedGaber93 🚀 |
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!
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. But I don't think there are any flows left that should have max participants at this point. Maybe I am wrong 😄 Please let me know.
src/pages/NewChatPage.tsx
Outdated
|
||
const [sections, firstKeyForList] = useMemo(() => { | ||
const sectionsList: OptionsListUtils.CategorySection[] = []; | ||
let firstKey = ''; | ||
|
||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, personalDetails, maxParticipantsReached); | ||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, selectedOptions, recentReports, personalDetails, false); |
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.
Why do we still need this param? Is there some case where maxOptionsSelected
applies anymore?
I guess we're good to merge this one @marcaaron 🚀 |
src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js
Outdated
Show resolved
Hide resolved
I can test it now, but when submit split expense with more than 8 participants, API |
Gonna take a brief look in the backend to make sure we have no restriction there... I would guess there is something wrong with the optimistic data or the way we are handling it. |
Ok, there is no restriction on participant number in the backend. However, it would be helpful to see what params we are sending to the API in this case for debug purposes. There should be a |
okay, I will take a look at that , just to confirm, are we still dealing with the participant selector in this same issue right? or should we deal this case under a new issue altogether?, this issue was primarily focused on removing restriction on number of participants in group chat |
@marcaaron Frontend already sent |
@GandalfGwaihir if I understand you well, yes we will fix limited participants in |
cool @ahmedGaber93 , let me test with split expenses then! |
…antsSelector.js Co-authored-by: ahmedGaber93 <[email protected]>
@GandalfGwaihir I don't think we need a new issue. We need to remove the restriction anywhere a "Group Chat" is created - doesn't matter which flow. Reminder that it's always possible to request comp change if you feel like the scope of work has changed enough to warrant it.
@ahmedGaber93 To confirm, you saying that you can reproduce this on staging or production? Could you give exact reproduction steps so we can look into them? Thanks everyone! |
@marcaaron @ahmedGaber93 , pushed the latest changes allowing split expenses as well, can you review this once? |
@marcaaron Sorry, I should do that from the beginning. Bug: DEV - split expense with the same users failed in the second time.
Split expense failed with error it also failed if split users contain at latest one user I split with him before. 20240430142901652.mp4 |
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!
No worries at all. I thank you for your thoroughness and appreciate you bringing it to our attention 🙇 It appears this is happening on staging already. Though I could only reproduce it one time (not sure what is happening here). But let's look into it in a new issue if there is a reliable reproduction. |
✋ 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/marcaaron in version: 1.4.69-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.69-2 🚀
|
Details
When creating a group via FAB, we limit the number of participants to 8, but on when we add members via report details page, we do not limit the members, this PR solves this mismatch by removing the maximum participant limit on FAB.
Fixed Issues
$ #40512
PROPOSAL: #40512 (comment)
Tests
Same as QA
Offline tests
Same as QA
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
MacOS: Chrome / Safari
Screen.Recording.2024-04-19.at.3.03.25.PM.mov
MacOS: Desktop
Screen.Recording.2024-04-19.at.3.06.06.PM.mov
Android: Native
group.add.mov
Android: mWeb Chrome
Screen.Recording.2024-04-22.at.6.26.11.AM.mov
iOS: Native
issu.mov
iOS: mWeb Safari
Screen.Recording.2024-04-22.at.6.24.22.AM.mov