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): enable multiple objectIDs in connectors #6176

Merged

Conversation

aymeric-giraudet
Copy link
Member

@aymeric-giraudet aymeric-giraudet commented May 2, 2024

Summary

FX-2822

Result

Following the previous PR, this enables the connectors to pass multiple object IDs

@aymeric-giraudet aymeric-giraudet requested review from a team, dhayab and Haroenv and removed request for a team May 2, 2024 09:39
Copy link

codesandbox-ci bot commented May 2, 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 04f19f0:

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

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.

changes look logical, but unit tests fail, so this can't be merged yet. Seems to happen inside the render function, maybe the "no results" case is trying to map as well?

@aymeric-giraudet
Copy link
Member Author

@Haroenv
Ah that was because in my previous PR I did results[id] = hits when it should have been a SearchResults object, wouldn't have happened with TypeScript :D
Not too sure if what I did is best, I just assign the merged hits to the first SearchResults, seems like the recommend libs just assigns hits, so users probably don't care about other fields 🤷‍♂️

@aymeric-giraudet aymeric-giraudet merged commit 870d150 into feat/map-recommend-results May 3, 2024
8 checks passed
@aymeric-giraudet aymeric-giraudet deleted the feat/enable-multiple-object-ids branch May 3, 2024 08:11
Haroenv pushed a commit that referenced this pull request May 21, 2024
* feat(recommend): enable multiple objectIDs in connectors

* fix: merged recommendations should be in an object
dhayab pushed a commit that referenced this pull request May 21, 2024
* feat(recommend): enable multiple objectIDs in connectors

* fix: merged recommendations should be in an object
dhayab pushed a commit that referenced this pull request May 21, 2024
* feat(recommend): enable multiple objectIDs in connectors

* fix: merged recommendations should be in an object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants