-
Notifications
You must be signed in to change notification settings - Fork 531
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(react-instantsearch): add Carousel
layout component
#6321
Conversation
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 5764eb9:
|
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.
packages/react-instantsearch/src/widgets/__tests__/FrequentlyBoughtTogether.test.tsx
Outdated
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.
🔥
@@ -90,7 +90,6 @@ export function createTrendingItemsComponent({ | |||
|
|||
<Layout | |||
classNames={cssClasses} | |||
translations={translations} |
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.
does this mean the "previous" and "next" labels aren't customisable, or is that done another way now?
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.
The translations we passed were the ones of the widget, and it didn't make sense to do so. Layouts have their own translations which they receive as a prop, but there's no point in passing widget translations.
This was carried over from the previous design from Recommend v1 where slider translations were all at the widget level, but the design we created makes them independent. This is also the reason why we should most probably deprecate the sliderLabel
translation.
packages/react-instantsearch/src/widgets/__tests__/__utils__/cx.ts
Outdated
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.
👏
bc219d7
to
0f2d896
Compare
This adds the the
Carousel
layout component and enables thelayoutComponent
prop in Recommend widgets. React getting started example has been update to useCarousel
as well.https://algolia.atlassian.net/browse/FX-2819