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 2023-09-25] [$500] Web - When manually entering a timezone, "No results found" is not shown when there are no search results #26573

Closed
1 of 6 tasks
kbecciv opened this issue Sep 2, 2023 · 22 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Sep 2, 2023

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. Click on settings > Profile > Timezone
  2. Turn off Automatically determine your location
  3. Input the number on search, Observed no results found but not showing "No results found"

Expected Result:

Show "No results found"

Actual Result:

Not displayed "No results found"

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.62.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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-08-28.at.22.22.43.mov
Recording.4196.mp4

Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693236150330049

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018b22f58c3d2060c6
  • Upwork Job ID: 1698491149454860288
  • Last Price Increase: 2023-09-04
  • Automatic offers:
    • namhihi237 | Contributor | 26489739
    • namhihi237 | Reporter | 26489742
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Sep 2, 2023

Proposal by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693236150330049

Proposal

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

Show "No results found" when no search result

What is the root cause of that problem?

We are using SelectionList here to show the list timezone. But we don't have the logic to display "No results found" through the headerMessage prop when there are no search results.

<SelectionList
textInputLabel={translate('timezonePage.timezone')}
textInputValue={timezoneInputText}
onChangeText={filterShownTimezones}
onSelectRow={saveSelectedTimezone}
sections={[{data: timezoneOptions, indexOffset: 0, isDisabled: timezone.automatic}]}
initiallyFocusedOptionKey={_.get(_.filter(timezoneOptions, (tz) => tz.text === timezone.selected)[0], 'keyForList')}
shouldDelayFocus
showScrollIndicator
/>

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

We should add headerMessage prop for SelectionList

headerMessage={timezoneInputText.trim() && !timezoneOptions.length ? translate('common.noResultsFound') : ''}

What alternative solutions did you explore? (Optional)

N/A

@jliexpensify
Copy link
Contributor

@kbecciv and @namhihi237 I don't think this is a bug: it's working as intended, as you've disabled the location and are typing a series of numbers. Sure, it would be nice to surface an error, but at the same time, users shouldn't expect anything to pop up if they're typing numbers in a field that uses letters. I don't see this as a true, valid bug.

@namhihi237
Copy link
Contributor

namhihi237 commented Sep 4, 2023

Hi @jliexpensify Don't just enter numbers, if you enter letters without results, it still won't display "no results found". I see in the app we currently have several search places. At the same, "no results found" is displayed everywhere if the user searches without seeing results.

@jliexpensify jliexpensify reopened this Sep 4, 2023
@jliexpensify
Copy link
Contributor

jliexpensify commented Sep 4, 2023

Got it, thanks for letting me know - here is what we use for another field:
image

For consistency's sake, I'd then consider the lack of "No Results Found" to be an issue. I can also reproduce on Android (Pixel 3a) and Chrome.

@jliexpensify jliexpensify changed the title Web - App doesn't show the result "not found" when there are no search results Web - When manually entering a timezone, "No results found" is not shown when there are no search results Sep 4, 2023
@namhihi237
Copy link
Contributor

thanks @jliexpensify.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 4, 2023
@melvin-bot melvin-bot bot changed the title Web - When manually entering a timezone, "No results found" is not shown when there are no search results [$500] Web - When manually entering a timezone, "No results found" is not shown when there are no search results Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018b22f58c3d2060c6

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@zukilover
Copy link
Contributor

Proposal

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

Show "No results found" when no search result

What is the root cause of that problem?

BaseSelectionList component does not currently handle empty list. It will only show loading indicator when it has no list and is loading:

{flattenedSections.allOptions.length === 0 && showLoadingPlaceholder ? (
<OptionsListSkeletonView shouldAnimate />
) : (

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

Instead of manually adding headerMessage on its implementations, I propose that we handle empty list with translate('common.noResultsFound') directly from the BaseSelectionList component. We will add another ternary condition where: it will show the no result indicator when the it is not loading the content.

This is more efficient and is addressing common case where the list does not have content to show.

{flattenedSections.allOptions.length === 0
? showLoadingPlaceholder 
    ? <OptionsListSkeletonView shouldAnimate />
    : (
       <View style={[styles.ph5, styles.pb5]}>
              <Text style={[styles.textLabel, styles.colorMuted]}>{translate('common.noResultsFound')}</Text>
       </View>
)                 

We can further refactor the code above so that the header message element can be reused.

What alternative solutions did you explore? (Optional)

N/A

@mubin-khalid
Copy link

I was looking through this problem. This closely resembles to one I found on SO. The problem is: You can't use SectionList's ListEmptyComponent to achieve this as you do with the FlatList component. ListEmptyComponentis only triggered when the data prop is empty. If however you have any section in the data prop, then ListEmptyComponent won't be triggered. This link surely will be useful

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

📣 @mubin-khalid! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@narefyev91
Copy link
Contributor

Proposal from @namhihi237 looks good to me #26573 (comment)
We already have a prop - which is rendering under the input, and we should use it to add 'No results'. Refactoring globally section list may cause potential regression issues.
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @namhihi237 got assigned: 2023-09-04 13:51:25 Z
  • when the PR got merged: 2023-09-13 09:01:26 UTC
  • days elapsed: 6

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 18, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web - When manually entering a timezone, "No results found" is not shown when there are no search results [HOLD for payment 2023-09-25] [$500] Web - When manually entering a timezone, "No results found" is not shown when there are no search results Sep 18, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 18, 2023
@jliexpensify
Copy link
Contributor

Payment summary:

Upwork job

@jliexpensify
Copy link
Contributor

Bump for @narefyev91 to complete the checklist please!

@narefyev91
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR - it was missing functionality which was not coming from any regression work
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment - N/A
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion - N/A
  • Determine if we should create a regression test for this bug. - N/A

@jliexpensify
Copy link
Contributor

Paid and job closed!

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 Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants