Skip to content

Commit e1a5f50

Browse files
authored
Merge pull request #1691 from algolia/epic/MAGE-997
MAGE-1005 Merge algoliaBundle epic changes
2 parents 78c833b + 79a6286 commit e1a5f50

File tree

9 files changed

+303
-231
lines changed

9 files changed

+303
-231
lines changed

README.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Algolia Search & Discovery extension for Magento 2
22
==================================================
33

44
![Latest version](https://img.shields.io/badge/latest-3.15.0-green)
5-
![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange)
5+
![Magento 2](https://img.shields.io/badge/Magento-2.4.6+-orange)
66

77
![PHP](https://img.shields.io/badge/PHP-8.1%2C8.2%2C8.3-blue)
88

@@ -45,6 +45,7 @@ Version 3.x of our extension is compatible with Magento 2.4. Review the [Customi
4545
| v3.12.x | 8/2/2024 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
4646
| v3.13.x | N/A | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
4747
| v3.14.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
48+
| v3.15.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
4849

4950
## Documentation
5051

@@ -62,7 +63,7 @@ The easiest way to install the extension is to use [Composer](https://getcompose
6263

6364
If you would like to stay on a minor version, please upgrade your composer to only accept minor versions. The following example will keep you on the minor version and will update patches automatically.
6465

65-
`"algolia/algoliasearch-magento-2": "~3.14.2"`
66+
`"algolia/algoliasearch-magento-2": "~3.15.0"`
6667

6768
### Customisation
6869

@@ -71,30 +72,51 @@ The extension uses libraries to help assist with the frontend implementation for
7172
These libraries are here to help add to your customisation but because the extension has already initialised these components, you should use hooks into the area between the extension and the libraries.
7273
Please check our [Custom Extension](https://github.com/algolia/algoliasearch-custom-algolia-magento-2) for refrence
7374

74-
### The Extension JS Bundle
75+
### Frontend JavaScript libraries
7576

76-
Knowing the version of the library will help you understand what is available in these libraries for you to leverage in terms of customisation. This table will help you determine which documentation to reference when you start working on your customisation.
77+
> As of v3.15.x the JavaScript bundle `algoliaBundle` has been removed as a hard dependency for the Magento extension and will be removed entirely in the next minor release. Libraries can now be swapped independently and loaded via RequireJS.
7778
78-
| Extension Version | autocomplete.js | instantsearch.js | search-insights.js | recommend.js |
79-
|-------------------|-------------------------------------------------------------------|--------------------------------------------------------------------| --- |-------------------------------------------------------------|
80-
| v3.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.15.0](https://github.com/algolia/instantsearch.js/tree/v4.15.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | NA |
81-
| v3.9.1 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.5.0](https://github.com/algolia/recommend/tree/v1.5.0) |
82-
| v3.10.x | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
83-
| v3.11.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
84-
| v3.13.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.63.0](https://github.com/algolia/instantsearch/tree/instantsearch.js%404.63.0) | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
85-
| >=v3.14.x | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3) | [4.63.0](https://github.com/algolia/instantsearch/tree/instantsearch.js%404.63.0) | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.15.0](https://github.com/algolia/recommend/tree/v1.15.0) |
79+
Knowing the version of each Algolia JavaScript library will help you understand what is available for you to leverage in terms of customisation. This table will help you determine which documentation to reference when you start working on your customisation.
8680

87-
The autocomplete and instantsearch libraries are accessible in the `algoliaBundle` global. This bundle is a prepackage javascript file that contains it's dependencies. What is included in this bundle can be seen here:
81+
| Extension Version | autocomplete.js | instantsearch.js | search-insights.js | recommend-js.js |
82+
|-----------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------|----------------------------------------------------------------------|-------------------------------------------------------------|
83+
| v3.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0)* | [4.15.0](https://github.com/algolia/instantsearch.js/tree/v4.15.0)* | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | NA |
84+
| v3.9.1 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3)* | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0)* | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.5.0](https://github.com/algolia/recommend/tree/v1.5.0) |
85+
| v3.10.x | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3)* | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0)* | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
86+
| v3.11.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3)* | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0)* | [2.6.0](https://github.com/algolia/search-insights.js/tree/v2.6.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
87+
| v3.13.0 | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3)* | [4.63.0](https://github.com/algolia/instantsearch/tree/instantsearch.js%404.63.0)* | [2.11.0](https://github.com/algolia/search-insights.js/tree/v2.11.0) | [1.8.0](https://github.com/algolia/recommend/tree/v1.8.0) |
88+
| v3.14.x | [1.6.3](https://github.com/algolia/autocomplete.js/tree/v1.6.3)* | [4.63.0](https://github.com/algolia/instantsearch/tree/instantsearch.js%404.63.0)* | [2.11.0](https://github.com/algolia/search-insights.js/tree/v2.11.0) | [1.15.0](https://github.com/algolia/recommend/tree/v1.15.0) |
89+
| v3.15.x | [1.17.9](https://github.com/algolia/autocomplete.js/tree/v1.17.9) | [4.77.0](https://github.com/algolia/instantsearch/tree/instantsearch.js%404.77.0) | [2.17.3](https://github.com/algolia/search-insights.js/tree/v2.17.3) | [1.16.0](https://github.com/algolia/recommend/tree/v1.16.0) |
8890

89-
v3.x latest bundle: https://github.com/algolia/algoliasearch-extensions-bundle/blob/ISv4/package.json
90-
91-
The search-insights.js library is standalone.
91+
* In earlier versions of the extension, the Autocomplete and InstantSearch libraries were accessible via the `algoliaBundle` global. This bundle was a prepackaged JavaScript file that contained dependencies for the frontend experience. What was included in this bundle can be seen here: https://github.com/algolia/algoliasearch-extensions-bundle/blob/ISv4/package.json
9292

9393
Refer to these docs when customising your Algolia Magento extension frontend features:
9494
- [Autocomplete](https://www.algolia.com/doc/integration/magento-2/customize/autocomplete-menu/)
9595
- [Instantsearch](https://www.algolia.com/doc/integration/magento-2/customize/instant-search-page/)
9696
- [Frontend Custom Events](https://www.algolia.com/doc/integration/magento-2/customize/custom-front-end-events/)
9797

98+
### JavaScript bundling
99+
100+
Libraries should be fully compatible with [standard JavaScript bundling](https://developer.adobe.com/commerce/frontend-core/guide/themes/js-bundling/). If using ["advanced bundling"](https://experienceleague.adobe.com/en/docs/commerce-operations/performance-best-practices/performance-best-practices/advanced-js-bundling) via the [RequireJS optimizer](https://requirejs.org/docs/optimization.html) it will be necessary to first apply the Babel transpiler to the underlying source code.
101+
102+
A sample transpiler configuration (`.babelrc`) might look as follows:
103+
104+
```json
105+
{
106+
"presets": [
107+
[
108+
"@babel/preset-env",
109+
{
110+
"exclude": ["@babel/plugin-transform-template-literals"]
111+
}
112+
],
113+
["minify", { "builtIns": false, "mangle": false }]
114+
],
115+
"comments": false
116+
}
117+
```
118+
119+
98120
### The Algolia PHP API Client
99121

100122
The extension does most of the heavy lifting when it comes to gathering and preparing the data needed for indexing to Algolia. In terms of interacting with the Algolia Search API, the extension leverages the PHP API Client for backend methods including indexing, configuration, and search queries.

view/adminhtml/web/css/common.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,3 +585,12 @@ form[action*="algoliasearch"] .accordion .config .value {
585585
.indexing-queue-logs-message p:last-child {
586586
margin-bottom: 0;
587587
}
588+
589+
/* Fix for Magento 2.4.7 admin menu bug */
590+
.admin__menu .submenu > ul > li.column > ul > li.level-1:only-of-type > .submenu-group-title {
591+
display: block !important;
592+
}
593+
594+
.admin__menu .submenu > ul > li.column:only-of-type > ul > li.level-1:only-of-type > .submenu-group-title {
595+
display: none !important;
596+
}

0 commit comments

Comments
 (0)