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(recommend): introduce frequentlyBoughtTogether widget #6126

Merged
merged 78 commits into from
Apr 23, 2024

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Apr 9, 2024

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 the item template
  • headerComponent is now defined in the header template
  • fallbackComponent is now defined in the empty template
  • view is now defined in the view template (this has been removed from the initial implementation)

translations is foreign to InstantSearch.js, so I'm not in favor of introducing it with Recommend widgets:

  • the header template can sub for translations.title
  • we can introduce a sliderLabelText template when we'll migrate the horizontal slider if necessary

FX-2795

dhayab and others added 2 commits April 19, 2024 10:28
Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
Copy link
Member

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?

Copy link
Member Author

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.

Base automatically changed from feat/recommend-fbt-connector to feat/map-recommend-results April 23, 2024 07:56
@dhayab dhayab requested a review from sarahdayan April 23, 2024 08:15
@dhayab dhayab merged commit ecdc5a0 into feat/map-recommend-results Apr 23, 2024
8 checks passed
@dhayab dhayab deleted the feat/recommend-fbt-widget branch April 23, 2024 11:58
Haroenv pushed a commit that referenced this pull request May 21, 2024
---------

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>
dhayab added a commit that referenced this pull request May 21, 2024
---------

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>
dhayab added a commit that referenced this pull request May 21, 2024
---------

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Recommendations Providing recommendations of records or facets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants