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

feat(insights): automatically load search-insights if not passed #5484

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Feb 16, 2023

Summary

When the insights middleware is instantiated, it will attempt to extract or load a search-insights client.

Result

  • insights middleware makes insightsClient optional
  • first it checks if there's an unlinked existing insights client
  • then it loads search-insights from jsDelivr
  • if there's an error in this loading, nothing happens

FX-2244

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 16, 2023

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 15fa6af:

Sandbox Source
InstantSearch.js Configuration
react-instantsearch-app Configuration
example-react-instantsearch-hooks-default-theme Configuration
example-vue-instantsearch-default-theme Configuration

@Haroenv Haroenv requested review from a team, dhayab and aymeric-giraudet and removed request for a team February 16, 2023 16:27
@Haroenv Haroenv requested review from sarahdayan and dhayab February 21, 2023 10:45
@Haroenv Haroenv merged commit 4904381 into feat/automatic-insights Feb 21, 2023
@Haroenv Haroenv deleted the feat/automatic-insights-client branch February 21, 2023 13:23
Haroenv added a commit that referenced this pull request Mar 2, 2023
* feat(insights): automatically load search-insights if not passed

FX-2244

* different wording

* fix(insights): notify of error when insights fails to load

* prettier snippet
Haroenv added a commit that referenced this pull request Mar 8, 2023
* feat(insights): automatically load search-insights if not passed

FX-2244

* different wording

* fix(insights): notify of error when insights fails to load

* prettier snippet
Haroenv added a commit that referenced this pull request Apr 18, 2023
* feat(insights): automatically load search-insights if not passed

FX-2244

* different wording

* fix(insights): notify of error when insights fails to load

* prettier snippet
Haroenv added a commit that referenced this pull request Apr 24, 2023
* feat(insights): automatically load search-insights if not passed

FX-2244

* different wording

* fix(insights): notify of error when insights fails to load

* prettier snippet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants