Skip to content

feat(taste): bold taste-card redesign + compact pill download button#383

Merged
SimplicityGuy merged 2 commits into
mainfrom
feat/taste-card-redesign
Jun 8, 2026
Merged

feat(taste): bold taste-card redesign + compact pill download button#383
SimplicityGuy merged 2 commits into
mainfrom
feat/taste-card-redesign

Conversation

@SimplicityGuy

@SimplicityGuy SimplicityGuy commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Redesigns the taste fingerprint card, the Download Taste Card button, and the obscurity display (now a mainstream→obscure scale, shown identically on the card and the Explore taste strip).

Card — api/taste_card.py

  • Larger, social-share aspect (1200×630).
  • Gradient header band with the title + peak decade.
  • Obscurity scale — a full-width gradient track (sky→indigo→purple→rose) with a glowing marker at the score, a tier+% caption, and Mainstream/Obscure endpoints (replaces the old ring/flat bar).
  • Ranked accent bars for top genres and top labels (length ∝ count, count shown). render_taste_card takes (name, count) tuples; the router threads counts through.
  • Taste drift sparkline with year labels, per-point genre tooltips, and a "Now: " caption.
  • discogsography wordmark.
  • Graceful empty states; all user strings html.escape-d (XSS-safe).

Obscurity scale — consistent in both places

  • Tiers (inclusive upper bound): Mainstream / Eclectic / Obscure / Deep Cuts at 0 / 0.25 / 0.5 / 0.75, with the percentage shown.
  • explore/static/js/user-panes.js (_obscurityScale / _obscurityTier) + explore/static/css/styles.css render the same gradient-track-with-marker in the Explore strip, replacing the bare 0.42 stat.
  • Thresholds are duplicated in Python and JS and annotated to stay in sync.

Button — .taste-download-btn

Compact, centered gradient pill with hover lift + glow and active/disabled states, replacing the flat full-width bar.

Verification

  • uv run pytest tests/api/test_taste_card.py tests/api/test_taste.py — pass; ruff / mypy clean
  • npx vitest run __tests__/user-panes.test.js — 134 pass
  • All pre-commit hooks pass
  • Card + strip rendered and reviewed visually (Mainstream/Eclectic/Deep Cuts states)

Notes

The card SVG is generated server-side (downloaded file). Built on main; independent of the implausible-years fix in #382.

Obscurity remains a relative metric (median co-collectors ÷ your most-collected release). This PR only changes its presentation; reworking the metric toward an absolute popularity baseline is a possible follow-up.

🤖 Generated with Claude Code

Redesign the shareable taste fingerprint card (api/taste_card.py) and the
"Download Taste Card" button.

Card (api/taste_card.py):
- Larger, social-share aspect (1200x630).
- Gradient header band with the title and an obscurity ring/gauge.
- Ranked accent bars for top genres and top labels (length proportional to
  count; count shown). render_taste_card now takes (name, count) tuples.
- Taste drift rendered as a sparkline with year labels and per-point genre
  tooltips, plus a "Now: <genre>" caption.
- discogsography wordmark.
- Graceful empty states; all user strings escaped (XSS-safe).

Router (api/routers/taste.py): pass genre/label counts through to the card.

Button (.taste-download-btn): compact centered gradient pill with hover lift +
glow and an active/disabled state, replacing the flat full-width bar.

Tests updated for the new signature, ring, sparkline, branding, and drift XSS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.19820% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/taste_card.py 98.55% 1 Missing ⚠️
explore/static/js/user-panes.js 97.56% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…strip)

Replace the bare obscurity percentage with a labeled gradient scale and a
glowing marker, shown identically on the taste card and the Explore taste
strip. Tiers (inclusive upper bound): Mainstream / Eclectic / Obscure /
Deep Cuts at 0 / 0.25 / 0.5 / 0.75, with the percentage shown.

- api/taste_card.py: swap the obscurity ring for a full-width gradient track
  (sky→indigo→purple→rose) with a glowing marker at the score, tier+% caption,
  and Mainstream/Obscure endpoint labels; reflow the card around it.
- explore/static/js/user-panes.js: new _obscurityScale / _obscurityTier render
  the same component in the strip (replacing the plain 0.00 stat).
- explore/static/css/styles.css: .taste-obscurity{,-track,-marker,-ends} styles.
- Tests: updated card + strip tests for the tier/percentage/marker output.

Tier thresholds are duplicated in Python and JS and annotated to stay in sync.
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit)

Totals Coverage
Statements: 46.29% ( 1249 / 2698 )
Lines: 46.29% ( 1249 / 2698 )

StandWithUkraine

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Coverage (chromium)

Totals Coverage
Statements: 46.29% ( 1249 / 2698 )
Lines: 46.29% ( 1249 / 2698 )

StandWithUkraine

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Coverage (firefox)

Totals Coverage
Statements: 46.29% ( 1249 / 2698 )
Lines: 46.29% ( 1249 / 2698 )

StandWithUkraine

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPhone 15)

Totals Coverage
Statements: 46.29% ( 1249 / 2698 )
Lines: 46.29% ( 1249 / 2698 )

StandWithUkraine

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

E2E Coverage (webkit - iPad Pro 11)

Totals Coverage
Statements: 46.29% ( 1249 / 2698 )
Lines: 46.29% ( 1249 / 2698 )

StandWithUkraine

@SimplicityGuy SimplicityGuy merged commit 3178338 into main Jun 8, 2026
46 of 48 checks passed
@SimplicityGuy SimplicityGuy deleted the feat/taste-card-redesign branch June 8, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant