Skip to content

Commit 5106cf6

Browse files
authored
Merge pull request #180 from phattbeats/pha1283-velvet-box
PHA-1283: keep the challenge-coin velvet box (empty case, no explainer)
2 parents 5b20129 + 203ddab commit 5106cf6

3 files changed

Lines changed: 38 additions & 9 deletions

File tree

src/app/(app)/players/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export default async function PlayerProfilePage({
316316
)}
317317

318318
{/* Challenge coins (PHA-1278) — collectible Major-logo shelf */}
319-
<ChallengeCoinShelf coins={challengeCoins} />
319+
<ChallengeCoinShelf coins={challengeCoins} isSelf={isSelf} />
320320

321321
{/* Your Majors (PHA-1283) — moved off Settings onto your own profile, where
322322
the rest of your record already lives. Self only. */}

src/app/globals.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,16 @@ main.shell.with-nav-action { padding-bottom: calc(152px + env(safe-area-inset-bo
913913
color: #eccd92; background: rgba(0,0,0,0.3); border: 1px solid rgba(196,154,84,0.4);
914914
border-radius: 999px; padding: 1px 8px; line-height: 1.6;
915915
}
916-
.coin-shelf-empty { font-size: 13px; color: #e7c39e; margin: 0; line-height: 1.5; }
916+
/* Empty velvet recess (PHA-1283) — a sunken circular slot awaiting a coin, with
917+
a faint dashed gold rim so the empty case still reads as a display case. */
918+
.coin-shelf .coin-collectible-disc.coin-slot-empty {
919+
border-radius: 50%;
920+
border: 1px dashed rgba(196,154,84,0.45);
921+
background:
922+
radial-gradient(120% 120% at 50% 30%, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0) 100%);
923+
box-shadow: inset 0 4px 14px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.25);
924+
filter: none;
925+
}
917926
/* each coin sits in a soft velvet recess */
918927
.coin-shelf .coin-collectible-disc {
919928
border-radius: 50%;

src/components/heat/ChallengeCoinShelf.tsx

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* and steel for taking part. Server component (no interactivity) — it just lays
55
* out the pre-rendered coin art the pure core resolves.
66
*
7-
* Empty by design until a Major concludes (coins mint on archive). An empty
8-
* shelf stays hidden entirely — no explainer, no empty rack (PHA-1283: let the
9-
* shelf speak for itself once coins land). It surfaces only when there's a coin
10-
* to show.
7+
* Empty by design until a Major concludes (coins mint on archive). On your own
8+
* profile the velvet display case still shows with empty recesses — no explainer
9+
* text (PHA-1283: let people figure it out), just an obvious home for coins to
10+
* land. On someone else's it stays hidden so a fresh profile isn't cluttered.
1111
*/
1212

1313
import { type ChallengeCoin } from "@/lib/challenge-coin-core";
@@ -26,12 +26,32 @@ function ordSuffix(n: number): string {
2626

2727
export function ChallengeCoinShelf({
2828
coins,
29+
isSelf,
2930
}: {
3031
coins: ChallengeCoin[];
32+
isSelf: boolean;
3133
}) {
32-
// Nothing to show until the first coin mints — no explainer, no empty rack
33-
// (PHA-1283). The populated shelf below is self-explanatory.
34-
if (coins.length === 0) return null;
34+
// Empty velvet case on your own profile — the display case stays so there's an
35+
// obvious home for coins, but the explainer text is gone (PHA-1283). Three
36+
// empty recesses read as "a coin sits in each of these" without spelling it
37+
// out. Hidden on other people's profiles so a fresh one isn't cluttered.
38+
if (coins.length === 0) {
39+
if (!isSelf) return null;
40+
return (
41+
<section className="coin-shelf">
42+
<div className="coin-shelf-head">
43+
<span className="eyebrow-mono">CHALLENGE COINS</span>
44+
</div>
45+
<div className="coin-shelf-grid" aria-hidden="true">
46+
{[0, 1, 2].map((i) => (
47+
<div key={i} className="coin-collectible">
48+
<div className="coin-collectible-disc coin-slot-empty" />
49+
</div>
50+
))}
51+
</div>
52+
</section>
53+
);
54+
}
3555

3656
return (
3757
<section className="coin-shelf">

0 commit comments

Comments
 (0)