Closed m-natarajan closed 11 months ago
Job added to Upwork: https://www.upwork.com/jobs/~01b26e760299069d66
Triggered auto assignment to @adelekennedy (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Triggered auto assignment to Contributor-plus team member for initial proposal review - @burczu (External
)
When doing Start chat, and someone is added to a group, clicking on a person should add them to the group, not discard the group
This happens as in NewChatPage
on selecting a row always opens a DM.
https://github.com/Expensify/App/blob/83a89fbabc0a550993e5e4d6b9f8904aee9ff1ca/src/pages/NewChatPage.js#L248
There is no logic to check if user has started adding participants to groups.
We should add logic to add to group if there are participants selected already.
onSelectRow={(option) => {
selectedOptions.length >= 1 ? toggleOption(option) : createChat(option)
}
This makes sure if the user has some selected participants, clicking on row will add to selection, rather than discarding everything and navigating to chat.
Selection not preserved. Group lost.
https://github.com/Expensify/App/assets/64629613/78c00f65-726f-45b7-9446-9e5f06fcbe7e
Selection preserved. Start chat feels like in selection mode
https://github.com/Expensify/App/assets/64629613/4713adbd-3578-4f37-89a9-a1a171cb9546
When doing Start chat, and someone is added to a group, clicking on a person should add them to the group, not discard the group
When we press on the contact we сhoose only one contact and then create a chat
We can update function like
onSelectRow={(option) => {
createGroup(option);
}}
And update createGroup
const createGroup = (option) => {
const newSelectedOptions = option.login && !_.find(selectedOptions, (item) => item.login === option.login) ? [...selectedOptions, option] : [...selectedOptions];
const logins = _.pluck(newSelectedOptions, 'login');
if (logins.length < 1) { //Optional. Because I can't think of a single case when we have 0 selected users
return;
}
Report.navigateToAndOpenReport(logins);
};
Also we can delete createChat
due to unnecessary
We can use createGroup
instead createChat
because they use the same Report method
NA
When doing Start chat, and someone is added to a group, clicking on a person should add them to the group, not discard the group
We start chat on selecting any row with individual.
We should add a function to determine if we should toggle and create a group or we should start a chat, we can return the updated selected options from toggleOption
function and immediately use it for creating the group. We can pass the updated selected options to createGroup
and use it instead of selectedOptions
if present.
const onSelectRow = (option) => {
if (selectedOptions.length >= 1) {
const newOptions = toggleOption(option);
const logins = _.pluck(newOptions, 'login');
if (logins.length < 1) {
return;
}
Report.navigateToAndOpenReport(logins);
} else {
createChat(option);
}
};
https://github.com/Expensify/App/assets/85894871/21cbb468-a7dc-482d-9cd9-247952a7e340
Click on the option doesn't add the user to the group
When we don't click on Add to group
, we always create a DM chat
We have the same problem in MoneyTemporaryForRefactorRequestParticipantsSelector
We should check if we already click on the add button, when we select another we will call toggleOption
onSelectRow={(option) => {
if (selectedOptions.length > 0) {
toggleOption(option);
return;
}
createChat(option)
}}
Fix the same here
onSelectRow={participants.length === 0 ? addSingleParticipant: addParticipantToSelection}
We can create a button which can help us to switch between create a DM chat or a group.
This is the same behavior as request money, I think not a bug.
@burczu, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!
I tend to agree with @bernhardoj's comment that this may not be a bug - group is created once we click on Create group
button and clicking on the email just opens a chat with this person. Also, as @bernhardoj pointed out - it works the same with requesting money: when we select with few people to split bill, and then click on one of the selected emails, it choose only this person and moves to the next step.
What do you think @adelekennedy?
let's close - this may be something we decide to change in the future but we can leave that to the split group to decide
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.13-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @quinthar Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1702580397915479
Action Performed:
Expected Result:
It opens a DM with Cathy (ignoring the group with Bob)
Actual Result:
Should open a group with Bob and Cathy
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/38435837/24bc0b8f-93dc-40fb-b68b-3d156fd47c52
View all open jobs on GitHub
Upwork Automation - Do Not Edit