feat: Replaced run-on dot-separated topic stats on CreatorDetail with c…
- "frontend/src/pages/CreatorDetail.tsx" - "frontend/src/App.css" GSD-Task: S02/T02
This commit is contained in:
parent
41bf06e431
commit
caa55381ab
5 changed files with 130 additions and 15 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
30
.gsd/milestones/M011/slices/S02/tasks/T01-VERIFY.json
Normal file
30
.gsd/milestones/M011/slices/S02/tasks/T01-VERIFY.json
Normal file
|
|
@ -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
|
||||
}
|
||||
76
.gsd/milestones/M011/slices/S02/tasks/T02-SUMMARY.md
Normal file
76
.gsd/milestones/M011/slices/S02/tasks/T02-SUMMARY.md
Normal file
|
|
@ -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.
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,6 +110,7 @@ export default function CreatorDetail() {
|
|||
{techniques.length > 0 && (
|
||||
<>
|
||||
<span className="queue-card__separator">·</span>
|
||||
<span className="creator-detail__topic-pills">
|
||||
{Object.entries(
|
||||
techniques.reduce<Record<string, number>>((acc, t) => {
|
||||
const cat = t.topic_category || "Uncategorized";
|
||||
|
|
@ -117,12 +119,12 @@ export default function CreatorDetail() {
|
|||
}, {}),
|
||||
)
|
||||
.sort(([, a], [, b]) => b - a)
|
||||
.map(([cat, count], i) => (
|
||||
<span key={cat} className="creator-detail__topic-stat">
|
||||
{i > 0 && <span className="queue-card__separator">·</span>}
|
||||
.map(([cat, count]) => (
|
||||
<span key={cat} className={`badge badge--cat-${catSlug(cat)}`}>
|
||||
{cat}: {count}
|
||||
</span>
|
||||
))}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue