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

fix(hits): rename the exposed "hits" to "items" #6212

Merged
merged 5 commits into from
Jun 2, 2024
Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented May 22, 2024

Summary

Replace the exposed hits with items for consistency with recommend, transformItems and other widgets that all return items.

hits of course still works for now, but items is also available from the connectors.

Result

As well as hits, items is also available from connectHits, connectInfiniteHits (connectGeoSearch already only had items)

There's no warning for using hits, as there's no way to have that in a way which doesn't warn for regular usage too.

For now, no change is done in ui-components, but I'm happy to do so if we're happy with the hypothetical breaking change for that package.

`hits` of course still works for now, but `items` is also available from the connectors.

A warning on getting of `hits` from the connector is given, which does not fire on normal usage of the components.

For now, no change is done in `ui-components`, but I'm happy to do so if we're happy with the hypothetical breaking change for that package.
Copy link

codesandbox-ci bot commented May 22, 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 0cb7190:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv marked this pull request as ready for review May 31, 2024 06:53
@Haroenv Haroenv requested review from a team, dhayab and aymeric-giraudet and removed request for a team May 31, 2024 06:53
Copy link
Member

@dhayab dhayab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Are there references to hits in examples or CISA templates we could also switch to items?

@Haroenv
Copy link
Contributor Author

Haroenv commented May 31, 2024

not that I saw @dhayab

@Haroenv Haroenv merged commit 1b99e39 into master Jun 2, 2024
12 checks passed
@Haroenv Haroenv deleted the fix/hits-items branch June 2, 2024 12:58
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.

3 participants