-
Notifications
You must be signed in to change notification settings - Fork 543
fix(breadcrumb): use hierarchical facets only #6645
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
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 50d3bb2:
|
packages/instantsearch.js/src/connectors/breadcrumb/connectBreadcrumb.ts
Outdated
Show resolved
Hide resolved
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.
fix looks great, code seems to always have assumed there's only one hierarchical menu on the page before now
packages/instantsearch.js/src/connectors/breadcrumb/__tests__/connectBreadcrumb-test.ts
Outdated
Show resolved
Hide resolved
packages/instantsearch.js/src/connectors/breadcrumb/__tests__/connectBreadcrumb-test.ts
Show resolved
Hide resolved
…connectBreadcrumb-test.ts
Summary
Breadcrumb connector accesses all facet names when generating the breadcrumb list. This results in a menu widget breaking functionality. This PR restricts the breadcrumb connector to only use attribute from the hierarchical menu to prevent this.
CR-8481
Result
Breadcrumbs now only shows hierarchical facets.
This also initializes an 'interaction' shared test suite which tests functionality of widgets used in tandem (only breadcrumbs + hierarchical menu + menu for now)
Codesandbox: https://codesandbox.io/p/sandbox/example-react-instantsearch-getting-started-l7y5j9