Skip to content

Commit 8247f9a

Browse files
committed
MAGE-999 Update HTML template paths to align with new naming convention for unpacked algoliaBundle (legacy paths retained for backward compat and deprecated)
1 parent 4771a4d commit 8247f9a

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

view/frontend/requirejs-config.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,46 @@ const config = {
99
'algoliaHooks' : 'Algolia_AlgoliaSearch/js/hooks',
1010

1111
// Autocomplete templates
12-
'productsHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/products',
13-
'pagesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/pages',
14-
'categoriesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/categories',
15-
'suggestionsHtml': 'Algolia_AlgoliaSearch/js/template/autocomplete/suggestions',
16-
'additionalHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/additional-section',
12+
'algoliaAutocompleteProductsHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/products',
13+
'algoliaAutocompletePagesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/pages',
14+
'algoliaAutocompleteCategoriesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/categories',
15+
'algoliaAutocompleteSuggestionsHtml': 'Algolia_AlgoliaSearch/js/template/autocomplete/suggestions',
16+
'algoliaAutocompleteAdditionalHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/additional-section',
1717

1818
// Recommend templates
19-
'recommendProductsHtml': 'Algolia_AlgoliaSearch/js/template/recommend/products',
19+
'algoliaRecommendProductsHtml': 'Algolia_AlgoliaSearch/js/template/recommend/products',
2020

2121
// Unbundling
2222
'algoliaTemplateEngine': 'Algolia_AlgoliaSearch/js/internals/template-engine'
2323
}
2424
},
2525
paths : {
26+
// Core Search UI libs
2627
'algoliaSearchLib' : 'Algolia_AlgoliaSearch/js/lib/algolia-search.min',
2728
'algoliaInstantSearchLib' : 'Algolia_AlgoliaSearch/js/lib/algolia-instantsearch.min',
2829
'algoliaAutocompleteLib' : 'Algolia_AlgoliaSearch/js/lib/algolia-autocomplete.min',
2930
'algoliaAnalytics' : 'Algolia_AlgoliaSearch/js/internals/search-insights',
30-
'algoliaQuerySuggestionsPluginLib': 'Algolia_AlgoliaSearch/js/lib/query-suggestions-plugin.min',
3131
'algoliaRecommendLib' : 'Algolia_AlgoliaSearch/js/lib/recommend.min',
3232
'algoliaRecommendJsLib' : 'Algolia_AlgoliaSearch/js/lib/recommend-js.min',
3333

34-
'rangeSlider': 'Algolia_AlgoliaSearch/js/navigation/range-slider-widget',
34+
// Autocomplete plugins
35+
'algoliaQuerySuggestionsPluginLib': 'Algolia_AlgoliaSearch/js/lib/query-suggestions-plugin.min',
3536

3637
// Legacy
3738
'algoliaMustacheLib': 'Algolia_AlgoliaSearch/js/lib/mustache.min',
3839
'algoliaHoganLib' : 'Algolia_AlgoliaSearch/js/lib/hogan.min',
3940

4041
// DEPRECATED
41-
'algoliaBundle' : 'Algolia_AlgoliaSearch/js/internals/algoliaBundle.min',
42-
'recommend' : 'Algolia_AlgoliaSearch/js/lib/recommend.min',
43-
'recommendJs' : 'Algolia_AlgoliaSearch/js/lib/recommend-js.min',
42+
'algoliaBundle' : 'Algolia_AlgoliaSearch/js/internals/algoliaBundle.min',
43+
'rangeSlider' : 'Algolia_AlgoliaSearch/js/navigation/range-slider-widget',
44+
'recommend' : 'Algolia_AlgoliaSearch/js/lib/recommend.min',
45+
'recommendJs' : 'Algolia_AlgoliaSearch/js/lib/recommend-js.min',
46+
'productsHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/products',
47+
'pagesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/pages',
48+
'categoriesHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/categories',
49+
'suggestionsHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/suggestions',
50+
'additionalHtml' : 'Algolia_AlgoliaSearch/js/template/autocomplete/additional-section',
51+
'recommendProductsHtml': 'Algolia_AlgoliaSearch/js/template/recommend/products',
4452
},
4553
deps : [
4654
'algoliaInstantSearch',

view/frontend/web/js/autocomplete.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ define([
33
'algoliaSearchLib',
44
'algoliaAutocompleteLib',
55
'algoliaQuerySuggestionsPluginLib',
6-
'pagesHtml',
7-
'categoriesHtml',
8-
'productsHtml',
9-
'suggestionsHtml',
10-
'additionalHtml',
6+
'algoliaAutocompletePagesHtml',
7+
'algoliaAutocompleteCategoriesHtml',
8+
'algoliaAutocompleteProductsHtml',
9+
'algoliaAutocompleteSuggestionsHtml',
10+
'algoliaAutocompleteAdditionalHtml',
1111
'algoliaCommon',
1212
'algoliaInsights',
1313
'algoliaHooks',

0 commit comments

Comments
 (0)