Skip to content

Commit f1fdfad

Browse files
authored
Merge pull request #174 from phattbeats/pha1274-coin-cta
PHA-1274: Major Wrapped → challenge-coin CTA
2 parents 1948113 + 2267634 commit f1fdfad

5 files changed

Lines changed: 41 additions & 0 deletions

File tree

scripts/verify-playoff-wrapped.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ check("stinger is the post-credits 'will return'", /will return/i.test(out.find(
161161
check("stinger uses the Hotline brand, not the old name", /Hotline/.test(out.find((s) => s.id === "po-stinger")?.headline ?? "") && !/phaTT Picks/i.test(out.find((s) => s.id === "po-stinger")?.headline ?? ""));
162162
check("stinger teases the next Major (Singapore)", /Singapore/i.test(out.find((s) => s.id === "po-stinger")?.body ?? ""));
163163
check("thanks comes before the stinger", outIds.indexOf("po-thanks") < outIds.indexOf("po-stinger"));
164+
check("coin checkout slide present", outIds.includes("po-coin"));
165+
check("coin slide links to the shelf via CTA", (() => { const c = out.find((s) => s.id === "po-coin"); return c?.cta?.href === "/profile" && /coin/i.test(c?.cta?.label ?? ""); })());
166+
check("coin slide sits before the thank-you", outIds.indexOf("po-coin") < outIds.indexOf("po-thanks"));
164167

165168
// ---- PHA-1274 scope correction: this is the *Major* Wrapped, not just Playoffs. ----
166169
check("cover frames the whole Major (32 walked in)", /thirty-two walked in/i.test(out[0].headline));

src/app/globals.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,17 @@ main.shell.with-nav-action { padding-bottom: calc(152px + env(safe-area-inset-bo
15471547
margin: 13px auto 0; max-width: 32ch;
15481548
font-size: 14px; line-height: 1.55; color: var(--ink-mid); text-wrap: pretty;
15491549
}
1550+
/* PHA-1274: a slide CTA button (e.g. "See your coin" → /profile). Mirrors the
1551+
primary nav button; navigating closes the deck. */
1552+
.sw-cta {
1553+
position: relative; display: inline-flex; align-items: center; gap: 7px;
1554+
margin: 16px auto 2px; padding: 10px 20px; border-radius: 4px;
1555+
font-family: var(--font-mono); font-size: 12px; font-weight: 600;
1556+
letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
1557+
color: var(--surf-1); border: 1px solid transparent;
1558+
background: linear-gradient(120deg, var(--heat), var(--heat-hot));
1559+
box-shadow: 0 4px 18px var(--heat-glow);
1560+
}
15501561

15511562
/* PHA-1276: shave the tallest elements on small/short phones so a typical slide
15521563
fits the viewport without needing to scroll the stage. The scroll fallback

src/components/heat/StageWrapped.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,13 @@ function SlideCard({ slide }: { slide: WrappedSlide }) {
602602
</div>
603603
)}
604604
{slide.body && <p className="sw-body">{slide.body}</p>}
605+
{slide.cta && (
606+
<a className="sw-cta brk" href={slide.cta.href}>
607+
<span className="br-tr" />
608+
<span className="br-bl" />
609+
{slide.cta.label}
610+
</a>
611+
)}
605612
</div>
606613
);
607614
}

src/lib/playoff-wrapped-core.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,21 @@ export function buildPlayoffWrappedDeck(
559559
slides.push(rankSlide(eyebrow, personal, decided));
560560
}
561561

562+
// Send them to their challenge coin (PHA-1274, Brandon: "make a note to have
563+
// the player checkout the challenge coin"). A Major mints a collectible coin
564+
// (PHA-1278) once it's archived — exactly when this finale fires — so the
565+
// recap points them to their shelf. One-tap CTA closes the deck en route.
566+
slides.push({
567+
id: "po-coin",
568+
kind: "moment",
569+
eyebrow: "YOUR CHALLENGE COIN",
570+
headline: "You earned the Cologne coin.",
571+
body: "Playing the Major mints you a collectible challenge coin — its tier set by where you finished. Cologne's is on your shelf now. Go give it a spin.",
572+
brandLogo: majorBrand,
573+
cta: { href: "/profile", label: "See your coin →" },
574+
autoAdvanceMs: AUTO_MS,
575+
});
576+
562577
// Closer, part 1 — the heartfelt thank-you from -phaTT (Brandon: "a very
563578
// heartfelt thank you from -phaTT ... love for the community of cs and the
564579
// unity of all the different countries in the world participating and the

src/lib/stage-wrapped-core.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ export interface WrappedSlide {
9999
stageBadge?: WrappedStageBadge;
100100
/** Personal reward: set when the viewer's pick matched this narrative moment. */
101101
calledIt?: { label: string; sub?: string };
102+
/**
103+
* Optional call-to-action link rendered as a button on the slide (PHA-1274 —
104+
* e.g. "See your coin" → /profile). Navigating away naturally closes the deck.
105+
*/
106+
cta?: { href: string; label: string };
102107
/**
103108
* Per-slide auto-advance, in ms. Falsy / omitted => this slide waits for the
104109
* user. The shell clamps to a sane floor so a stray `1` can't strobe.

0 commit comments

Comments
 (0)