Skip to content

feat(promotions): PROMO-1507 add featured promotions callout to pdp and plp #3057

Merged
bc-vivekaggarwal merged 3 commits into
canaryfrom
PROMO-1507-promotion-callout-plp-pdp
Jul 7, 2026
Merged

feat(promotions): PROMO-1507 add featured promotions callout to pdp and plp #3057
bc-vivekaggarwal merged 3 commits into
canaryfrom
PROMO-1507-promotion-callout-plp-pdp

Conversation

@bc-vivekaggarwal

@bc-vivekaggarwal bc-vivekaggarwal commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Linear: PROMO-1507

What/Why?

Wire promotion callouts into PDP and PLP pages using live data from the Storefront GraphQL API (featuredPromotions on the Product type).

  • PDP: stacked callout boxes render inline below the price, one per active promotion.
  • PLP (category, brand, search): each product card shows its first promotion inline below the price; if there are multiple, a "+N more" label appears within the same callout.

Rollout/Rollback

Revert.

Testing

  • pnpm build passes
  • pnpm lint passes
  • PDP and PLP pages load for guest and authenticated users

testing notes / screenshots:

  • Homepage(no callouts):
image
  • PDP Page(Product related promotions):
image
  • PLP Page / Category:
image
  • Mobile view:
image

Migration

None.

@bc-vivekaggarwal bc-vivekaggarwal requested a review from a team as a code owner June 22, 2026 01:19
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5f33ad6

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

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Jul 3, 2026 5:17am

Request Review

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 61413d3 (2026-07-03).

Metric Baseline Current Delta
Total JS 435.4 kB 444.6 kB +9.2 kB (+2.1%)

Per-Route First Load JS

Route Baseline Current Delta
/(default)/(auth)/change-password/page 318.8 kB 327.9 kB +9.1 kB (+2.9%)
/(default)/(auth)/login/forgot-password/page 318 kB 327.1 kB +9.1 kB (+2.9%)
/(default)/(auth)/login/page 318.4 kB 327.5 kB +9.1 kB (+2.9%)
/(default)/(auth)/register/page 354.6 kB 363.7 kB +9.1 kB (+2.6%)
/(default)/(faceted)/brand/[slug]/page 330.5 kB 339.6 kB +9.1 kB (+2.8%)
/(default)/(faceted)/category/[slug]/page 339 kB 348.1 kB +9.1 kB (+2.7%)
/(default)/(faceted)/search/page 330.5 kB 339.6 kB +9.1 kB (+2.8%)
/(default)/[...rest]/page 313.5 kB 322.7 kB +9.2 kB (+2.9%)
/(default)/account/addresses/page 358 kB 367.1 kB +9.1 kB (+2.5%)
/(default)/account/orders/[id]/page 321.6 kB 330.8 kB +9.2 kB (+2.9%)
/(default)/account/orders/page 322.6 kB 331.7 kB +9.1 kB (+2.8%)
/(default)/account/settings/page 329.2 kB 338.3 kB +9.1 kB (+2.8%)
/(default)/account/wishlists/[id]/page 336.4 kB 345.5 kB +9.1 kB (+2.7%)
/(default)/account/wishlists/page 331.5 kB 340.6 kB +9.1 kB (+2.7%)
/(default)/blog/[blogId]/page 313.5 kB 322.7 kB +9.2 kB (+2.9%)
/(default)/blog/page 314.5 kB 323.6 kB +9.1 kB (+2.9%)
/(default)/cart/page 334.3 kB 343.5 kB +9.2 kB (+2.8%)
/(default)/compare/page 325.7 kB 334.8 kB +9.1 kB (+2.8%)
/(default)/gift-certificates/balance/page 317.5 kB 326.6 kB +9.1 kB (+2.9%)
/(default)/gift-certificates/page 313.5 kB 322.7 kB +9.2 kB (+2.9%)
/(default)/gift-certificates/purchase/page 357.1 kB 366.2 kB +9.1 kB (+2.5%)
/(default)/page 330.7 kB 339.8 kB +9.1 kB (+2.8%)
/(default)/product/[slug]/page 385.4 kB 394.6 kB +9.2 kB (+2.4%)
/(default)/webpages/[id]/contact/page 355.5 kB 364.6 kB +9.1 kB (+2.6%)
/(default)/webpages/[id]/normal/page 321.6 kB 330.8 kB +9.2 kB (+2.9%)
/(default)/wishlist/[token]/page 326.3 kB 335.5 kB +9.2 kB (+2.8%)
/maintenance/page 307.1 kB 316.3 kB +9.2 kB (+3%)

