Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
feat(templates): use non-experimental dynamic widgets (#544)
Browse files Browse the repository at this point in the history
FX-657
  • Loading branch information
Haroenv authored Dec 14, 2021
1 parent fbb4a0e commit efda539
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions e2e/__snapshots__/templates.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5737,7 +5737,7 @@ import {
Hits,
SearchBox,
Configure,
ExperimentalDynamicWidgets,
DynamicWidgets,
RefinementList,
Pagination,
Highlight,
Expand Down Expand Up @@ -5767,10 +5767,10 @@ function App() {
<div className=\\"search-panel\\">
<div className=\\"search-panel__filters\\">
<Configure facets={['*']} maxValuesPerFacet={20} />
<ExperimentalDynamicWidgets fallbackWidget={RefinementList}>
<DynamicWidgets fallbackWidget={RefinementList}>
<RefinementList attribute=\\"facet1\\" />
<RefinementList attribute=\\"facet2\\" />
</ExperimentalDynamicWidgets>
</DynamicWidgets>
</div>
<div className=\\"search-panel__results\\">
Expand Down Expand Up @@ -7456,10 +7456,10 @@ exports[`Templates Vue InstantSearch File content: src/App.vue 1`] = `
<div class=\\"search-panel\\">
<div class=\\"search-panel__filters\\">
<ais-configure :facets=\\"['*']\\" :max-values-per-facet.camel=\\"20\\" />
<ais-experimental-dynamic-widgets>
<ais-dynamic-widgets>
<ais-refinement-list attribute=\\"facet1\\" />
<ais-refinement-list attribute=\\"facet2\\" />
</ais-experimental-dynamic-widgets>
</ais-dynamic-widgets>
</div>
<div class=\\"search-panel__results\\">
Expand Down
2 changes: 1 addition & 1 deletion src/templates/React InstantSearch/.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
libraryName: 'react-instantsearch-dom',
supportedVersion: '>= 5.0.0 < 7.0.0',
flags: {
dynamicWidgets: '>=6.12',
dynamicWidgets: '>=6.16',
},
templateName: 'react-instantsearch',
appName: 'react-instantsearch-app',
Expand Down
6 changes: 3 additions & 3 deletions src/templates/React InstantSearch/src/App.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SearchBox,
{{#if flags.dynamicWidgets}}
Configure,
ExperimentalDynamicWidgets,
DynamicWidgets,
{{/if}}
{{#if attributesForFaceting}}
RefinementList,
Expand Down Expand Up @@ -42,11 +42,11 @@ function App() {
<div className="search-panel__filters">
{{#if flags.dynamicWidgets}}
<Configure facets={['*']} maxValuesPerFacet={20} />
<ExperimentalDynamicWidgets fallbackWidget={RefinementList}>
<DynamicWidgets fallbackWidget={RefinementList}>
{{#each attributesForFaceting}}
<RefinementList attribute="{{this}}" />
{{/each}}
</ExperimentalDynamicWidgets>
</DynamicWidgets>
{{else}}
{{#each attributesForFaceting}}
<RefinementList attribute="{{this}}" />
Expand Down
2 changes: 1 addition & 1 deletion src/templates/Vue InstantSearch/.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
libraryName: 'vue-instantsearch',
supportedVersion: '>= 3.0.0 < 5.0.0',
flags: {
dynamicWidgets: '>=3.8.0',
dynamicWidgets: '>=4.2.0',
},
templateName: 'vue-instantsearch',
appName: 'vue-instantsearch-app',
Expand Down
4 changes: 2 additions & 2 deletions src/templates/Vue InstantSearch/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<div class="search-panel__filters">
{{#if flags.dynamicWidgets}}
<ais-configure :facets="['*']" :max-values-per-facet.camel="20" />
<ais-experimental-dynamic-widgets>
<ais-dynamic-widgets>
{{#each attributesForFaceting}}
<ais-refinement-list attribute="{{this}}" />
{{/each}}
</ais-experimental-dynamic-widgets>
</ais-dynamic-widgets>
{{else}}
{{#each attributesForFaceting}}
<ais-refinement-list attribute="{{this}}" />
Expand Down

0 comments on commit efda539

Please sign in to comment.