feat(vue): port the five recommendation widgets#7032
Draft
aymeric-giraudet wants to merge 1 commit into
Draft
Conversation
Adds Vue wrappers for the recommendation/recommend-shared family: `AisRelatedProducts`, `AisTrendingItems`, `AisTrendingFacets`, `AisLookingSimilar`, and `AisFrequentlyBoughtTogether`. Each one is a small render-function component that delegates to the shared `createXxxComponent` factory from `instantsearch-ui-components`, matching the `Hits.js` precedent. Introduces `mixins/recommend.js`: the shared UI factories need a reactive `status` prop to decide between "render results" and "render empty state." React reads it from `useInstantSearch().status`; Vue subscribes to the InstantSearch render lifecycle through this mixin and falls back to `'idle'` when no real instance is available (so the package's registry tests in `src/__tests__/index.js` keep passing). Replaces the "X is not supported in Vue InstantSearch" placeholders in `src/__tests__/common-widgets.test.js` with real test setups and clears the per-suite `skippedTests` entries. The test setups wait through a microtask plus two Vue ticks so the asynchronous Recommend response is applied before the assertions run. Depends on the Vue compat fixes and the common-test normalizers in the two PRs stacked under this one.
3 tasks
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 23 |
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 #7031.
Summary
Adds Vue wrappers for the recommendation/recommend-shared family — `AisRelatedProducts`, `AisTrendingItems`, `AisTrendingFacets`, `AisLookingSimilar`, `AisFrequentlyBoughtTogether`. Each one is a small render-function component that delegates to the matching `createXxxComponent` factory from `instantsearch-ui-components`, following the `Hits.js` precedent.
Test plan
Next in the stack: Vue FilterSuggestions.