-
Notifications
You must be signed in to change notification settings - Fork 34
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(commerce): namespace field suggestions to prevent clash with facet search #4247
Conversation
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support product-recommendation : missing SSR support product-listing : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
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.
Quite unrelated, but now that I think of it, do you also plan to fix the issue where the facetSearch controllers for fieldSuggestion controllers are initialized with no initial query, even though the query might be non-empty at the moment when they're initialized?
This is a minor issue, but still a potential bug.
Since facets in a global search configuration are used to power both field suggestions and facets, it's possible that field suggestions for a field be active at the same time that a facet search for the same field is. This means that updating the text on a field suggestions controller would cause a facet's facet search values to be updated as well. This is because both the field suggestions and facet search were powered by the same state.
To prevent this issue, I namespace the
facetId
used for field suggestions only on the facet search reducers (the regular, and category one).I opted for this approach instead of reversing the dependency on the facet search controller to read state from selectors since it would've lead to much more changes in the controllers.
CAPI-1201