-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$500] Start chat-Removed newly selected participants from search results in group chat flow #29971
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @flodnv ( |
I'm unable to reproduce 😕 Are you able to @conorpendergrast ? Screen.Recording.2023-10-19.at.11.52.24.AM.mov |
Job added to Upwork: https://www.upwork.com/jobs/~0134c731261cf5cd20 |
Going to see if anyone External is able to reproduce this... |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
@abdulrahuman5196 are you able to reproduce? |
When you search the user who is not in your contacts and toggle it, it's not showing on the list when you search again. |
@flodnv . This was changed recently to show only the selected participants matching the search term recently. If the participants don't match the search term it won't be visible. Cc: @thienlnam |
I almost fixed that. I'll open the proposal soon |
@flodnv @lanitochka17 I am confused with the steps provided. Like when new user is selected it disappears from the list |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue we are trying to address is related to the behavior when searching for users to add to a chat. When a user is not in our contacts list and is selected, they disappear from the search results. Even if we search for them again, they do not appear in the search list. What is the root cause of that problem?This problem occurs because the new user is not returned in the getFilteredOptions function when they are selected. Consequently, they do not appear in the search results. What changes do you think we should make in order to solve the problem?To solve this issue, we should implement a function that checks whether the user we are searching for is already in the selected user list. If the user is in the list, they should be displayed in the search results. The code to be added is as follows: const isOptionInList = _.some(selectedOptions, (selectedOption) => selectedOption.login === searchTerm);
if (isOptionInList) {
sectionsList.push({
title: undefined,
data: [_.find(selectedOptions, (selectedOption) => selectedOption.login === searchTerm)],
shouldShow: !_.isEmpty(selectedOptions),
indexOffset,
});
indexOffset += selectedOptions.length;
} This code should be integrated into the 'sections' section of the code, which can be found here: Line 70 in 84be670
With these changes, even if the user we are searching for is not in our contacts list, they will remain in the search results until we delete the search text. What alternative solutions did you explore? (Optional)An alternative solution would be to remove the following code block: Lines 74 to 83 in 84be670
However, implementing this alternative solution would cause issues in the long term, as all users previously added to the chat would reappear in the search results, making it difficult to search for new users. |
This is a dupe of this bug report #29917 |
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.3.87-1
Reproducible in staging?: Yes
Reproducible in production?: No
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: Applause - Internal Team
Slack conversation:
Issue found when executing PR #29903
Action Performed:
Expected Result:
The newly selected participants show up in the search results
Actual Result:
Removed the newly selected participants from the search results in the group chat flow
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Windows: Chrome
Bug6242914_1697719005687.The_newly_added_group_member_is_not_show_up_in_the_search_results.mp4
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: