diff --git a/.gsd/milestones/M011/slices/S02/S02-PLAN.md b/.gsd/milestones/M011/slices/S02/S02-PLAN.md index 070c70c..7ba660b 100644 --- a/.gsd/milestones/M011/slices/S02/S02-PLAN.md +++ b/.gsd/milestones/M011/slices/S02/S02-PLAN.md @@ -25,7 +25,7 @@ - Estimate: 30m - Files: frontend/src/pages/TopicsBrowse.tsx, frontend/src/App.css - Verify: cd frontend && npx tsc --noEmit && npm run build -- [ ] **T02: Creator stats topic-colored pill badges** — Replace the run-on text stats on CreatorDetail page with colored pill badges using existing badge CSS classes. +- [x] **T02: Replaced run-on dot-separated topic stats on CreatorDetail with colored pill badges using catSlug-based badge classes** — Replace the run-on text stats on CreatorDetail page with colored pill badges using existing badge CSS classes. ## Steps diff --git a/.gsd/milestones/M011/slices/S02/tasks/T01-VERIFY.json b/.gsd/milestones/M011/slices/S02/tasks/T01-VERIFY.json new file mode 100644 index 0000000..5f941ca --- /dev/null +++ b/.gsd/milestones/M011/slices/S02/tasks/T01-VERIFY.json @@ -0,0 +1,30 @@ +{ + "schemaVersion": 1, + "taskId": "T01", + "unitId": "M011/S02/T01", + "timestamp": 1774945855616, + "passed": false, + "discoverySource": "task-plan", + "checks": [ + { + "command": "cd frontend", + "exitCode": 0, + "durationMs": 8, + "verdict": "pass" + }, + { + "command": "npx tsc --noEmit", + "exitCode": 1, + "durationMs": 833, + "verdict": "fail" + }, + { + "command": "npm run build", + "exitCode": 254, + "durationMs": 84, + "verdict": "fail" + } + ], + "retryAttempt": 1, + "maxRetries": 2 +} diff --git a/.gsd/milestones/M011/slices/S02/tasks/T02-SUMMARY.md b/.gsd/milestones/M011/slices/S02/tasks/T02-SUMMARY.md new file mode 100644 index 0000000..7c2703c --- /dev/null +++ b/.gsd/milestones/M011/slices/S02/tasks/T02-SUMMARY.md @@ -0,0 +1,76 @@ +--- +id: T02 +parent: S02 +milestone: M011 +provides: [] +requires: [] +affects: [] +key_files: ["frontend/src/pages/CreatorDetail.tsx", "frontend/src/App.css"] +key_decisions: ["Kept single dot separator between video count and topic pills; pills self-separate via flex gap"] +patterns_established: [] +drill_down_paths: [] +observability_surfaces: [] +duration: "" +verification_result: "npx tsc --noEmit and npm run build both pass cleanly. Badge class names derive from catSlug() which is proven in TopicsBrowse." +completed_at: 2026-03-31T08:32:02.924Z +blocker_discovered: false +--- + +# T02: Replaced run-on dot-separated topic stats on CreatorDetail with colored pill badges using catSlug-based badge classes + +> Replaced run-on dot-separated topic stats on CreatorDetail with colored pill badges using catSlug-based badge classes + +## What Happened +--- +id: T02 +parent: S02 +milestone: M011 +key_files: + - frontend/src/pages/CreatorDetail.tsx + - frontend/src/App.css +key_decisions: + - Kept single dot separator between video count and topic pills; pills self-separate via flex gap +duration: "" +verification_result: passed +completed_at: 2026-03-31T08:32:02.925Z +blocker_discovered: false +--- + +# T02: Replaced run-on dot-separated topic stats on CreatorDetail with colored pill badges using catSlug-based badge classes + +**Replaced run-on dot-separated topic stats on CreatorDetail with colored pill badges using catSlug-based badge classes** + +## What Happened + +The CreatorDetail stats section rendered topic categories as plain text spans separated by dot characters. Replaced the .map block with colored badge badge--cat-{slug} spans wrapped in a new .creator-detail__topic-pills flex container. Imported catSlug utility to derive the badge class suffix from category names, reusing the same color scheme from the TopicsBrowse page. + +## Verification + +npx tsc --noEmit and npm run build both pass cleanly. Badge class names derive from catSlug() which is proven in TopicsBrowse. + +## Verification Evidence + +| # | Command | Exit Code | Verdict | Duration | +|---|---------|-----------|---------|----------| +| 1 | `cd frontend && npx tsc --noEmit && npm run build` | 0 | ✅ pass | 3200ms | + + +## Deviations + +None. + +## Known Issues + +None. + +## Files Created/Modified + +- `frontend/src/pages/CreatorDetail.tsx` +- `frontend/src/App.css` + + +## Deviations +None. + +## Known Issues +None. diff --git a/frontend/src/App.css b/frontend/src/App.css index 4aa9948..c8bceb0 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -2122,6 +2122,13 @@ a.app-footer__repo:hover { color: var(--color-text-secondary); } +.creator-detail__topic-pills { + display: flex; + flex-wrap: wrap; + gap: 0.375rem; + align-items: center; +} + .creator-techniques { margin-top: 1.5rem; } diff --git a/frontend/src/pages/CreatorDetail.tsx b/frontend/src/pages/CreatorDetail.tsx index 4605302..98acd53 100644 --- a/frontend/src/pages/CreatorDetail.tsx +++ b/frontend/src/pages/CreatorDetail.tsx @@ -14,6 +14,7 @@ import { type TechniqueListItem, } from "../api/public-client"; import CreatorAvatar from "../components/CreatorAvatar"; +import { catSlug } from "../utils/catSlug"; export default function CreatorDetail() { const { slug } = useParams<{ slug: string }>(); @@ -109,20 +110,21 @@ export default function CreatorDetail() { {techniques.length > 0 && ( <> · - {Object.entries( - techniques.reduce>((acc, t) => { - const cat = t.topic_category || "Uncategorized"; - acc[cat] = (acc[cat] || 0) + 1; - return acc; - }, {}), - ) - .sort(([, a], [, b]) => b - a) - .map(([cat, count], i) => ( - - {i > 0 && ·} - {cat}: {count} - - ))} + + {Object.entries( + techniques.reduce>((acc, t) => { + const cat = t.topic_category || "Uncategorized"; + acc[cat] = (acc[cat] || 0) + 1; + return acc; + }, {}), + ) + .sort(([, a], [, b]) => b - a) + .map(([cat, count]) => ( + + {cat}: {count} + + ))} + )}