-
Notifications
You must be signed in to change notification settings - Fork 497
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
fix(recommend): provide insights query parameters to recommend queries #6123
Closed
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
440e9cc
chore: update algoliasearch version
dhayab 81b4400
feat(helper): add methods to request and retrieve recommendations
dhayab 0eac184
add tests
dhayab 98018d8
emit placeholder change event and test events better
dhayab 84937b3
Merge branch 'master' into feat/helper-recommend-methods
dhayab 6f064f8
bump bundle sizes
dhayab 9469f26
Merge branch 'master' into feat/helper-recommend-methods
dhayab 2cc4743
retrieve recommend queries on all index widgets through derived helpers
dhayab 2a70204
add tests for derived helper
dhayab 2518d91
bump bundlesize
dhayab 7ab1436
feat(recommend): add FBT to instantsearch-ui-components
raed667 d326cab
fix: split component files to fix type errors
raed667 60f8c9c
fix babel spread issue
raed667 ab5dd33
replace classes auc with ais
raed667 e8544c6
fix: address feedback
raed667 7ade025
fix: address feedback by adding tests and TS types
raed667 e041a2f
wip: map recommend results to widgets
aymeric-giraudet 8813c64
remove comment
raed667 60a9ef6
Merge branch 'feat/map-recommend-results' into feat-recommend-fbt-ui-…
raed667 ad70293
feat(recommend): add FBT to connector
raed667 60f052b
fix: results
aymeric-giraudet c90ef99
fix: typescript
aymeric-giraudet 418cffb
fix types
aymeric-giraudet 5c69418
bundlesize
aymeric-giraudet 46c2531
Merge branch 'master' into feat/map-recommend-results
aymeric-giraudet bd942b4
Merge branch 'feat-recommend-fbt-ui-component' into feat/recommend-fb…
raed667 deab535
Merge branch 'feat/map-recommend-results' into feat-recommend-fbt-ui-…
raed667 c65c703
wip: map recommend results to widgets
aymeric-giraudet 859c5ba
fix: results
aymeric-giraudet 3785724
fix: typescript
aymeric-giraudet ea2259d
fix types
aymeric-giraudet 6eab8a3
bundlesize
aymeric-giraudet 61ba925
Merge branch 'master' into feat/map-recommend-results
aymeric-giraudet 49f9efe
fix
aymeric-giraudet 6c1dc58
Merge branch 'feat/map-recommend-results' into feat-recommend-fbt-ui-…
raed667 cbe9d9a
Merge branch 'feat-recommend-fbt-ui-component' into feat/recommend-fb…
raed667 41ec195
fix linit issue
raed667 f1eb001
fix linit issue
raed667 2baed0e
Merge branch 'feat-recommend-fbt-ui-component' into feat/recommend-fb…
raed667 02de7c2
bundlesize
raed667 e945286
fix(recommend): provide insights query parameters to recommend queries
dhayab b057a43
test query with existing queryParameters
dhayab File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ scripts/*/CHANGELOG.md | |
# private files | ||
.env | ||
.idea/ | ||
.vscode/ | ||
|
||
# Caches | ||
.eslintcache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/algoliasearch-helper/src/RecommendResults/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Constructor for SearchResults | ||
* @class | ||
* @classdesc SearchResults contains the results of a query to Algolia using the | ||
* {@link AlgoliaSearchHelper}. | ||
* @param {RecommendParameters} state state that led to the response | ||
* @param {Record<string,RecommendResultItem>} results the results from algolia client | ||
**/ | ||
function RecommendResults(state, results) { | ||
this._state = state; | ||
this._rawResults = results; | ||
|
||
// eslint-disable-next-line consistent-this | ||
var self = this; | ||
|
||
state.params.forEach(function (param) { | ||
var id = param.$$id; | ||
self[id] = results[id]; | ||
}); | ||
} | ||
|
||
RecommendResults.prototype = { | ||
constructor: RecommendResults, | ||
}; | ||
|
||
module.exports = RecommendResults; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: If the client passes
queryParameters
to the recommend widget, do they "lose" automatic event collection ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is augmented thanks to
Object.assign()
, but it's a good idea to have a specific test for that, I'll add it to the PR.