algolia / vue-instantsearch

👀 Algolia components for building search UIs with Vue.js
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue
MIT License
854 stars 157 forks source link

feat(widgets): pass $$widgetType #1121

Closed Haroenv closed 2 years ago

Haroenv commented 2 years ago

This is used for metadata, and allows to distinguish between builtin widgets and custom ones using createWidgetMixin by the users.

The design using additionalParameters is inspired by what we chose in React InstantSearch Hooks.

FX-916

Test-wise I've refactored the global "all widgets" test to enforce this too.

codesandbox-ci[bot] commented 2 years ago

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 5fe0d6f7dfc6421df7f2ad5a97553bf5a66fdf0f:

Sandbox Source
vue-instantsearch-e-commerce Configuration
Haroenv commented 2 years ago

Need to rewrite the test for Vue 3, it needs to use createApp, not new Vue