Skip to content
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

[HOLD for payment 2024-07-26] [Workspace Feeds] No message "No results found" under search field in "Who needs a card?" step #45270

Closed
6 tasks done
lanitochka17 opened this issue Jul 11, 2024 · 16 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 11, 2024

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: 9.0.6-1
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:

Precondition:

  • Workspace has at least 9 members
  • User is workspace admin
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Expensify Card (enable in More features)
  3. Click Issue new card
  4. In Step 1 - Who needs a card?, enter invalid term that will not return any result

Expected Result:

There will be message "No results found" under search field

Actual Result:

There is no message "No results found" under search field

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6538923_1720701329565.20240711_203129.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 11, 2024
Copy link

melvin-bot bot commented Jul 11, 2024

Triggered auto assignment to @puneetlath (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

@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

@nkdengineer
Copy link
Contributor

Proposal

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

There is no message "No results found" under search field

What is the root cause of that problem?

We don't pass the headerMessage prop accordingly here and then no message when no result found

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

We can use OptionsListUtils.getHeaderMessage as we do in other pages to get the header message

const [sections, headerMessage] = useMemo(() => {
    if (!debouncedSearchTerm) {
        return [[
            {
                data: membersDetails,
                shouldShow: true,
            },
        ], ''];
    }

    const searchValue = OptionsListUtils.getSearchValueForPhoneOrEmail(debouncedSearchTerm).toLowerCase();
    const filteredOptions = membersDetails.filter((option) => !!option.text?.toLowerCase().includes(searchValue) || !!option.alternateText?.toLowerCase().includes(searchValue));


    return [[
        {

            title: undefined,
            data: filteredOptions,
            shouldShow: true,
        },
    ], OptionsListUtils.getHeaderMessage(filteredOptions.length > 0, false, searchValue)];
}, [membersDetails, debouncedSearchTerm]);

and then pass it as headerMessage into SelectionList

headerMessage={headerMessage}

What alternative solutions did you explore? (Optional)

Or we don't want to show other message like email is invalid or phonenumber invalid message, we can simply only show not found message when filteredOptions is empty array, otherwise show nothing.

const [sections, headerMessage] = useMemo(() => {
    if (!debouncedSearchTerm) {
        return [[
            {
                data: membersDetails,
                shouldShow: true,
            },
        ], ''];
    }

    const searchValue = OptionsListUtils.getSearchValueForPhoneOrEmail(debouncedSearchTerm).toLowerCase();
    const filteredOptions = membersDetails.filter((option) => !!option.text?.toLowerCase().includes(searchValue) || !!option.alternateText?.toLowerCase().includes(searchValue));


    return [[
        {

            title: undefined,
            data: filteredOptions,
            shouldShow: true,
        },
    ], filteredOptions.length === 0 ? translate('common.noResultsFound') : ''];
}, [membersDetails, debouncedSearchTerm, translate]);

Result

Screen.Recording.2024-07-11.at.20.12.45.mov

@Julesssss
Copy link
Contributor

Not a blocker.

@Julesssss Julesssss added Daily KSv2 and removed Hourly KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Jul 11, 2024
@puneetlath
Copy link
Contributor

@mountiny
Copy link
Contributor

@koko57 would you like to take care of this one

@koko57
Copy link
Contributor

koko57 commented Jul 12, 2024

yep, will take care of it on Monday

@koko57
Copy link
Contributor

koko57 commented Jul 15, 2024

I'm prioritizing Settings Page now, as it's almost finished and I want to open the PR finally. I will take care of this issue afterwards.

@melvin-bot melvin-bot bot removed the Overdue label Jul 15, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Jul 16, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Jul 16, 2024
@koko57
Copy link
Contributor

koko57 commented Jul 16, 2024

PR opened for review: #45470

@trjExpensify trjExpensify changed the title Expensify Card - No message "No results found" under search field in "Who needs a card?" step [Workspace Feeds] No message "No results found" under search field in "Who needs a card?" step Jul 16, 2024
@trjExpensify trjExpensify moved this to Release 2: Summer 2024 (Aug) in [#whatsnext] #wave-collect Jul 16, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 19, 2024
@melvin-bot melvin-bot bot changed the title [Workspace Feeds] No message "No results found" under search field in "Who needs a card?" step [HOLD for payment 2024-07-26] [Workspace Feeds] No message "No results found" under search field in "Who needs a card?" step Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.9-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-26. 🎊

For reference, here are some details about the assignees on this issue:

  • @koko57 does not require payment (Contractor)
  • @DylanDylann requires payment (Needs manual offer from BZ)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

Issue is ready for payment but no BZ is assigned. @sonialiap you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

Copy link

melvin-bot bot commented Jul 26, 2024

Payment Summary

Upwork Job

  • Contributor: @koko57 is from an agency-contributor and not due payment
  • ROLE: @DylanDylann paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@sonialiap)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

@sonialiap, @koko57, @mountiny, @DylanDylann Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mountiny
Copy link
Contributor

I believe this can be closed now

@melvin-bot melvin-bot bot removed the Overdue label Jul 29, 2024
@github-project-automation github-project-automation bot moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collect Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering
Projects
Archived in project
Development

No branches or pull requests

8 participants