-
Notifications
You must be signed in to change notification settings - Fork 530
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 connectTrendingItems
connector
#6169
feat(recommend): introduce connectTrendingItems
connector
#6169
Conversation
6ad723c
to
7721866
Compare
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 b83dac2:
|
…ector
packages/instantsearch.js/src/connectors/trending-items/connectTrendingItems.ts
Outdated
Show resolved
Hide resolved
…ector
packages/instantsearch.js/src/connectors/trending-items/connectTrendingItems.ts
Show resolved
Hide resolved
{ act, skippedTests }: Required<TestOptions> | ||
) { | ||
skippableDescribe('options', skippedTests, () => { | ||
test('forwards parameters to the client', async () => { |
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.
there's no test that removing the widget removes the parameters too. Does that actually work, or does getParameters
only work with future.cleanUpOnDispose
?
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 looked into it and we missed handling this. There is support for removing recommend parameters at the helper level, but this is missing:
helper.removeXXX()
expects string ids but we switched to numerical ids- the connector's
dispose()
method receives the search state instead of the recommend state - no recommend connector calls
state.removeXXX()
as of now
I'll create a task for tackling this properly.
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.
lgtm for now, but indeed we should fix the remove and add another without extra request case
…ector
This introduces the
connectTrendingItems
connector and tests it in the connector common test suite.FX-2832