Skip to content

LTRAC-1062: feat(core) - Show catalog product attributes on the PDP - #3354

Merged
jordanarldt merged 3 commits into
canaryfrom
jordanarldt/ltrac-1062-c2-catalyst-query-productattributes
Nov 30, 2026
Merged

jordanarldt merged 3 commits into
canaryfrom
jordanarldt/ltrac-1062-c2-catalyst-query-productattributes

Conversation

@jordanarldt

@jordanarldt jordanarldt commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What/Why?

Show catalog product attributes on the product page. The streamable product query in core/app/[locale]/(default)/product/[slug]/page-data.ts now selects Product.attributes, and page.tsx lists each attribute's display name and value in the Specifications accordion, after the custom fields. Products without attributes render the same as before.

  • The field is only queried in the product page's query, not in any shared product fragment, so cards, related products, quick view and analytics are unchanged.
  • The query asks for first: 50 so products with more than the default page size of attributes don't get cut off.
  • Product.attributes is still marked @deprecated("Alpha version. Do not use in production.") in the Storefront GraphQL schema.

Testing

image
  • pnpm exec tsc --noEmit and ESLint pass.
  • Queried attributes(first: 50) against a dev store: products with attributes return their name/value pairs (13 on several sample products) and products without them return an empty list with no errors.
  • New e2e test in core/tests/ui/e2e/product.spec.ts (@writes-data): it creates a product, gives it two attributes, opens Specifications and checks each name sits next to its value. To set up the data, the catalog fixture gains assignAttributesToProduct, backed by new API client helpers for the v0 catalog attributes, product templates and template assignments endpoints. Cleanup deletes the assignment, template, attributes and product. The helpers fail on a 207 partial success, not just on error statuses.
PLAYWRIGHT_TEST_BASE_URL=http://localhost:3000 pnpm exec playwright test tests/ui/e2e/product.spec.ts -g "catalog attributes"

The test needs an access token that can write catalog data and a store where catalog attributes are enabled.

Known limitations and follow-up

This PR ships support for attributes as they come back today: every value is rendered as the plain string the API returns. We're merging it now and will handle the rest in a follow-up once the upstream API changes land:

  • Checkbox and number attributes don't come back from Product.attributes yet, and their values can't be set through the attribute assignment API. Both are known upstream bugs.
  • Typed values. value is a plain String!, so the storefront can't tell a checkbox "true" from a text attribute that says "true". We've proposed that the API return typed values (string, number or boolean). The follow-up will then show booleans as a checkmark with screen-reader text, format numbers for the shopper's locale, and add a boolean attribute to the e2e test.

Until then, this PR adds no true/false special-casing, so values are shown exactly as the API returns them.

Migration

StreamableProductQuery now selects attributes(first: 50) { edges { node { displayName value } } }, and the specifications list in page.tsx appends those attributes after the custom fields. If you customized the Specifications accordion, add the attributes the same way.

Refs LTRAC-1054, LTRAC-1061, LTRAC-1062

🤖 Generated with Claude Code

@jordanarldt
jordanarldt requested a review from a team as a code owner November 19, 2026 16:32
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
catalyst Ready Ready Preview Nov 30, 2026 7:52pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4c8129e

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 Minor

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

jordanarldt and others added 2 commits November 23, 2026 09:21
Query Product.attributes in the PDP streamable product query and list
each attribute's display name and value in the Specifications accordion,
after the custom fields. Products without attributes render as before.

Refs LTRAC-1062

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add catalog API helpers for the v0 attributes, product templates and
template assignments endpoints, and a catalog fixture method that gives a
product attributes by assigning it a template with the values selected.
The new e2e test checks each attribute's name and value in the
Specifications accordion and cleans up the attributes and template.

Refs LTRAC-1062

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jordanarldt
jordanarldt force-pushed the jordanarldt/ltrac-1062-c2-catalyst-query-productattributes branch from bb1f77f to 57a0dde Compare November 23, 2026 15:21
@jordanarldt
jordanarldt added this pull request to the merge queue Nov 24, 2026
@jordanarldt
jordanarldt removed this pull request from the merge queue due to a manual request Nov 24, 2026
@jorgemoya

Copy link
Copy Markdown
Contributor

Can we just confirm why E2E tests did not pass @jordanarldt

…s in tests

The v0 catalog attributes endpoint now rejects attributes without a
`settings` object, which made the PDP attributes e2e test fail with a 422.
Send an empty object so the attribute takes the defaults for its type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jordanarldt
jordanarldt added this pull request to the merge queue Nov 30, 2026
Merged via the queue into canary with commit 09ed4ea Nov 30, 2026
22 of 23 checks passed
@jordanarldt
jordanarldt deleted the jordanarldt/ltrac-1062-c2-catalyst-query-productattributes branch November 30, 2026 20:35

This branch was successfully deployed

1 active deployment
Preview — 4c8129e3 Deployed Nov 30, 2026 by vercel[bot]
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