feat(recommend): add LookingSimilar, TrendingItems, TrendingFacets to Vue - #7129
Draft
Haroenv wants to merge 2 commits into
Draft
feat(recommend): add LookingSimilar, TrendingItems, TrendingFacets to Vue#7129Haroenv wants to merge 2 commits into
Haroenv wants to merge 2 commits into
Conversation
… Vue Ports the remaining recommend widgets to vue-instantsearch, reusing the hook-based UI infrastructure + Carousel introduced with RelatedProducts. - `AisLookingSimilar` and `AisTrendingItems` mirror the RelatedProducts shape (shared component + default list layout + opt-in `layout="carousel"`). - `AisTrendingFacets` wraps the self-contained facets component (no layout / sendEvent), rendering trending facet values. - Enables all three common suites for Vue and adds component-level tests. Stacked on the FrequentlyBoughtTogether PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 42 |
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: |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the remaining Recommend widgets to Vue InstantSearch by wrapping the existing instantsearch.js Recommend connectors with the shared instantsearch-ui-components UI factories (and reusing the Carousel + hooks-based Vue compat infrastructure introduced in the stacked PRs).
Changes:
- Exposes three new Vue widgets:
AisLookingSimilar,AisTrendingItems, andAisTrendingFacets. - Implements the widget wrappers (connector params → UI component props), including optional
layout="carousel"support for LookingSimilar/TrendingItems via the shared Carousel. - Enables and adds tests: component-level rendering tests + unskips Vue coverage in the common widget test suites.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vue-instantsearch/src/widgets.js | Exports the three new widgets from the Vue public widget barrel. |
| packages/vue-instantsearch/src/components/LookingSimilar.js | New widget wrapper around connectLookingSimilar + shared UI component; supports list/carousel layouts. |
| packages/vue-instantsearch/src/components/TrendingItems.js | New widget wrapper around connectTrendingItems + shared UI component; supports list/carousel layouts. |
| packages/vue-instantsearch/src/components/TrendingFacets.js | New widget wrapper around connectTrendingFacets + shared UI component (facet list). |
| packages/vue-instantsearch/src/components/tests/LookingSimilar.js | Adds Vue component rendering tests for list + carousel modes. |
| packages/vue-instantsearch/src/components/tests/TrendingItems.js | Adds Vue component rendering tests for list + carousel modes. |
| packages/vue-instantsearch/src/components/tests/TrendingFacets.js | Adds Vue component rendering test for facet list rendering. |
| packages/vue-instantsearch/src/tests/index.js | Ensures the widget index smoke test passes required props for new widgets. |
| packages/vue-instantsearch/src/tests/common-widgets.test.js | Wires the new widgets into Vue’s common widget test harness and removes skips for their suites. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ms/TrendingFacets Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 #7128 (base =
feat/vue-frequently-bought-together) — merge #7127 → #7128 → this in order.What
Completes the recommend-widget coverage in
vue-instantsearchby porting the last three, all reusing the hook-based UI infrastructure + Carousel from #7127 (no infra changes here):AisLookingSimilar— mirrors RelatedProducts (objectIDs); default list + opt-inlayout="carousel".AisTrendingItems— same shape but keyed on optionalfacetName/facetValueinstead ofobjectIDs; list + opt-in carousel.AisTrendingFacets— wraps the self-contained facets component (no layout /sendEvent), rendering trending facet values for a requiredfacetName.Test plan
vue-instantsearchsuite green on both versions; oxlint + prettier clean.With this, all five recommend widgets (RelatedProducts, FrequentlyBoughtTogether, LookingSimilar, TrendingItems, TrendingFacets) exist in Vue.
Draft, stacked.
🤖 Generated with Claude Code