Skip to content

Commit f0010a3

Browse files
authored
Merge pull request #1471 from algolia/release/3.13.0
Release/3.13.0
2 parents 1998c91 + 08585ab commit f0010a3

File tree

7 files changed

+56
-50
lines changed

7 files changed

+56
-50
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGE LOG
22

3+
## 3.13.0
4+
5+
### Updates
6+
- Updated instantSearch library version from 4.41.0 to 4.63.0
7+
- Updated disclaimer for advanced algolia indices settings in the magento admin
8+
39
## 3.12.1
410

511
### Updates

README.md

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

4-
![Latest version](https://img.shields.io/badge/latest-3.12.1-green)
4+
![Latest version](https://img.shields.io/badge/latest-3.13.0-green)
55
![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange)
66

77
![PHP](https://img.shields.io/badge/PHP-8.2%2C8.1%2C7.4-blue)
@@ -74,15 +74,16 @@ Please check our [Custom Extension](https://github.com/algolia/algoliasearch-cus
7474

7575
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.
7676

77-
| Extension Version | autocomplete.js | instantsearch.js | search-insights.js | recommend.js |
78-
|-------------------|-------------------------------------------------------------------| --- | --- | --- |
79-
| v1.x | [0.26.0](https://github.com/algolia/autocomplete.js/tree/v0.26.0) | [2.10.2](https://github.com/algolia/instantsearch.js/tree/v2.10.2) | [0.0.14](https://cdn.jsdelivr.net/npm/[email protected]) | NA |
80-
| v2.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.7.2](https://github.com/algolia/instantsearch.js/tree/v4.7.2) | [1.4.0](https://github.com/algolia/search-insights.js/tree/v1.4.0) | NA |
81-
| 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 |
82-
| 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) |
83-
| 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) |
84-
| 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) |
85-
| >=v3.12.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) | [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) |
77+
| Extension Version | autocomplete.js | instantsearch.js | search-insights.js | recommend.js |
78+
|-----------------|-------------------------------------------------------------------|--------------------------------------------------------------------| --- | --- |
79+
| v1.x | [0.26.0](https://github.com/algolia/autocomplete.js/tree/v0.26.0) | [2.10.2](https://github.com/algolia/instantsearch.js/tree/v2.10.2) | [0.0.14](https://cdn.jsdelivr.net/npm/[email protected]) | NA |
80+
| v2.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.7.2](https://github.com/algolia/instantsearch.js/tree/v4.7.2) | [1.4.0](https://github.com/algolia/search-insights.js/tree/v1.4.0) | NA |
81+
| 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 |
82+
| 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) |
83+
| 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) |
84+
| 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) |
85+
| >=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) |
86+
8687

8788
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:
8889

