-
Notifications
You must be signed in to change notification settings - Fork 331
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
feat(insights): allow to pass init params #1230
Conversation
packages/autocomplete-plugin-algolia-insights/src/createAlgoliaInsightsPlugin.ts
Show resolved
Hide resolved
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 84de95f:
|
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.
code lgtm
packages/autocomplete-plugin-algolia-insights/src/createAlgoliaInsightsPlugin.ts
Show resolved
Hide resolved
if (insightsInitParams) { | ||
insightsClient('init', { partial: true, ...insightsInitParams }); | ||
} |
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.
Should we add a condition that checks we can use the partial init here (isModernInsightsClient()
) ?
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.
as it's additional, and only when people pass the insights init parameters, I'm not sure if it's needed
Summary
FX-2699
Result
No need for changes in
autocomplete-core
as it takes types from the pluginTested it on playground with
useCookie
anduserToken
and it works well