feat(frequentlyBoughtTogether): add FrequentlyBoughtTogether to Vue - #7128
Draft
Haroenv wants to merge 2 commits into
Draft
feat(frequentlyBoughtTogether): add FrequentlyBoughtTogether to Vue#7128Haroenv wants to merge 2 commits into
Haroenv wants to merge 2 commits into
Conversation
…o Vue Ports the FrequentlyBoughtTogether recommend widget to vue-instantsearch, reusing the hook-based UI infrastructure and the Carousel layout introduced alongside RelatedProducts. - `AisFrequentlyBoughtTogether` wraps `connectFrequentlyBoughtTogether` and renders the shared component; default list layout passes the common suite, plus an opt-in `layout="carousel"`. - Enables the FrequentlyBoughtTogether common suite for Vue and adds component-level tests (list + carousel). Stacked on the RelatedProducts PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
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
Ports the FrequentlyBoughtTogether recommend widget into packages/vue-instantsearch, aligning with the hook-based shared UI approach introduced in the stacked infra PR (#7127) and enabling the Vue flavor to run the shared common widget test suite for this widget.
Changes:
- Exposes
AisFrequentlyBoughtTogetherfrom the Vue widget exports and registers it for component enumeration/tests. - Adds the Vue wrapper component for
connectFrequentlyBoughtTogether, rendering the sharedinstantsearch-ui-componentsUI with optionallayout="carousel"viaAisCarousel. - Enables the FrequentlyBoughtTogether common widget suite for Vue and adds Vue component-level tests for list + carousel layouts.
Reviewed changes
Copilot reviewed 5 out of 5 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 new AisFrequentlyBoughtTogether widget for public Vue usage. |
| packages/vue-instantsearch/src/components/FrequentlyBoughtTogether.js | Adds the Vue wrapper around connectFrequentlyBoughtTogether, including list/carousel layout support via shared UI components. |
| packages/vue-instantsearch/src/components/tests/FrequentlyBoughtTogether.js | Adds component-level rendering tests for list and carousel layouts using a recommend-capable mock client. |
| packages/vue-instantsearch/src/tests/index.js | Ensures the widget is included in the “all components” test harness with required props (objectIDs). |
| packages/vue-instantsearch/src/tests/common-widgets.test.js | Implements the Vue setup for the FrequentlyBoughtTogether common widget suite and unskips it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #7127 (base =
feat/vue-related-products) — review/merge that one first.What
Ports the FrequentlyBoughtTogether recommend widget to
vue-instantsearch, reusing the hook-based UI infrastructure + Carousel layout introduced in #7127. It's a near-mirror ofAisRelatedProducts, which validates that the shared infra generalizes cleanly to a second recommend widget.AisFrequentlyBoughtTogetherwrapsconnectFrequentlyBoughtTogether, renders the shared UI component. Default list layout passes the common suite; opt-inlayout="carousel".Test plan
vue-instantsearchsuite green; oxlint + prettier clean.Notes
Draft, stacked on the infra PR.
🤖 Generated with Claude Code