From 7955e6150d7f86087697c7b8c7c2cee2b05c57ae Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Thu, 4 Jun 2026 14:14:33 -0500 Subject: [PATCH] refactor(styles): retire .card; migrate 7 consumers to .glass-panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brief 5 of unify-glass-panel-surfaces convoy. Deletes the legacy .card class from styles/globals.css and migrates all consumers (actual count: 7, not 8 as the brief had estimated — one of the suspected sites was already on a different pattern) to .glass-panel rounded-3xl p-{4|6}. A single panel vocabulary across the app — .glass-panel for body content, .glass-panel-strong for floating chrome/popovers, .page-header-glass for full-bleed top strips — is the convoy's success metric. .card predated the gradient-border system and was the only remaining "opaque solid panel" pattern in user-facing pages. Consumers migrated: - pages/settings.js × 2 (p-4 and p-6 cards) - pages/profile.js × 3 (avatar card, stats card, activity card) - pages/community/collections.js × 1 - components/CollectionsPageView.js × 1 Each migration: - Replaces `card` with `glass-panel rounded-3xl` in the className. - Preserves sibling Tailwind tokens (p-4 / p-6 / text-center / mt-6 / group / cursor-pointer). - Adds `transition-all duration-{200|300}` explicitly where the legacy class baked it in (5 of 7 sites needed this back). - Drops hover:shadow-{lg,xl} Tailwind overrides on the 2 community sites; the .glass-panel corner-light gradient is the new affordance. CSS change in styles/globals.css: - Removed the `.card { @apply rounded-3xl shadow-lg p-6 transition-all duration-300; background-color: var(--bg-primary); border: 1px solid var(--border); }` rule. - Added a documentation comment in its place explaining the retirement and pointing future consumers at the right alternative. Verification: - rg "className=[\"'\`]card\b" pages/ components/ --type js returns 0 matches. - rg "^\.card \{" styles/ returns 0 matches. - npm run lint passes (1 pre-existing warning unrelated). - npm run test:run: 113/113 tests pass. Acceptance criteria from .convoys/unify-glass-panel-surfaces/brief-5-retire-card-class.md all met. No escape-hatch sites needed; all 7 migrations were clean. Co-authored-by: Cursor --- components/CollectionsPageView.js | 2 +- pages/community/collections.js | 2 +- pages/profile.js | 6 +++--- pages/settings.js | 4 ++-- styles/globals.css | 11 ++++++----- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/components/CollectionsPageView.js b/components/CollectionsPageView.js index 50821ea..98e7319 100644 --- a/components/CollectionsPageView.js +++ b/components/CollectionsPageView.js @@ -122,7 +122,7 @@ export default function CollectionsPageView(props) { {sortedCollections.map(collection => (
router.push(`/collection/${collection.slug || collection.id}`)} > {/* Thumbnail Section */} diff --git a/pages/community/collections.js b/pages/community/collections.js index 4773197..508e6e0 100644 --- a/pages/community/collections.js +++ b/pages/community/collections.js @@ -262,7 +262,7 @@ export default function CommunityCollections() {
{sortedCollections.map(collection => ( -
+
diff --git a/pages/profile.js b/pages/profile.js index 0f1d168..5f46b61 100644 --- a/pages/profile.js +++ b/pages/profile.js @@ -291,7 +291,7 @@ export default function Profile() {
{/* Profile Card */}
-
+
{/* Avatar */}
@@ -398,7 +398,7 @@ export default function Profile() {
{/* Stats Card */} -
+

List Stats

@@ -433,7 +433,7 @@ export default function Profile() { {/* Profile Form */}
-
+

Profile Information diff --git a/pages/settings.js b/pages/settings.js index ea85588..65ee315 100644 --- a/pages/settings.js +++ b/pages/settings.js @@ -267,7 +267,7 @@ export default function Settings() {
{/* Sidebar Navigation */}
-
+