Skip to content

feat(recommend): add LookingSimilar, TrendingItems, TrendingFacets to Vue - #7129

Draft
Haroenv wants to merge 2 commits into
feat/vue-frequently-bought-togetherfrom
feat/vue-recommend-widgets
Draft

feat(recommend): add LookingSimilar, TrendingItems, TrendingFacets to Vue#7129
Haroenv wants to merge 2 commits into
feat/vue-frequently-bought-togetherfrom
feat/vue-recommend-widgets

Conversation

@Haroenv

@Haroenv Haroenv commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Stacked on #7128 (base = feat/vue-frequently-bought-together) — merge #7127#7128 → this in order.

What

Completes the recommend-widget coverage in vue-instantsearch by 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-in layout="carousel".
  • AisTrendingItems — same shape but keyed on optional facetName/facetValue instead of objectIDs; list + opt-in carousel.
  • AisTrendingFacets — wraps the self-contained facets component (no layout / sendEvent), rendering trending facet values for a required facetName.

Test plan

  • All three common suites unskipped and passing on Vue 2 and Vue 3.
  • New component tests (list + carousel for LookingSimilar/TrendingItems; facet list for TrendingFacets).
  • Full vue-instantsearch suite 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

… 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>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 42 complexity

Metric Results
Complexity 42

View in Codacy

TIP This summary will be updated as you push new changes.

@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown
More templates

algoliasearch-helper

npm i https://pkg.pr.new/algolia/instantsearch/algoliasearch-helper@7129

instantsearch-ui-components

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch-ui-components@7129

instantsearch.css

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch.css@7129

instantsearch.js

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch.js@7129

react-instantsearch

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch@7129

react-instantsearch-core

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-core@7129

react-instantsearch-nextjs

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-nextjs@7129

react-instantsearch-router-nextjs

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-router-nextjs@7129

vue-instantsearch

npm i https://pkg.pr.new/algolia/instantsearch/vue-instantsearch@7129

commit: 756126e

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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, and AisTrendingFacets.
  • 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>
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.

2 participants