Skip to content

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

Closed

Description

@lanitochka17

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jul 11, 2024
  2. melvin-bot commented on Jul 11, 2024

    @melvin-bot

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

  3. github-actions commented on Jul 11, 2024

    @github-actions
    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.
  4. lanitochka17 commented on Jul 11, 2024

    @lanitochka17
    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

  5. nkdengineer commented on Jul 11, 2024

    @nkdengineer
    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
  6. Julesssss commented on Jul 11, 2024

    @Julesssss
    Contributor

    Not a blocker.

  7. added and removed
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    on Jul 11, 2024
  8. puneetlath commented on Jul 11, 2024

    @puneetlath
    Contributor
  9. 21 remaining items

  10. melvin-bot commented on Jul 19, 2024

    @melvin-bot

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

  11. melvin-bot commented on Jul 19, 2024

    @melvin-bot

    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)
  12. melvin-bot commented on Jul 26, 2024

    @melvin-bot

    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!

  13. melvin-bot commented on Jul 26, 2024

    @melvin-bot

    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
  14. melvin-bot commented on Jul 29, 2024

    @melvin-bot

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

  15. mountiny commented on Jul 29, 2024

    @mountiny
    Contributor

    I believe this can be closed now

  16. moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collecton Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions