Files
musyx/DESIGN.md
T
Yuriy Panov c4928ae7fe feat: workspace scaffold with iced shell, theme and design system
Two-crate workspace (ym-api for the API client, musyx for the iced app).
The app has the sidebar, top bar, Queue/Lyrics drawer and player bar from
the approved mockup, plus signed-out states for every screen.

- DESIGN.md records the mockup tokens; ui/theme.rs mirrors them for dark
  and light, and the app follows the system appearance
- Bundles Onest/Unbounded (OFL) and Lucide 0.460 icons (ISC)
- Back-stack navigator, player bar toggles (shuffle, repeat, volume, mute)
- snapshot feature renders a screen to PNG via iced's window screenshot
2026-10-15 13:52:55 +06:00

64 lines
3.5 KiB
Markdown

# Musyx design system
The approved mockup is [`design/mockup.html`](design/mockup.html) (published at
https://claude.ai/artifact/2gmswtceJM61fcE2F5uYYM). This file records its tokens. They map
1:1 to [`crates/musyx/src/ui/theme.rs`](crates/musyx/src/ui/theme.rs), so change both together.
## Direction
The ground is aubergine graphite, with one amber accent taken from a tape deck's VU needle.
The app is dark-first, and the light theme follows the system setting. Everything stays quiet
except the My Wave hero, which is the one animated, accent-heavy surface.
## Colour
| Token | Dark | Light | Used for |
|--------------|-----------|-----------|----------|
| `bg` | `#1C1A22` | `#F3F1F6` | Window and content background |
| `panel` | `#23202B` | `#FFFFFF` | Sidebar, player bar, drawer, cards that need separation |
| `raised` | `#2D2937` | `#EAE6F0` | Hover and selected rows, chip fills, progress track |
| `line` | `#3A3546` | `#DCD6E4` | 1px dividers and outlines |
| `fg` | `#EEEAF3` | `#1F1B27` | Primary text, the play/pause disc |
| `muted` | `#A39CB0` | `#686178` | Secondary text, idle icons |
| `accent` | `#F0B23E` | `#A86C05` | Current track, progress fill, primary buttons, active nav icon |
| `accent_ink` | `#2A1D04` | `#FFF7E6` | Text and icons on `accent` |
| `like` | `#F27286` | `#D2405A` | Filled heart, falling chart position |
| `ok` | `#7FCB9B` | `#2E8A55` | Subscription status, rising chart position |
Covers that have no artwork yet get a placeholder made of two hues (`h1`, `h2`) derived from
the item id, painted as a diagonal gradient between them.
## Type
| Role | Face | Size / weight | Where |
|---------|----------------------|--------------------|-------|
| Display | Unbounded SemiBold | 46 / 40 / 34 / 30 | My Wave hero, detail page titles, sign-in headline, screen titles |
| Wordmark| Unbounded SemiBold | 20 | `musyx` + amber dot |
| Section | Onest SemiBold | 19 | Section headings ("Made for you") |
| Body | Onest Regular/Medium | 14 (rows 14, meta 13, small 12.5) | Everything else |
The fonts are bundled from `crates/musyx/assets/fonts` and licensed under OFL. Durations and
counts use tabular figures.
## Space and shape
- Spacing steps: 2 · 4 · 6 · 8 · 10 · 12 · 14 · 18 · 22 · 28 · 34. Content gutter is 28,
and the gap between sections is 34.
- Radii: cover 10 · control 8 · small cover 6 · pill/round 999 · hero 16 · window cards 14.
- Shell: sidebar 232 · player bar 80 · drawer 320 · track row 52 tall.
- Icons: Lucide 0.460 (ISC), 18px and tinted via `currentColor`. The `-fill` variants are for
liked, play and pause.
## Components
- **Sidebar**: wordmark, five nav items (Home, My Wave, Search, Collection, Podcasts), a
playlist list, and an account chip with sign-out. The active item sits on a `raised` fill
and has an amber icon.
- **Player bar**: shows cover, title/artist, like and dislike on the left. The centre has
transport (shuffle, previous, play disc, next, repeat) over a progress bar with times. On
the right are a quality badge, lyrics, queue and a volume bar.
- **Track row**: index (or an equaliser when playing), cover, title/artist, album, like,
duration and a "more" button that appears on hover. The playing row is amber.
- **Cards**: a cover with a hover play button, the title, and one muted subtitle line.
- **Drawer**: Queue | Lyrics tabs, sliding in from the right over the content edge.