algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.73k stars 525 forks source link

feat(experiences): add separate banner component #6356

Closed Haroenv closed 2 months ago

Haroenv commented 2 months ago

Summary

adds a separate banner "widget" (uses connectHits) and ensures banner doesn't show inside hits

Result

FX-3002

codesandbox-ci[bot] commented 2 months 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 7987eb8c22953c519abe761e5285c665e4592210:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration
dhayab commented 2 months ago

This implementation doesn't read from renderingContent.widgets.banner but instead relies on an explicit banner block, is that right?

Haroenv commented 2 months ago

@dhayab it reads from renderingContent still, but is a separate widget from the hits widget

dhayab commented 2 months ago

Oh I misread it, I see now it uses connectHits as the basis as well. Good for me then!