composer.json

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Algolia Search & Discovery extension for Magento 2",
44
"type": "magento2-module",
55
"license": ["MIT"],
6-
"version": "3.12.1",
6+
"version": "3.13.0",
77
"require": {
88
"magento/framework": "~102.0|~103.0",
99
"algolia/algoliasearch-client-php": "3.3.2",

etc/adminhtml/system.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@
12621262
<field id="analytics_region" translate="label comment" type="select" sortOrder="96" showInDefault="1">
12631263
<label>Analytics Region</label>
12641264
<source_model>Algolia\AlgoliaSearch\Model\Source\AnalyticsRegion</source_model>
1265-
</field>
1265+
</field>
12661266
<field id="connection_timeout" translate="label comment" type="text" sortOrder="100" showInDefault="1">
12671267
<label>Connection Timeout (In Seconds)</label>
12681268
</field>
@@ -1315,47 +1315,47 @@
13151315
</group>
13161316
</section>
13171317
<section id="algoliasearch_extra_settings" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
1318-
<label>Advanced - Extra Algolia indices settings</label>
1318+
<label>Advanced Algolia indices settings</label>
13191319
<tab>algolia</tab>
13201320
<resource>Algolia_AlgoliaSearch::algolia_algoliasearch</resource>
13211321
<group id="extra_settings" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
1322-
<label>Advanced - Extra Algolia indices settings</label>
1322+
<label>Advanced Algolia indices settings</label>
13231323
<comment>
13241324
<![CDATA[
13251325
<p>Here, you can specify additional Algolia indices settings which can be applied only programatically via one of Algolia API clients.</p>
13261326
13271327
<p>
1328-
To set extra settings, please fill the right textarea with JSON where you specify the extra settings.<br>
1328+
To set settings, please fill the right textarea with JSON where you specify the settings.<br>
13291329
Example: <code>{"exactOnSingleWordQuery":"word"}</code>
13301330
</p>
1331-
<p><span class="algolia-config-warning">&#9888;</span> Edit extra settings only when you're sure what you're doing. Bad settings can effect your search functionality and have a bad impact on your relevance.</p>
1331+
<p><span class="algolia-config-warning">&#9888;</span> These settings will overwrite existing parameters, not add to them. Proceed to edit these settings only when you're sure what you're doing. Bad settings can effect your search functionality and have a bad impact on your relevance.</p>
13321332
<br/>
13331333
<div class="algolia-admin-content"></div>
13341334
]]>
13351335
</comment>
13361336

13371337
<field id="products_extra_settings" translate="label comment" type="\Algolia\AlgoliaSearch\Model\Textarea" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
13381338
<backend_model>Algolia\AlgoliaSearch\Model\Backend\ExtraSettings</backend_model>
1339-
<label>Products' indices extra settings</label>
1339+
<label>Products' indices settings</label>
13401340
<attribute type="abrala" value="80">
13411341
<value>90</value>
13421342
</attribute>
13431343
</field>
13441344
<field id="categories_extra_settings" translate="label comment" type="\Algolia\AlgoliaSearch\Model\Textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
13451345
<backend_model>Algolia\AlgoliaSearch\Model\Backend\ExtraSettings</backend_model>
1346-
<label>Categories' indices extra settings</label>
1346+
<label>Categories' indices settings</label>
13471347
</field>
13481348
<field id="pages_extra_settings" translate="label comment" type="\Algolia\AlgoliaSearch\Model\Textarea" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
13491349
<backend_model>Algolia\AlgoliaSearch\Model\Backend\ExtraSettings</backend_model>
1350-
<label>Pages' indices extra settings</label>
1350+
<label>Pages' indices settings</label>
13511351
</field>
13521352
<field id="suggestions_extra_settings" translate="label comment" type="\Algolia\AlgoliaSearch\Model\Textarea" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
13531353
<backend_model>Algolia\AlgoliaSearch\Model\Backend\ExtraSettings</backend_model>
1354-
<label>Suggestions' indices extra settings</label>
1354+
<label>Suggestions' indices settings</label>
13551355
</field>
13561356
<field id="additional_sections_extra_settings" translate="label comment" type="\Algolia\AlgoliaSearch\Model\Textarea" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
13571357
<backend_model>Algolia\AlgoliaSearch\Model\Backend\ExtraSettings</backend_model>
1358-
<label>Additional sections' indices extra settings</label>
1358+
<label>Additional sections' indices settings</label>
13591359
</field>
13601360
</group>
13611361
</section>

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="Algolia_AlgoliaSearch" setup_version="3.12.1">
3+
<module name="Algolia_AlgoliaSearch" setup_version="3.13.0">
44
<sequence>
55
<module name="Magento_Theme"/>
66
<module name="Magento_Backend"/>

view/frontend/web/instantsearch.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ define(
9292
var instantsearchOptions = {
9393
searchClient: searchClient,
9494
indexName: indexName,
95-
searchFunction: function (helper) {
96-
if (helper.state.query === '' && !algoliaConfig.isSearchPage) {
97-
$('.algolia-instant-replaced-content').show();
98-
$('.algolia-instant-selector-results').hide();
99-
} else {
100-
helper.search();
101-
$('.algolia-instant-replaced-content').hide();
102-
$('.algolia-instant-selector-results').show();
103-
}
104-
},
10595
routing: window.routing,
10696
};
10797

@@ -242,7 +232,15 @@ define(
242232
data.last = Math.min(data.page * data.hitsPerPage + data.hitsPerPage, data.nbHits);
243233
data.seconds = data.processingTimeMS / 1000;
244234
data.translations = window.algoliaConfig.translations;
245-
235+
const searchParams = new URLSearchParams(window.location.search);
236+
const searchQuery = searchParams.has("q") || '';
237+
if (searchQuery === '' && !algoliaConfig.isSearchPage) {
238+
$('.algolia-instant-replaced-content').show();
239+
$('.algolia-instant-selector-results').hide();
240+
} else {
241+
$('.algolia-instant-replaced-content').hide();
242+
$('.algolia-instant-selector-results').show();
243+
}
246244
return hoganTemplate.render(data)
247245
}
248246
}

view/frontend/web/internals/algoliaBundle.min.js

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)