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

fix(vue-instantsearch): properly add noRefinement class on <ais-refinement-list> #6095

Merged
merged 2 commits into from Mar 19, 2024

Conversation

sarahdayan
Copy link
Member

@sarahdayan sarahdayan commented Mar 19, 2024

Summary

When the is searchable and a user searches for a facet value that doesn't exist, the root should have the class .ais-RefinementList--noRefinement. This was however not the case because we were relying on canRefine which remains true as long as the last search contains search results.

Now we're relying on the items returned from SFFV.

In the future, we may want to reconsider what canRefine means in the context of connectRefinementList, as the source of refinements comes from two places (main search and SFFV), but this would be breaking right now so we can keep it for later.

Note

This change doesn't update tests, because existing ones weren't testing this use case. This will be touched on in #6090.

@sarahdayan sarahdayan requested review from a team, dhayab and Haroenv and removed request for a team March 19, 2024 12:11
Copy link

codesandbox-ci bot commented Mar 19, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit df173a4:

Sandbox Source
react-instantsearch-app Configuration
example-react-instantsearch-default-theme Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-vue-instantsearch-default-theme Configuration

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

surprised there are no tests on this in vue. Did you also leave a comment on the InstantSearch.js connector that we want to change the meaning of canRefine in the next major?

@sarahdayan
Copy link
Member Author

Did you also leave a comment on the InstantSearch.js connector that we want to change the meaning of canRefine in the next major?

@Haroenv Just did in df173a4 so we don't forget about it.

@sarahdayan sarahdayan requested a review from Haroenv March 19, 2024 13:08
@sarahdayan sarahdayan merged commit 9ae7c05 into master Mar 19, 2024
12 checks passed
@sarahdayan sarahdayan deleted the fix/vue-refinement-list-no-refinement branch March 19, 2024 13:36
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