You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] [MEDIUM] [Groups] - Group chat with one user is allowed in confirmation page, but not in contact list #39317
Version Number: 1.4.58-4 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to FAB > Start chat
Click Add to group with one user
Click Create chat
Note that user lands on 1:1 DM
Go to FAB > Start chat
Select Add to group with the same user in Step 3 and another user
Click Next
In confirmation page, unselect the other user and click Start group
Expected Result:
If app allows to create a group with just one user, Step 3 should result in the creation of a new group
Actual Result:
n Step 3, app does not allow the creation of group chat with one user when clicking Add to group with just one user in contact list.
However, in Step 7, when user selects two users in contact list and unselects one user in confirmation page, app allows to create group chat in one user
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
selectedOptions in this page also includes the group creator.
What changes do you think we should make in order to solve the problem?
We have several approaches for this:
Change the condition in RCA to selectedOptions.length > 2.
Disable selection if the selected options list has less than or equal 3 (i.e. the group creator and 2 other members) here. By this, user cannot remove any member from the list when there are only 2 other members. The isDisabled condition will be isAdmin || selectedOptions.length <= 2.
Show an error message when press Create group if the group size is not enough. To do this, we should create an error state variable and inside createGroup function here, we check if selectedOptions.length <= 2 to set the appropriate error message. We then use DotIndicatorMessage to display that error.
What alternative solutions did you explore? (Optional)
confirmButtonText={selectedOptions.length > 0 ? translate('common.next') : 'Proceed with only yourself'} // Add it in en.ts and es.ts and use translate
onConfirmSelection will also need an update, we don't want to check for selectedOptions.length > 1 now,
onConfirmSelection={navigateToConfirmPage}
In NewChatConfirmPage, we'll change the showConfirmButton logic so that the button shows even if there's only the creator of the group present.
This way we maintain the group screen also allowing the user to unselect users if the length is more than 3.
We can also show a error message at the bottom stating that you cannot create a group of less than 3 members, if you want to add more members then go back to the contact page and add more participants.
What alternative solutions did you explore? (Optional)
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@] The PR that introduced the bug has been identified. Link to the PR:
[@] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@] Determine if we should create a regression test for this bug.
[@] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@bz] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon Mar 30, 2024
Triggered auto assignment to @puneetlath (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Mar 30, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
lanitochka17 commentedon Mar 30, 2024
We think that this bug might be related to #vip-vsp
lanitochka17 commentedon Mar 30, 2024
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
gijoe0295 commentedon Mar 30, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Can create a group chat with one user in confirmation page.
What is the root cause of that problem?
In
NewChatConfirmationPage, the condition to showCreate groupbutton is incorrect:App/src/pages/NewChatConfirmPage.tsx
Line 135 in 24cf044
selectedOptionsin this page also includes the group creator.What changes do you think we should make in order to solve the problem?
We have several approaches for this:
selectedOptions.length > 2.isDisabledcondition will beisAdmin || selectedOptions.length <= 2.Create groupif the group size is not enough. To do this, we should create anerrorstate variable and insidecreateGroupfunction here, we check ifselectedOptions.length <= 2to set the appropriate error message. We then useDotIndicatorMessageto display that error.What alternative solutions did you explore? (Optional)
NA
ShridharGoel commentedon Mar 30, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Allow users to create group chats with only 1 other user + with 0 other users.
What is the root cause of that problem?
Kind of a new feature.
The current behaviour checks for selectedOptions.length > 1
App/src/pages/NewChatPage.tsx
Line 296 in ae6cc49
onConfirmSelection is also dependent on selectedOptions
App/src/pages/NewChatPage.tsx
Line 298 in ae6cc49
In NewChatConfirmPage, confirm button is shown only if selectedOption length is > 1.
App/src/pages/NewChatConfirmPage.tsx
Line 135 in ae6cc49
What changes do you think we should make in order to solve the problem?
In BaseOptionsSelector, add a new prop called
shouldShowConfirmButtonWithoutSelection.This will be passed as true from NewChatPage, which will lead to showing the footer button even if nothing is selected.
New condition for shouldShowFooter:
We'll update the confirm text:
onConfirmSelection will also need an update, we don't want to check for selectedOptions.length > 1 now,
In NewChatConfirmPage, we'll change the showConfirmButton logic so that the button shows even if there's only the creator of the group present.
Screen.Recording.2024-04-04.at.1.12.50.PM.mov
allgandalf commentedon Apr 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We allow user user to create group chat with just 2 users
What is the root cause of that problem?
Currently, we allow the user to unselect the participants of the group without checking the number of selected participants:
App/src/pages/NewChatConfirmPage.tsx
Lines 91 to 97 in 14ff944
But in the main contact page, if you check the video, we will not allow the user to create a group, we will take them to 1:1 DM.
What changes do you think we should make in order to solve the problem?
So here as per the design, i think it's best to disable deselecting participants if the length is 3:
This way we maintain the group screen also allowing the user to unselect users if the length is more than 3.
We can also show a error message at the bottom stating that you cannot create a group of less than 3 members, if you want to add more members then go back to the contact page and add more participants.
What alternative solutions did you explore? (Optional)
N/A
59 remaining items
abzokhattab commentedon Jul 9, 2024
thank u applied
mvtglobally commentedon Jul 19, 2024
Issue not reproducible during KI retests. (Fifth week)
mallenexpensify commentedon Jul 22, 2024
Contributor: @abzokhattab paid $250 via Upwork
Contributor+: @s77rt paid $250 via Upwork.
@s77rt plz complete the BZ checklist below? Thx
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
s77rt commentedon Jul 22, 2024
s77rt commentedon Jul 22, 2024
@mallenexpensify Done! ^
mallenexpensify commentedon Jul 22, 2024
Thanks @s77rt , closing
melvin-bot commentedon Oct 8, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.