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 connectTrendingItems connector #6169

Merged
merged 8 commits into from May 3, 2024

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Apr 29, 2024

This introduces the connectTrendingItems connector and tests it in the connector common test suite.

FX-2832

Copy link

codesandbox-ci bot commented Apr 29, 2024

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:

Sandbox Source
react-instantsearch-app Configuration
example-react-instantsearch-default-theme Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-vue-instantsearch-default-theme Configuration

Base automatically changed from feat/recommend-ti-ui-component to feat/map-recommend-results April 29, 2024 15:30
@dhayab dhayab added the Feature: Recommendations Providing recommendations of records or facets label Apr 29, 2024
@dhayab dhayab requested review from raed667 and Haroenv April 29, 2024 16:11
{ act, skippedTests }: Required<TestOptions>
) {
skippableDescribe('options', skippedTests, () => {
test('forwards parameters to the client', async () => {
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@Haroenv Haroenv left a 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

@dhayab dhayab merged commit ae43df0 into feat/map-recommend-results May 3, 2024
8 checks passed
@dhayab dhayab deleted the feat/recommend-ti-connector branch May 3, 2024 09:08
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

3 participants