feat(vue): port FilterSuggestions#7033
Draft
aymeric-giraudet wants to merge 1 commit into
Draft
Conversation
Adds `AisFilterSuggestions`, a render-function component that delegates to `createFilterSuggestionsComponent` from `instantsearch-ui-components`. Unlike the recommendation widgets, `connectFilterSuggestions` exposes its own `isLoading` state — so this widget doesn't need `createRecommendMixin`. Wires up the Vue test setup with a flushing `act` to give the fetch-based connector time to settle, and reuses the per-test `skippedTests` keys introduced earlier (`templates`, `throws without agentId`) for the two scenarios Vue cannot match: the React/JS test cases pass function-valued component props, and Vue's `created` hook swallows the connector's synchronous throw. Depends on the Vue compat fixes, test-infra refactor, and Vue recommend port in the PRs stacked under this one.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 65 |
| Duplication | 41 |
TIP This summary will be updated as you push new changes.
More templates
algoliasearch-helper
instantsearch-ui-components
instantsearch.css
instantsearch.js
react-instantsearch
react-instantsearch-core
react-instantsearch-nextjs
react-instantsearch-router-nextjs
vue-instantsearch
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of #7032.
Summary
Adds `AisFilterSuggestions`, a render-function component that delegates to `createFilterSuggestionsComponent` from `instantsearch-ui-components`. Unlike the five recommendation widgets in the previous PR, `connectFilterSuggestions` exposes its own `isLoading` flag in its render state, so this widget doesn't need `createRecommendMixin`.
The Vue test setup uses the flushing `act` helper recommended in `testing.md` so the fetch-based connector has time to settle. Reuses the per-test `skippedTests` keys introduced in #7030 for the two cases Vue cannot match:
Test plan