Skip to content

Conversation

@jfugalde
Copy link

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 name property since it's now a deprecated field and use displayName property across both the GraphQL query and the data transformer logic, ensuring consistency and improved labeling in the UI. Additionally, new fields such as displayName and filterKey are added to the GraphQL query for richer data support.

Facet filter field improvements:

  • Added the displayName field to all facet filter types (BrandSearchFilter, CategorySearchFilter, ProductAttributeSearchFilter, RatingSearchFilter, and PriceSearchFilter) in the GraphQL query in fetch-faceted-search.ts for more descriptive labels.

Facet transformer logic updates:

  • Updated the facet transformer in facets-transformer.ts to use displayName instead of name for matching and labeling facets, improving user-facing labels and consistency.
  • Changed product attribute facet logic to use filterKey for parameter naming and to prefer displayName for labels, falling back to filterName if displayName is not present.

Testing

Functionality remained the same after the change
image

Migration

Revert this PR or consider using deprecated name field

@jfugalde jfugalde requested a review from a team as a code owner November 13, 2025 21:12
@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2025

🦋 Changeset detected

Latest commit: 44c9f28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

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

@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
catalyst-b2b Ready Ready Preview Comment Nov 13, 2025 9:36pm
catalyst-canary Ready Ready Preview Comment Nov 13, 2025 9:36pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
catalyst Ignored Ignored Nov 13, 2025 9:36pm

Copy link
Contributor

@chanceaclark chanceaclark left a 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

Copy link
Contributor

@chanceaclark chanceaclark left a 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.

edges {
node {
__typename
name
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the name field from the request now?

"@bigcommerce/catalyst-core": patch
---

feat(search):ES-5892 Introduce displayName and displayKey fields to facets
Copy link
Contributor

Choose a reason for hiding this comment

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

This will be used as part of the changelog generation, so can you tweak this entire changeset to be changelog friendly (e.g. omit the JIRA key, more user friendly wording, etc...).

Also, as you can tell from the pull request description, we like to include a little bit of a migration guide which we also like to include in the changeset so the changelog has migration notes. This migration guide should be written from a perspective that you have an existing Catalyst repository and have made a ton of customizations, so how would you pull in new code to get this change. Would you mind updating the PR description with a better migration guide + include it within this changeset?

Copy link
Author

Choose a reason for hiding this comment

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

Will do!

@@ -0,0 +1,9 @@
---
"@bigcommerce/catalyst-core": patch
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably include this within our 1.4 release so let's change this to a minor.

Suggested change
"@bigcommerce/catalyst-core": patch
"@bigcommerce/catalyst-core": minor

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