feat(index): support isolated index in Vue - #7126
Draft
Haroenv wants to merge 1 commit into
Draft
Conversation
Adds an `isolated` prop to `<ais-index>` (AisIndex), threaded through to the index widget's `isolated` option. `indexName` is no longer `required` because isolated indices don't need one — the underlying index widget validates that either `indexName` or `isolated` is provided. Vue never shipped the experimental `EXPERIMENTAL_isolated`, so only the stable `isolated` prop is exposed; no deprecated alias is needed here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
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
This PR updates Vue InstantSearch (packages/vue-instantsearch) to expose the now-stable isolated option on <ais-index> (AisIndex), allowing creation of isolated indices without requiring an indexName, aligning Vue’s API with the index widget’s capabilities.
Changes:
- Add an
isolatedboolean prop toAisIndexand forward it throughwidgetParams. - Make
indexNameoptional onAisIndexto support isolated indices without an explicit index name. - Extend the
AisIndexunit tests to coverisolated: truewith noindexName.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/vue-instantsearch/src/components/Index.js | Adds isolated prop support and makes indexName optional, forwarding both through widgetParams. |
| packages/vue-instantsearch/src/components/tests/Index.js | Adds assertions ensuring isolated is reflected in computed widgetParams, including when indexName is omitted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What
Adds an
isolatedprop to Vue's<ais-index>(AisIndex), threading it through to the index widget'sisolatedoption (graduated fromEXPERIMENTAL_isolatedin #7117). This brings Vue to parity with JS and React, which already exposeisolated.indexNameis no longerrequiredon<ais-index>, since isolated indices don't need one. The underlyingindexwidget already validates that eitherindexNameorisolatedis provided.EXPERIMENTAL_isolated, so only the stableisolatedprop is exposed — no deprecated alias is needed (unlike JS/React, which kept aliases for their previously-shipped experimental names).Test plan
yarn jest packages/vue-instantsearch/src/components/__tests__/Index.js— added a test assertingisolated: trueis passed towidgetParamswithout anindexName.vue-instantsearchsuite green on Vue 2 and Vue 3.Draft: opening early for review of the API shape.
🤖 Generated with Claude Code