-
Notifications
You must be signed in to change notification settings - Fork 522
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(recommend): introduce frequentlyBoughtTogether
widget
#6126
feat(recommend): introduce frequentlyBoughtTogether
widget
#6126
Conversation
Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
packages/instantsearch.js/src/widgets/frequently-bought-together/frequently-bought-together.tsx
Outdated
Show resolved
Hide resolved
...arch.js/src/widgets/frequently-bought-together/__tests__/frequently-bought-together.test.tsx
Show resolved
Hide resolved
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.
I'm wondering whether we should change a bit how we pass default templates, otherwise we'll have to duplicate them in every flavor although they should be the same.
Maybe each flavor shouldn't define default templates at all. Instead, we'd set them in the UI component and override them only when users pass them. WDYT?
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.
Definitely make sense to centralize component props at the ui-components level.
Not sure moving what we have as "templates" right now is worth it though. We'll remove templates altogether when we ditch Hogan, as we'll be able to rely on component props from ui-components directly.
Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
722d966
to
f577aa9
Compare
--------- Co-authored-by: Raed <raed.chammam@algolia.com> Co-authored-by: Aymeric Giraudet <aymeric.giraudet@algolia.com> Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
--------- Co-authored-by: Raed <raed.chammam@algolia.com> Co-authored-by: Aymeric Giraudet <aymeric.giraudet@algolia.com> Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
--------- Co-authored-by: Raed <raed.chammam@algolia.com> Co-authored-by: Aymeric Giraudet <aymeric.giraudet@algolia.com> Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
Summary
This PR introduces the
frequentlyBoughtTogether
widget for InstantSearch.js. It leverages the work done on #6114 for the ui component and #6117 for the connector, to create the built-in widget that users will be able to use.Notes
To make the widget feel native to InstantSearch, some changes have been made regarding props from the original standalone component:
itemComponent
is now defined in theitem
templateheaderComponent
is now defined in theheader
templatefallbackComponent
is now defined in theempty
template(this has been removed from the initial implementation)view
is now defined in theview
templatetranslations
is foreign to InstantSearch.js, so I'm not in favor of introducing it with Recommend widgets:header
template can sub fortranslations.title
sliderLabelText
template when we'll migrate the horizontal slider if necessaryFX-2795