Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.4.0 #34

Merged
merged 65 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
eaaf668
fix(preact/instantiator): adding support for both 'tag' and 'profile'…
korgon Oct 22, 2024
e008f79
docs(docs): removing all references to SnAPI documentation - will nee…
korgon Oct 22, 2024
04506d3
test(preact-demo): adjusting tracking test to no longer care about 429s
korgon Oct 23, 2024
8b31d14
Merge pull request #1180 from searchspring/docs-fixes
korgon Oct 23, 2024
7aaa6ee
feat(controller/autocomplete): adding new setting that prevents bindi…
korgon Oct 24, 2024
8661179
Merge pull request #1183 from searchspring/ac-prevent-document-click
korgon Oct 24, 2024
4e6648e
Merge pull request #1184 from searchspring/develop
korgon Oct 25, 2024
cc0a0e8
chore(publish): v0.61.0
searchspring-machine Oct 25, 2024
0076a0c
fix(preact/recommendationinstantiator): legacy script blocks were not…
korgon Oct 25, 2024
5404312
Merge pull request #1185 from searchspring/fix-missing-instantiator-c…
korgon Oct 25, 2024
2466108
chore(publish): v0.61.1
searchspring-machine Oct 25, 2024
0f479df
fix(preact/recommendationinstantiator): fixing error when globals was…
korgon Oct 28, 2024
82e2e8c
Merge pull request #1186 from searchspring/fix-profile-specific-integ…
korgon Oct 28, 2024
4fec7f7
chore(publish): v0.61.2
searchspring-machine Oct 28, 2024
93788d4
fix(preact/recommendationinstantiator): adding back support for legac…
korgon Oct 31, 2024
cf3d20d
Merge pull request #1187 from searchspring/instantiator-legacy-support
chrisFrazier77 Oct 31, 2024
8d3492f
chore(publish): v0.61.3
searchspring-machine Oct 31, 2024
5606a22
fix(controller/search): modifying logic to prevent warning when the l…
korgon Nov 5, 2024
66302ef
fix(preact/recommendationinstantiator): allowing for invalid shopper …
korgon Nov 6, 2024
8b5a2e1
fix(controller/search): fixing typo in warning log
korgon Nov 6, 2024
8976ceb
Merge pull request #1189 from searchspring/shopper-id-patch
korgon Nov 6, 2024
ff87b94
Merge pull request #1188 from searchspring/prevent-scrollmap-warning
korgon Nov 6, 2024
5f39853
Merge pull request #1191 from searchspring/develop
korgon Nov 6, 2024
13e39b7
chore(publish): v0.61.4
searchspring-machine Nov 6, 2024
1c1754a
fix(recommendationcontroller): send core result data and not active d…
chrisFrazier77 Nov 12, 2024
a942455
test(recommendationcontroller.test): add additional change to mapping…
chrisFrazier77 Nov 13, 2024
85e339f
fix(preact/recommendationinstantiator): fixing regression of batching…
korgon Nov 13, 2024
7545b29
Merge pull request #1196 from searchspring/recommendationtrackingsku
korgon Nov 13, 2024
7050b94
Merge pull request #1199 from searchspring/recs-batched-fix
korgon Nov 13, 2024
3e82f1d
Merge pull request #1200 from searchspring/develop
chrisFrazier77 Nov 13, 2024
bae1305
chore(publish): v0.61.5
searchspring-machine Nov 13, 2024
ca12fd5
fix(recommendationcontroller): recommendation backforward cache pages…
chrisFrazier77 Nov 18, 2024
55d6c6e
test(recommendationcontroller): add additional recommendationControll…
chrisFrazier77 Nov 18, 2024
e293acc
fix(toolbox/getcontext): auto-detect variables for evaluation list
korgon Nov 25, 2024
2f3207e
refactor(toolbox/getcontext): refactoring to remove iteration of a Set
korgon Nov 27, 2024
54c995e
refactor(searchonpageshow): rename bfCacheRestore to searchOnPageShow
chrisFrazier77 Dec 2, 2024
e414bd0
Merge pull request #1213 from searchspring/getcontext-vars
korgon Dec 4, 2024
e32f45d
fix(urltranslator.ts): gracefully catch malformed uri errors
chrisFrazier77 Dec 4, 2024
2099968
Merge pull request #1208 from searchspring/backforwardcache
korgon Dec 4, 2024
b179633
refactor(urltranslator.ts): add safety try catch aroun hash & query p…
chrisFrazier77 Dec 5, 2024
6980fce
feat(controller): adding setting in autocomplete to opt out of input …
korgon Dec 5, 2024
0884a3b
refactor(controller): removing console.log lines
korgon Dec 5, 2024
bc859c6
docs(autocomplete): adding documentation on bind setting
korgon Dec 5, 2024
d3b95f5
fix(searchresponse.ts): dont pull out badges with typeof array
chrisFrazier77 Dec 5, 2024
de027a7
Merge pull request #1221 from searchspring/badge-typeof-fix
korgon Dec 6, 2024
02ea149
fix(urltranslator.ts): pop dont join in parseHashString
chrisFrazier77 Dec 9, 2024
3361def
test(controller/autocomplete): adding test assertion to ensure handle…
korgon Dec 9, 2024
15655f6
fix(tracker): correcting issue with `ssViewedProducts` cookie storage
korgon Dec 9, 2024
0edb1ae
Merge pull request #1217 from searchspring/decodeurl-bugfix
korgon Dec 9, 2024
a9d884e
Merge pull request #1220 from searchspring/autocomplete-bind-settings
korgon Dec 9, 2024
fbec1ac
test(tracker): removing comments not related to test
korgon Dec 9, 2024
65ab3e7
fix(autocomplete): merchandising redirect race condition
dkonieczek Dec 9, 2024
f5b4dcb
Merge pull request #1222 from searchspring/lastviewed-correction
korgon Dec 9, 2024
a342cd1
fix(controller): bugfix for controller store loading / loaded states
chrisFrazier77 Dec 9, 2024
bb0bc0b
Merge pull request #1223 from searchspring/ac-merchandising-redirect
korgon Dec 9, 2024
b9de4f4
Merge pull request #1224 from searchspring/controller-loading-state-b…
korgon Dec 9, 2024
a5f1f44
docs(controller/recommendation): adding documentation around the sear…
korgon Dec 10, 2024
7de021a
Merge pull request #1225 from searchspring/adding-pageshow-docs
korgon Dec 10, 2024
6b56ef9
Merge pull request #1226 from searchspring/develop
korgon Dec 10, 2024
2c9561e
chore(publish): v0.62.0
searchspring-machine Dec 10, 2024
d0b2907
Merge remote-tracking branch 'upstream/develop' into merge-upstream
korgon Dec 13, 2024
31ac243
Merge pull request #31 from searchspring/merge-upstream
korgon Dec 13, 2024
fc51fb8
fix(preact/templates): correcting custom script context merge and com…
korgon Dec 16, 2024
2cdbbe2
test(preact/recommendationinstantiator): adding test to verify custom…
korgon Dec 23, 2024
65ceab9
Merge pull request #33 from searchspring/demo-changes
korgon Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,65 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
- **snap-layout/theming:** work towards theming a snap layout using styleScripts ([b6be05e](https://github.com/searchspring/snap-1.0/commit/b6be05eee8fc0a06c9e853a591aa0d380158fc0c))
- support template themes in snap-preact ([df9d905](https://github.com/searchspring/snap-1.0/commit/df9d9057a1554d7eb62830002c3db990e0f8f272))
- theme reactivity initial interface ([c017aad](https://github.com/searchspring/snap-1.0/commit/c017aadd4add7591bd98fcfbdb8db8985bf2d498))
# [0.62.0](https://github.com/searchspring/snap/compare/v0.61.5...v0.62.0) (2024-12-10)

### Bug Fixes

- **autocomplete:** merchandising redirect race condition ([65ab3e7](https://github.com/searchspring/snap/commit/65ab3e71630c30a45b4c35a0191e36f97a3dcbfa))
- **controller:** bugfix for controller store loading / loaded states ([a342cd1](https://github.com/searchspring/snap/commit/a342cd1e84c03f9b660a533b327a2f1c12682121))
- **recommendationcontroller:** recommendation backforward cache pageshow event listener ([ca12fd5](https://github.com/searchspring/snap/commit/ca12fd5b3dc0140037701d4d263c626562bdb651))
- **searchresponse.ts:** dont pull out badges with typeof array ([d3b95f5](https://github.com/searchspring/snap/commit/d3b95f5b0a33d97d7bfaad3edfe5bba842dc2764))
- **toolbox/getcontext:** auto-detect variables for evaluation list ([e293acc](https://github.com/searchspring/snap/commit/e293accd91dc72623847ef1fe710290803c6d536))
- **tracker:** correcting issue with `ssViewedProducts` cookie storage ([15655f6](https://github.com/searchspring/snap/commit/15655f6c05bd286d296f3f983a827c46ff976335))
- **urltranslator.ts:** gracefully catch malformed uri errors ([e32f45d](https://github.com/searchspring/snap/commit/e32f45d1a31b3ea3abc544182768e34ae33a9bdb))
- **urltranslator.ts:** pop dont join in parseHashString ([02ea149](https://github.com/searchspring/snap/commit/02ea1497c9d0b4868e872941337445435aeeeec0))

### Features

- **controller:** adding setting in autocomplete to opt out of input and submit binding' ([6980fce](https://github.com/searchspring/snap/commit/6980fcee30220714fd5837770eae725355f81dcf))

## [0.61.5](https://github.com/searchspring/snap/compare/v0.61.4...v0.61.5) (2024-11-13)

### Bug Fixes

- **preact/recommendationinstantiator:** fixing regression of batching in legacy script blocks ([85e339f](https://github.com/searchspring/snap/commit/85e339f6ddff7e0d7aa60360635fe1d7ed0b6122))
- **recommendationcontroller:** send core result data and not active display data in beacon tracking ([1c1754a](https://github.com/searchspring/snap/commit/1c1754a21a365064240cfb7c2433bab2a9b8d52a))

## [0.61.4](https://github.com/searchspring/snap/compare/v0.61.3...v0.61.4) (2024-11-06)

### Bug Fixes

- **controller/search:** fixing typo in warning log ([8b5a2e1](https://github.com/searchspring/snap/commit/8b5a2e1b5c26045930a661d4a76245bbd4f3ee64))
- **controller/search:** modifying logic to prevent warning when the lastRequest is not defined ([5606a22](https://github.com/searchspring/snap/commit/5606a22c6309f4f64c22726f637bddd3f19c9002))
- **preact/recommendationinstantiator:** allowing for invalid shopper integration with legacy script ([66302ef](https://github.com/searchspring/snap/commit/66302ef7d3968a8dec47755cc42ca8c595a8cf52))

## [0.61.3](https://github.com/searchspring/snap/compare/v0.61.2...v0.61.3) (2024-10-31)

### Bug Fixes

- **preact/recommendationinstantiator:** adding back support for legacy usage of seed and product ([93788d4](https://github.com/searchspring/snap/commit/93788d422510adc15840fac987631efe67f76d2e))

## [0.61.2](https://github.com/searchspring/snap/compare/v0.61.1...v0.61.2) (2024-10-28)

### Bug Fixes

- **preact/recommendationinstantiator:** fixing error when globals was undefined ([0f479df](https://github.com/searchspring/snap/commit/0f479dfbd1a98e3668545d22c7e59a90e8f17492))

## [0.61.1](https://github.com/searchspring/snap/compare/v0.61.0...v0.61.1) (2024-10-25)

### Bug Fixes

- **preact/recommendationinstantiator:** legacy script blocks were not merging the context ([0076a0c](https://github.com/searchspring/snap/commit/0076a0cf58a98ae74826feea1e3608dae4fd8af6))

# [0.61.0](https://github.com/searchspring/snap/compare/v0.60.4...v0.61.0) (2024-10-25)

### Bug Fixes

- **preact/instantiator:** adding support for both 'tag' and 'profile' keys ([eaaf668](https://github.com/searchspring/snap/commit/eaaf668973407db1d9c3b781c0f5a3f1fcf58832))

### Features

- **controller/autocomplete:** adding new setting that prevents binding the document click event ([7aaa6ee](https://github.com/searchspring/snap/commit/7aaa6ee4fee39ae7b1a05334270b76d052ce39ca))

## [0.60.4](https://github.com/searchspring/snap/compare/v0.60.3...v0.60.4) (2024-09-25)

Expand Down
32 changes: 16 additions & 16 deletions docs/INTEGRATION_LEGACY_RECOMMENDATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For integrations using Snap `v0.60.0` and newer, please reference the updated [`
It is recommended to utilize the [`RecommendationInstantiator`](https://github.com/searchspring/snap/blob/main/packages/snap-preact/src/Instantiators/README.md) for integration of product recommendations. This method allows recommendations to be placed anywhere on the site with a single script block (requires the `bundle.js` script also).

```html
<script type="searchspring/recommend" profile="recently-viewed">
<script type="searchspring/personalized-recommendations" profile="recently-viewed">
// context variables go here
</script>
```
Expand Down Expand Up @@ -45,28 +45,28 @@ In most cases batching is the best practice, however for profiles like a mini ca
The example below shows how to manually specify the order of the profiles and how to dedupe them. In the example the 'bundle' profile in the batch receives the best suggestions because it has the lowest order, and the 'quick-cart' profile is not deduplicating products at all.

```html
<script type="searchspring/recommend" profile="customers-also-bought">
<script type="searchspring/personalized-recommendations" profile="customers-also-bought">
products = ['product123'];
options = {
order: 2
};
</script>

<script type="searchspring/recommend" profile="customers-also-viewed">
<script type="searchspring/personalized-recommendations" profile="customers-also-viewed">
products = ['product123'];
options = {
order: 3
};
</script>

<script type="searchspring/recommend" profile="bundle">
<script type="searchspring/personalized-recommendations" profile="bundle">
products = ['product123'];
options = {
order: 1
};
</script>

<script type="searchspring/recommend" profile="quick-cart">
<script type="searchspring/personalized-recommendations" profile="quick-cart">
products = ['product123'];
options = {
dedupe: false
Expand All @@ -77,11 +77,11 @@ The example below shows how to manually specify the order of the profiles and ho
Alternatively, a profile can be placed in it's own batch via the `batched: false` value. The example below shows how to place the 'quick-cart' profile into it's own batch.

```html
<script type="searchspring/recommend" profile="bundle">
<script type="searchspring/personalized-recommendations" profile="bundle">
products = ['product123'];
</script>

<script type="searchspring/recommend" profile="quick-cart">
<script type="searchspring/personalized-recommendations" profile="quick-cart">
products = ['product123'];
options = {
batched: false
Expand All @@ -96,23 +96,23 @@ The examples below assume that profiles used have been setup in the Searchspring
A typical "similar" profile that would display products similar to the product passed in via the `product` context variable.

```html
<script type="searchspring/recommend" profile="similar">
<script type="searchspring/personalized-recommendations" profile="similar">
products = ['sku123'];
</script>
```

If tracking scripts are not in place, "also bought" profiles may require the cart contents to be provided.

```html
<script type="searchspring/recommend" profile="view-cart">
<script type="searchspring/personalized-recommendations" profile="view-cart">
cart = ['sku456'];
</script>
```

If the shopper identifier is not beeing captured by the `bundle.js` context, it must be provided for proper personalization.

```html
<script type="searchspring/recommend" profile="similar">
<script type="searchspring/personalized-recommendations" profile="similar">
shopper = {
id: '[email protected]'
};
Expand All @@ -122,16 +122,16 @@ If the shopper identifier is not beeing captured by the `bundle.js` context, it
Having multiple scripts batched using the order context variable

```html
<script type="searchspring/recommend" profile="view-cart">
<script type="searchspring/personalized-recommendations" profile="view-cart">
options = {
<!-- this will be added 2nd -->
order: 2,
};
</script>
<script type="searchspring/recommend" profile="customers-also-viewed">
<script type="searchspring/personalized-recommendations" profile="customers-also-viewed">
<!-- this will be added 3rd -->
</script>
<script type="searchspring/recommend" profile="customers-also-bought">
<script type="searchspring/personalized-recommendations" profile="customers-also-bought">
options = {
<!-- this will be added 1st -->
order: 1
Expand All @@ -143,7 +143,7 @@ Having multiple scripts batched using the order context variable
The example shown below will filter the recommendations for products matching field `color` with a value `blue` and `red`, as well as a field `price` with a range from `0` to `20`.

```html
<script type="searchspring/recommend" profile="customers-also-bought">
<script type="searchspring/personalized-recommendations" profile="customers-also-bought">
options = {
filters: [
{
Expand All @@ -169,7 +169,7 @@ The example shown below will filter the recommendations for products matching fi
The next example shows a global filter being used, this will filter all of the profiles in the batch for products matching the field `onSale` with a value `true`; the 'similar' profile will additionally apply a filter using the field `price` with a range from `0` to `20`.

```html
<script type="searchspring/recommend" profile="customers-also-bought">
<script type="searchspring/personalized-recommendations" profile="customers-also-bought">
filters = [
{
type: 'value',
Expand All @@ -179,7 +179,7 @@ The next example shows a global filter being used, this will filter all of the p
];
</script>

<script type="searchspring/recommend" profile="similar">
<script type="searchspring/personalized-recommendations" profile="similar">
options = {
filters: [
{
Expand Down
22 changes: 11 additions & 11 deletions docs/INTEGRATION_RECOMMENDATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The block below uses the `recently-viewed` profile which would typically be setu
};
profiles = [
{
profile: 'recently-viewed',
tag: 'recently-viewed',
selector: '.ss__recs__recently-viewed',
options: {
limit: 5
Expand All @@ -28,7 +28,7 @@ The block below uses the `recently-viewed` profile which would typically be setu
<div class="ss__recs__recently-viewed" style="min-height: 100vh;"><!-- recommendations will render here --></div>
```

The `RecommendationInstantiator` will look for these script blocks on the page and attempt to inject components based on the `selector` specified in each profile. In the example above, the profile specified is the `recently-viewed` profile, and is set to render inside the `.ss__recs__recently-viewed` element just below the script block. The targeted element could exist anywhere on the page - but it is recommended to group elements with script blocks whenever possible (for easy integration identification). The component to render into the targeted `selector` is setup within the `RecommendationInstantiator` configuration. The targeted element should be given a `min-height` inline style to prevent cumulative layout shift.
The `RecommendationInstantiator` will look for these script blocks on the page and attempt to inject components based on the `selector` specified in each profile. In the example above, the profile specified (via tag) is the `recently-viewed` profile, and is set to render inside the `.ss__recs__recently-viewed` element just below the script block. The targeted element could exist anywhere on the page - but it is recommended to group elements with script blocks whenever possible (for easy integration identification). The component to render into the targeted `selector` is setup within the `RecommendationInstantiator` configuration. The targeted element should be given a `min-height` inline style to prevent cumulative layout shift.


## Recommendation Context Variables
Expand All @@ -47,7 +47,7 @@ Context variables are set within the script blocks and can be used to set either
### Profile Specific Variables
| Option | Value | Placement | Description | Required
|---|---|:---:|---|:---:|
| profile | string | all | profile name to use | ✔️ |
| tag | string | all | profile tag name to use | ✔️ |
| selector | string | all | CSS selector to render component inside | ✔️ |
| options.siteId | global siteId overwrite | all | optional global siteId overwrite | |
| options.categories | array of category path strings | all | optional category identifiers used in category trending recommendation profiles | |
Expand Down Expand Up @@ -85,23 +85,23 @@ Here's an example that demonstrates deduping:
```html
<script type="searchspring/recommendations">
globals = {
products: ['product123'];
products: ['product123']
};
profiles = [
{
profile: 'customers-also-bought',
tag: 'customers-also-bought',
selector: '.ss__recs__crosssell',
options: {
limit: 5
}
},
{
profile: 'customers-also-viewed',
tag: 'customers-also-viewed',
selector: '.ss__recs__similar'
},
// same batch, but dedupe false
{
profile: 'customers-also-like',
tag: 'customers-also-like',
selector: '.ss__recs__alsoliked',
options: {
dedupe: false
Expand All @@ -124,7 +124,7 @@ A typical "similar" profile that would display products similar to the product p
};
profiles = [
{
profile: 'customers-also-viewed',
tag: 'customers-also-viewed',
selector: '.ss__recs__similar'
}
];
Expand All @@ -140,7 +140,7 @@ If tracking scripts are not in place, "crosssell" profiles may require the cart
};
profiles = [
{
profile: 'customers-also-bought',
tag: 'customers-also-bought',
selector: '.ss__recs__crosssell'
}
];
Expand All @@ -158,7 +158,7 @@ If the shopper identifier is not beeing captured by the `bundle.js` context, it
};
profiles = [
{
profile: 'view-cart',
tag: 'view-cart',
selector: '.ss__recs__cart'
}
];
Expand All @@ -172,7 +172,7 @@ The example shown below will filter the recommendations for products matching fi
<script type="searchspring/recommendations">
profiles = [
{
profile: 'customers-also-bought',
tag: 'customers-also-bought',
selector: '.ss__recs__crosssell',
options: {
filters: [
Expand Down
2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
function modifyLinks(markdown) {
var replaces = [
{ a: "(https://searchspring.github.io/snap/#/start-setup)", b: "(#/start-setup)"},
{ a: "(https://snapi.kube.searchspring.io/api/v1/#tag/Meta)", b: "(#/api-docs#Meta)"},
{ a: "(https://snapi.kube.searchspring.io/api/v1/)", b: "(#/api-docs)"},
{ a: "(https://searchspring.github.io/snapi-explorer/)", b: "(#/api-explorer)"},

{ a: "(https://github.com/searchspring/snap/blob/main/docs/SEARCH.md)", b: "(#/advanced-search)"},
Expand Down
Loading
Loading