Threshold: 5% increase. Routes with ⚠️ exceed the threshold.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 93 91 95

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 76 88 74 76
Accessibility 95 98 95 98
Best Practices 100 100 100 100
SEO 88 88 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.6 s 3.8 s 3.6 s 6.5 s
CLS 0.001 0.055 0.04 0.011
FCP 1.2 s 1.2 s 1.2 s 1.2 s
TBT 0 ms 10 ms 10 ms 0 ms
Max Potential FID 50 ms 60 ms 70 ms 40 ms
Time to Interactive 3.6 s 3.9 s 4.5 s 6.5 s

Full Unlighthouse report →

@jorgemoya

Copy link
Copy Markdown
Contributor

Code looks good but design seems off. @andrewreifman do you have input on this?

Copy link
Copy Markdown
Contributor

So @hunterbecton just released a Callout component into Storefrontkit to be used within PLP and PDP that was requested by others on the TRAC team, but this appears to be a different type of component and use case. Based on the screenshots above, this look more like the Banner, but supporting multiple items/text instead of just one.

@bc-vivekaggarwal bc-vivekaggarwal marked this pull request as ready for review June 26, 2026 08:57
@bc-vivekaggarwal bc-vivekaggarwal force-pushed the PROMO-1507-promotion-callout-plp-pdp branch from f6d4bfa to 4a7216e Compare June 26, 2026 11:28
@bc-vivekaggarwal

Copy link
Copy Markdown
Contributor Author

@jorgemoya and @andrewreifman Thanks for pointing out about the callout component and outdated designs.
I have implemented the changes as suggested in the thread and incorporated the new designs.
Waiting on callout prop to be included in the ProductCard. Meanwhile, would really appreciate your feedback on the changes.

@bc-vivekaggarwal

Copy link
Copy Markdown
Contributor Author

[E2E Tests / E2E Functional Tests (default) (pull_request)] tests are failing after merge from canary. Same with other PRs: #3062

@parthshahp parthshahp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved, non-blocking question.

Comment on lines +185 to +206
{promotions != null && promotions.length > 0 && (
<div className="mt-1.5">
<CalloutRoot
className="items-start rounded-md border border-yellow-300 bg-yellow-50 px-2.5 py-1.5"
size="small"
variant="warning"
>
<CalloutContent>
<CalloutHeader>
<CalloutTitle className="text-xs font-semibold leading-snug text-yellow-900">
{promotions[0]?.text ?? ''}
</CalloutTitle>
{promotions.length > 1 && (
<CalloutDescription className="text-xs text-yellow-900/70">
+{promotions.length - 1} {moreOffersLabel}
</CalloutDescription>
)}
</CalloutHeader>
</CalloutContent>
</CalloutRoot>
</div>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🍹 I wonder if this is better as a separate component?

@bc-vivekaggarwal bc-vivekaggarwal Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's intentionally inline — the block is small and directly composes storefront-kit's Callout primitives without custom logic. Extracting it to a separate component would only make sense if it were reused, but promotion callout styling varies per context (card vs. PDP), so a shared component would need its own props and variants anyway. Not worth the indirection at this size.

@bc-vivekaggarwal bc-vivekaggarwal added this pull request to the merge queue Jul 7, 2026
Merged via the queue into canary with commit a763acc Jul 7, 2026
27 of 29 checks passed
@bc-vivekaggarwal bc-vivekaggarwal deleted the PROMO-1507-promotion-callout-plp-pdp branch July 7, 2026 23:18
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.

4 participants