-
Notifications
You must be signed in to change notification settings - Fork 532
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): add Trending-Facets model #6556
base: master
Are you sure you want to change the base?
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 9fb4690:
|
c0c390d
to
6e760d8
Compare
6e760d8
to
bc997e5
Compare
@algolia/frontend-experiences-web hi team, this is not urgent, but can someone help figure out go the fix the V4 types 🙏 ? |
@@ -0,0 +1,6 @@ | |||
import type { TrendingFacetHit as Base } from 'algoliasearch/lite'; |
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.
you'll want to import this in the algoliasearch.d.ts file in the helper and correctly ts-ignore, and pass the relevant type of v3 (any?), v4 and v5
c077e94
to
c02fee6
Compare
@@ -19,7 +19,7 @@ import type { | |||
Renderer, | |||
SendEventForHits, | |||
} from '../types'; | |||
import type { TrendingFacetHit as Base } from 'algoliasearch/lite'; | |||
import type { TrendingFacetHit as Base } from 'instantsearch.js'; |
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.
you should import from ../types
c02fee6
to
9137cc8
Compare
Renderer, | ||
SendEventForHits, | ||
} from '../types'; | ||
import type { TrendingFacetHit } from 'algoliasearch'; |
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.
this should also be in the helper or just retyped { objectID: string, facetValue: string}
?
cb6e6d3
to
2806db3
Compare
2806db3
to
be5ab5c
Compare
Originally we didn't implement trending facets as it's not clear how we want to incorporate the filtering / links inside it, as it could be many different attributes, refinement types. However, it makes sense to be able to fully deprecate the old recommend widgets, and so we'll need trending facets too. What we'll need to be able to later create a filtering directly from this widget I think is to make the itemComponent required here, so changing the default isn't a breaking change. |
Summary
Add Recommend model
trending-facets
TODO
sendEvent
(Recommend analytics does not supporttrending-facets
)