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

[$500][MEDIUM] Categories: Search field is present in category list when there are fewer than 8 categories to choose from #37329

Closed
6 tasks done
lanitochka17 opened this issue Feb 27, 2024 · 13 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 27, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.44-0
Reproducible in staging?: Y
Reproducible in production?: N
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:

Action Performed:

Precondition:

  • User is an employee of Collect workspace
  • The Collect workspace has less than 8 categories
  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Open request money page
  4. Create manual request and proceed to confirmation page
  5. Click Show more > Category

Expected Result:

There will be no search field because there are less than 8 categories

Actual Result:

Search field is present when there are less than 8 categories

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

Bug6394369_1709055952133.20240227-141548-1_kEAvasRf.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0110ba1eec3b905bcd
  • Upwork Job ID: 1762535661381767168
  • Last Price Increase: 2024-02-27
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 27, 2024
@melvin-bot melvin-bot bot changed the title Category - Search field is present in Category list when there is less than 8 categories [$500] Category - Search field is present in Category list when there is less than 8 categories Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0110ba1eec3b905bcd

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave6
CC @greg-schroeder

@neonbhai
Copy link
Contributor

neonbhai commented Feb 27, 2024

Proposal

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

Search field is present in Category list when there is less than 8 categories

What is the root cause of that problem?

We don't pass shouldShowTextInput to the selection list in CategoryPicker. We are actually missing the prop in BaseSelectionList

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

We should add the shouldShowTextInput prop to SelectionList.
Also update this variable to factor in the prop

const shouldShowTextInput = !!textInputLabel;

Then pass this variable to SelectionList:

const showInput = !isCategoriesCountBelowThreshold;

Then pass this prop:

shouldShowTextInput={showInput}

@dukenv0307
Copy link
Contributor

Regression of this #35567.

@eucool
Copy link
Contributor

eucool commented Feb 27, 2024

Proposal

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

Search field is present in Category list when there is less than 8 categories

What is the root cause of that problem?

The variable name policyCategoriesCount is wrong:

const isCategoriesCountBelowThreshold = policyCategoriesCount < CONST.CATEGORY_LIST_THRESHOLD;

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

Replace the above with: policiesCount

const policiesCount = OptionsListUtils.getEnabledCategoriesCount(_.values(policyCategories));

What alternative solutions did you explore? (Optional)

N/A

@puneetlath
Copy link
Contributor

Definitely a bug, but doesn't need to block the deploy. Removing the label.

@puneetlath puneetlath removed the DeployBlockerCash This issue or pull request should block deployment label Feb 27, 2024
@greg-schroeder greg-schroeder changed the title [$500] Category - Search field is present in Category list when there is less than 8 categories [$500][MEDIUM] Categories: Search field is present in category list when there are fewer than 8 categories to choose from Feb 27, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 1, 2024
@jasperhuangg
Copy link
Contributor

Waiting for proposals

@melvin-bot melvin-bot bot removed the Overdue label Mar 1, 2024
@eucool
Copy link
Contributor

eucool commented Mar 1, 2024 via email

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2024
@akinwale
Copy link
Contributor

akinwale commented Mar 4, 2024

I am unable to reproduce this. Seems it has already been fixed on main.

const isCategoriesCountBelowThreshold = policiesCount < CONST.CATEGORY_LIST_THRESHOLD;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Development

No branches or pull requests

8 participants