Skip to content

[Hold for #20736] [$1000] Search in new group does not delete current search after result selection like it does in split bill search #20948

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Click on plus
  3. Click on split bill
  4. Search for specific user, select the user and observe the after selecting the result, it deletes the search term
  5. Go back to homepage and click on plus
  6. Click on new group
  7. Search for specific user, select the user and observe the after selecting the result, it does not delete the search term

Expected Result:

New group search should delete the search term after result is selected like it does for split bill search

Actual Result:

New group search does not delete the search term after result is selected

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.28.3

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

Notes/Photos/Videos: Any additional supporting documentation

new.group.search.not.delete.term.1.mp4
Recording.738.mp4

Expensify/Expensify Issue URL:

Issue reported by: @dhanashree-sawant

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686414344686509

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b80145a518fadfab
  • Upwork Job ID: 1670781126334717952
  • Last Price Increase: 2023-07-03

Activity

  1. added
    Daily
    Bug
    on Jun 16, 2023
  2. melvin-bot commented on Jun 16, 2023

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Jun 16, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. dukenv0307 commented on Jun 16, 2023

    @dukenv0307
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Search in new group does not delete current search after result selection like it does in split bill search

    What is the root cause of that problem?

    In the SplitBill we only retain text input if the user unselects a member and we will clear text input if the user selects a user

    searchTerm: isOptionInList ? prevState.searchTerm : '',

    Note that: In all other multi-selection places (new group, manage member, invite member), we always retain search input when the user selects or unselects a member

    What changes do you think we should make in order to solve the problem?

    In all other multi-selection places (new group, manage member, invite member) we should clear text instead of retaining text when the user selects a new option

    In here

    searchTerm: prevState.searchTerm,

    We should update like this

    searchTerm: isOptionInList ? prevState.searchTerm : '',
    

    Do the same thing on manage member, invite member page

    What alternative solutions did you explore? (Optional)

  5. added
    External
    on Jun 19, 2023
  6. changed the title [-]Search in new group does not delete current search after result selection like it does in split bill search[/-] [+][$1000] Search in new group does not delete current search after result selection like it does in split bill search[/+] on Jun 19, 2023
  7. melvin-bot commented on Jun 19, 2023

    @melvin-bot
  8. added
    Help Wanted
    on Jun 19, 2023
  9. melvin-bot commented on Jun 19, 2023

    @melvin-bot

    Current assignee @NicMendonca is eligible for the External assigner, not assigning anyone new.

  10. melvin-bot commented on Jun 19, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

  11. BhuvaneshPatil commented on Jun 19, 2023

    @BhuvaneshPatil
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Search in new group does not delete current search after result selection like it does in split bill search

    What is the root cause of that problem?

    We are not setting the searchTerm value in NewChatPage component's toggleOption() method.

    toggleOption(option) {
    this.setState((prevState) => {
    const isOptionInList = _.some(prevState.selectedOptions, (selectedOption) => selectedOption.login === option.login);
    let newSelectedOptions;
    if (isOptionInList) {
    newSelectedOptions = _.reject(prevState.selectedOptions, (selectedOption) => selectedOption.login === option.login);
    } else {
    newSelectedOptions = [...prevState.selectedOptions, option];
    }
    const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions(
    this.props.reports,
    this.props.personalDetails,
    this.props.betas,
    prevState.searchTerm,
    [],
    this.excludedGroupEmails,
    );
    return {
    selectedOptions: newSelectedOptions,
    recentReports,
    personalDetails,
    userToInvite,
    searchTerm: prevState.searchTerm,
    };
    });
    }

    What changes do you think we should make in order to solve the problem?

    • Update the state with appropriate value, i.e. ''
    • Update the getNewChatOptions() method in toggleOption()
    Results
    Untitled.video.-.Made.with.Clipchamp.6.mp4

    What alternative solutions did you explore? (Optional)

    As mentioned in #20948 (comment) We can alternatively remove the functionality from Split Bill or else add the same functionality (deleting search term ) in other components.

  12. 21 remaining items

  13. melvin-bot commented on Jun 30, 2023

    @melvin-bot

    @NicMendonca @fedirjh this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  14. fedirjh commented on Jul 2, 2023

    @fedirjh
    Contributor

    cc @NicMendonca Let's hold this issue for #20736, this PR will fix the Split bill search which I think will make the behavior consistent and we may not need to proceed with this issue.

  15. melvin-bot commented on Jul 3, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  16. changed the title [-][$1000] Search in new group does not delete current search after result selection like it does in split bill search[/-] [+][Hold for #20736] [$1000] Search in new group does not delete current search after result selection like it does in split bill search[/+] on Jul 5, 2023
  17. NicMendonca commented on Jul 5, 2023

    @NicMendonca
    Contributor

    updated

  18. fedirjh commented on Jul 10, 2023

    @fedirjh
    Contributor

    @NicMendonca Looks like the behavior is consistent now and this issue should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyExternalHelp Wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions