-
Notifications
You must be signed in to change notification settings - Fork 340
feat(search):ES-5892 Introduce displayName and displayKey fields to facets #2690
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
🦋 Changeset detectedLatest commit: 29ce1f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
chanceaclark
left a comment
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.
Hey @jfugalde thanks for this! In addition to the CI run, would you also add a changeset for this PR?
I tested that this works on another locale: https://catalyst-canary-git-es-5892-bigcommerce-platform.vercel.app/es/shop-all/?attr_Color=Verde
…for improved labeling
chanceaclark
left a comment
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.
Looks like the lint task is still failing. You might need to add our store 1002923827 to any feature flags that are driving this feature.
Additionally, could we add functional tests to our local functional test suite, under /core/tests/? This test suite is for merchant consumption for context.
…elds for improved UI labeling and functionality
What/Why?
This pull request updates how facet filters are handled and displayed in the product search functionality. The main focus is on switching from using the
nameproperty since it's now a deprecated field and usedisplayNameproperty across both the GraphQL query and the data transformer logic, ensuring consistency and improved labeling in the UI. Additionally, new fields such asdisplayNameandfilterKeyare added to the GraphQL query for richer data support.Facet filter field improvements:
displayNamefield to all facet filter types (BrandSearchFilter,CategorySearchFilter,ProductAttributeSearchFilter,RatingSearchFilter, andPriceSearchFilter) in the GraphQL query infetch-faceted-search.tsfor more descriptive labels.Facet transformer logic updates:
facets-transformer.tsto usedisplayNameinstead ofnamefor matching and labeling facets, improving user-facing labels and consistency.filterKeyfor parameter naming and to preferdisplayNamefor labels, falling back tofilterNameifdisplayNameis not present.Testing
Functionality remained the same after the change

Migration
For existing Catalyst stores with customizations, to get this update:
core/app/[locale]/(default)/(faceted)/fetch-faceted-search.ts- The GraphQL query now usesdisplayNameinstead ofnamefor facet labelscore/data-transformers/facets-transformer.ts- The transformer now usesdisplayNamefor matching and labeling facets, with fallback tofilterNamefor product attributesIf you have customized the facet transformer or GraphQL query, ensure your code uses
displayNameinstead of the deprecatednamefield. Product attribute facets will now usefilterKeyfor parameter naming (e.g.,attr_Colorinstead of using the filter name directly).