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

Show selected refinements even for no results. #1622

Merged
merged 4 commits into from
Dec 18, 2023
Merged

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Dec 15, 2023

Description

Screenshot Description
Screenshot of color and size refinements, with Beige and 16 visible as selected By looking at the place where you choose refinements, can you tell which refinements you have chosen?
Screenshot of breadcrumbs and selected filters buttons, showing Beige, Orange, and 16 as selected No, you can't! In this screenshot, we've also selected "Orange", but you can't tell unless you know to look at an entirely separate part of the page.
Screenshot of color and size refinements, with Beige, Orange, and 16 visible as selected That's confusing! So this PR fixes that. Now you can see "Orange", even though it has zero results! This will help mitigate customer confusion as they tweak their refinements.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

How to Test-Drive This PR

  • Start dev server
  • View a PLP
  • Apply filters that result in a refinement with zero hits (example page from screenshots)
  • The refinement with zero hits should still be visible!

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@wjhsf wjhsf requested a review from a team as a code owner December 15, 2023 20:38
@wjhsf wjhsf enabled auto-merge December 18, 2023 16:49
Copy link
Collaborator

@alexvuong alexvuong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vcua-mobify
Copy link
Contributor

How do you select a refinement with 0 results though? Just through URI manipulation?

I think the change itself is good but if there are no results, should an option be a valid filter or should it just be ignored?

Copy link
Contributor

@vcua-mobify vcua-mobify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to approve as the change itself is valid.

@wjhsf
Copy link
Contributor Author

wjhsf commented Dec 18, 2023

How do you select a refinement with 0 results though? Just through URI manipulation?

I think the change itself is good but if there are no results, should an option be a valid filter or should it just be ignored?

Just by clicking! Try Womens Clothing, Orange + Beige colors, then Size 16. The search results will have zero orange hits, even though orange is a selected filter!

@wjhsf wjhsf merged commit 0843abc into develop Dec 18, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants