Rewrite DESIGN.md in the standard eight-section format around "The Late-Night Tape Deck": the same tokens, components as they ship (context menu, drag reorder, shortcuts), named rules, known contrast and token debt, and a History section listing what the build dropped from the mockup. The mockup is now marked historical; the build is the authority. Add the Impeccable sidecar (.impeccable/design.json) and the first critique snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 KiB
name, description, colors, typography, rounded, spacing, components
| name | description | colors | typography | rounded | spacing | components | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Musyx | A dark-first desktop player for Yandex Music, built with iced. |
|
|
|
|
|
Design System: Musyx
The source of truth is the build. The tokens above map 1:1 to
crates/musyx/src/ui/theme.rs, so change both together. Keys
without a suffix are the dark theme. The -light keys are the same roles in the light theme.
design/mockup.html is the original exploration (see History).
It is no longer the authority.
Overview
Creative North Star: "The Late-Night Tape Deck"
Musyx looks like a piece of dark hardware playing in a dim room late at night. The casing is aubergine graphite. The controls are quiet and almost the same colour as the casing. Exactly one thing glows: an amber lamp that marks what is playing, what you chose and what you can press next. People leave the window open for hours, so nothing moves or competes for attention unless the music asks for it.
The layout is the familiar desktop player shell: sidebar, content, player bar, and an optional drawer. Its brand shows in the details, not the structure. There is one display face for titles and one plain face for everything else. Depth comes from three close tonal steps, not from shadows. Interactions follow desktop rules: right-click menus at the pointer, keyboard shortcuts, and drag to reorder. The My Wave hero is the one place that animates. Its amber lines drift only while My Wave is actually playing.
The theme is dark first. The light theme follows the system setting, or the choice in Settings, and keeps every role.
Key Characteristics:
- One amber accent on an aubergine ground. Amber means "this one, now".
- Three tonal surfaces (bg, panel, raised) do the layering. Shadows appear only on things that float.
- Unbounded for titles, Onest for everything else. Icons are Lucide at 18pt.
- Dense, scannable lists with 52pt track rows.
- Desktop-native interaction: context menus, shortcuts, drag reorder, media keys, and a macOS menu-bar mini player.
Colors
A near-monochrome violet-grey palette with a single warm amber and two quiet status colours.
Primary
- Indicator Amber (
accent): the playing track's title, the progress fill, primary buttons, selected chips, the active nav icon, the active tab underline, the focused search border, the wordmark dot and the My Wave hero lines. The Lossless quality badge also turns amber when Yandex serves FLAC. - Amber Ink (
accent-ink): text and icons placed on amber.
Secondary
- Heart Rose (
like): a filled heart, a falling chart position, destructive menu entries ("Remove from this playlist", "Delete…") and the player's error notice line. - Signal Green (
ok): subscription status and a rising chart position.
Neutral
- Aubergine Graphite (
bg): the window, the content area and the sidebar. - Casing Panel (
panel): the player bar, the drawer, cards that need separation, the search field, dialogs and the context menu. - Raised Plate (
raised): hover and selected rows, lit track rows, chip hover, the slider rail and key caps. - Seam (
line): 1px dividers, outlines on ghost buttons and chips, the menu border and the scrollbar thumb. - Label White (
fg): primary text, the play/pause disc, the volume fill and the toast fill. - Faded Label (
muted): secondary text, idle icons, column headers and placeholders.
Covers with no artwork yet get a placeholder: a diagonal gradient between two hues derived from the item's id.
Named Rules
The One Lit Lamp Rule. Amber marks state (playing, selected, primary, focused) and nothing else. Never use it to decorate. If a screen has two amber things, they must be the same "now".
The Light-Theme Contrast Rule. In the light theme, amber text on bg measures 3.9:1 and
ok text measures 3.8:1. Both are below AA for body text. Until the light accent is darkened,
keep amber text in light mode to titles of 14pt medium or larger, and never use it for small
meta text.
Typography
Display Font: Unbounded SemiBold (bundled, OFL) Body Font: Onest Regular / Medium / SemiBold (bundled, OFL)
Character: Unbounded's wide geometric letters give titles the look of a label on hardware. Onest is a neutral grotesque that holds dense lists and covers Cyrillic well.
Hierarchy
- Display (600, 46 / 40 / 34 / 30): the My Wave hero, detail page titles, the sign-in headline and screen titles ("Collection", "Settings").
- Wordmark (600, 20):
musyxfollowed by the amber dot. - Section (Onest 600, 19): section headings ("Made for you"), sheet titles, and settings card titles.
- Body (400–500, 14; 1.45 for running text): row titles (medium), menu entries (regular), buttons (medium/semibold) and paragraphs.
- Meta (400, 13): artist lines, album columns, durations and help text.
- Small (400, 12.5): column headers, sidebar section labels and the player's times.
Named Rules
The Two Faces Rule. Unbounded appears only at display sizes and in the wordmark. Everything interactive is Onest.
Layout
The window is a fixed desktop shell. The minimum size is 960×620 and the default is 1280×800.
- Shell: a 232pt sidebar, a 1px seam, then the content column, which holds the top bar and the scrolling page. An optional 320pt drawer sits at the right edge and narrows the content while it is open. An 80pt player bar spans the full width at the bottom.
- Content gutter: 28pt. Sections are 34pt apart.
- Spacing steps: 4 · 8 · 12 · 18 · 22 · 28 · 34 are the named tokens. Tight in-component gaps use 2, 6, 10 and 14. About 50 one-off values (16, 9, 24 and others) predate the scale and should move onto it when touched.
- Lists: track rows are 52pt tall with 2pt between rows. Cards are 168pt wide and wrap, with 12pt between cards and 14pt between rows.
- Overlays: the toast floats 96pt above the bottom edge. Menus are pinned to the pointer or to their button. Dialogs are centred in the window.
Elevation & Depth
The resting UI is flat. Depth comes from tonal steps: bg → panel → raised, about one
lightness step apart, with line seams where two surfaces meet. Shadows are kept for elements
that float above the content.
Shadow Vocabulary
- Primary lift (0 4px 12px, black 18%): primary pill buttons only, so the amber action sits slightly proud of the page.
- Menu float (0 10px 28px, black 30%): the context menu and its submenu.
- Toast float (0 6px 18px, black 30%): the status pill above the player bar.
- Dialog float (0 18px 50px, black 35%), over a 45% black backdrop: dialogs only.
Named Rules
The Float-Only Shadow Rule. If it isn't floating above the content (menu, toast, dialog) and it isn't the primary button, it has no shadow.
The No-Dim Rule. Only dialogs dim the window. Menus, the drawer and toasts never do.
Shapes
Shapes are soft and functional. Controls are pills or gently rounded squares, and covers have rounded corners.
- Pills (999): primary, ghost and chip buttons, the search field, the toast and the play/pause disc.
- Controls (8): icon buttons, nav items, track rows and menu entries.
- Covers (10) and small covers (6): album and playlist art at card and row size. Artist covers are round. The context menu also uses the cover radius.
- Cards (14): settings cards, the empty-state card and dialogs. Hero (16): the My Wave hero.
- Key caps (6): the shortcut list in Settings.
Components
Buttons
- Primary: an amber pill with amber-ink label, medium or semibold, padded 10×18, with the
primary lift. On hover it mixes 12% toward
fg. When pressed it mixes 12% towardbg. When disabled it israisedwith amutedlabel. - Ghost: a transparent pill with a 1px
lineoutline and anfglabel. It fillsraisedon hover. It pairs with Primary, as in Play + Shuffle. - Icon button: a 34pt square holding an 18pt icon. Idle it is
muted. On hover the icon turnsfgon araisedfill. A toggle that is on is tintedaccent, and a liked heart islike. - Play disc: a 40pt
fgcircle with abgglyph. When nothing is queued it becomes araisedcircle with amutedglyph.
Chips
- Style: pills padded 7×13, with a
lineoutline and anfglabel. - State: a selected chip fills
accentwith anaccent-inklabel, and can't be clicked again. Chips are used for quality, appearance, language and the My Wave mood, character and language settings.
Tabs
- Text only:
mutedlabels that turnfgon hover or when selected, with a 2pt amber underline under the selected tab. Collection tabs are Liked tracks, Albums, Artists, Playlists and Clips. A count appears next to a tab once its list has loaded.
Cards / Containers
- Cover cards: a 168pt cover with a medium title and a muted subtitle. A raised fill shows on hover. Clicking opens the page. Right-click opens a menu for albums, playlists and artists: Play, Shuffle, and add to or remove from the collection. Your own playlists get Rename… and Delete… instead of the collection item. Clips have a heart instead of a menu.
- Settings cards: a
panelfill, 1pxline, card radius, 24pt padding, and a section title.
Inputs / Fields
- Search: a 420pt pill with a
panelfill and a 1pxlineborder that turnsaccenton focus. Selected text is highlighted in amber at 35%. Suggestions float in a list under it. Opening Search, ⌘F or/puts the cursor in it with the text selected. - Dialog inputs: use the same style.
Navigation
- Sidebar: sits on
bg, notpanel, and is separated from the content by a seam. From top to bottom: the wordmark, five nav items (Home, My Wave, Search, Collection, Podcasts), Playlists with a + button, the playlist list, and an account chip with a settings gear. The active item has araisedfill, anfglabel and an amber icon. Idle items aremuted. - Top bar: a back chevron, disabled when there is no history, and the search field.
Player bar
panelfill, 80pt tall, in three zones.- Left: a 52pt cover with the title and artist, then like and dislike buttons. Right-clicking the cover or title opens the track's menu.
- Centre: shuffle, previous, the play disc, next and repeat, above a 4pt seek rail with an amber fill. The rail's handle appears only on hover or drag. Times sit on either side.
- Right: the quality badge, lyrics, queue, and a volume rail with an
fgfill.
Track row
- 52pt tall, built as a button. Columns in order:
- a grip (your own playlists only)
- the index, or an amber
audio-linesglyph for the playing track (static; it doesn't show pause) - a 40pt cover
- title and artist
- album
- the heart
- the duration
- "…"
- Playing: the title turns amber.
- Unavailable: the title is
mutedand clicking does nothing. - Clicking plays the row and replaces the queue.
- Right-click, or "…", opens the context menu.
- A row stays lit (
raised) while its menu is open, and while it is being dragged. - The heart and "…" are always visible.
- Dragging (your own playlists): press the grip and move. The list reorders live to show where the row will land. Drop to save, or press Esc to cancel. The wheel scrolls during a drag. The list doesn't auto-scroll near its edges yet.
Context menu (signature)
- A 280pt
panelcard with a 1pxlineborder, cover radius, 6pt padding and the menu float. There is no backdrop. - Placement: it opens at the pointer on right-click, or hangs under "…" with the right edges lined up. Near a window edge it flips left or up, and it always stays 8pt inside the window.
- Entries: 32pt tall, with an 18pt
mutedicon and a 14ptfglabel. The entry under the pointer, or chosen with the arrow keys, gets araisedfill. Destructive entries arelike. Disabled entries aremutedand skipped by the arrow keys. - Groups: separated by hairlines.
- Track menus: play actions (Play next or Next track, Add to queue, Play similar tracks); library actions (Liked tracks, Add to playlist ▸, Don't recommend); go-to (album, then up to three artists by name). Your own playlists add Move to top, Move to bottom, and Remove from this playlist. In the queue the first group is Play now, Play next and Remove from queue.
- Card menus: Play and Shuffle; then the collection item, or Rename… and Delete… for your own playlists; then go-to artist for albums.
- Add to playlist ▸: opens a submenu beside the menu on hover, click or →. The submenu holds New playlist… and your own playlists, and scrolls after 10 rows.
- Closing: every action closes the menu, and a toast confirms what happened. Clicking outside, scrolling or Esc also closes it. ↑/↓ move, Enter picks, → and ← open and close the submenu.
Drawer
- 320pt on
panel, with Queue | Lyrics tabs and a close button. - Queue: shows Now playing, then Next up with a count. It lists up to 100 rows, then "and N more". Clicking a row jumps to it. Right-click opens the queue version of the track menu.
- Lyrics: synced lyrics follow playback.
Dialogs
- 380pt
panelcard with card radius and the dialog float over a dimmed window. - Used only when you type or confirm: New playlist, Rename playlist, and Delete playlist.
- Cancel is a ghost button. Confirm is primary, or
likefor Delete. Delete's white label onlikemeasures 2.8:1 in the dark theme, which is below AA, and is a known issue.
Toast
- An
fgpill withbgtext, 96pt above the bottom edge. It reports every action from menus, likes and edits, and clears itself after a few seconds.
My Wave hero
- A 16pt-radius panel holding a canvas of 14 amber sine lines, the title, a line describing how the wave is tuned, and Play / Pause / Resume.
- It is the same hero on Home and on My Wave, larger on My Wave.
- The lines drift only while My Wave plays. Otherwise they hold still at reduced energy.
Keyboard shortcuts
- Listed in Settings → Keyboard shortcuts as label + key caps. The list is capped at 560pt wide so the caps sit near their labels.
- The shortcuts:
- Space: play/pause
- ⌘←/→: previous/next
- ⇧←/→: seek 10s
- ⌘↑/↓: volume
- ⌘L: like
- ⌘F or
/: search - ⌘[ or ⌥←: back
- Esc: closes a drag, menu, dialog, suggestions or the drawer, in that order
- ⌘1–5: nav sections
- ⌘,: Settings
- ⌘ is Ctrl on Windows and Linux.
- Letter shortcuts follow the key's position on non-Latin layouts.
Do's and Don'ts
Do:
- Do take every colour from
Tokensintheme.rs, and change DESIGN.md in the same commit. - Do use Lucide 0.460 icons at 18pt, tinted with the colour of the text they sit beside. New
icons go in
assets/iconswith the Lucide license header. - Do put routine actions on an item in its context menu, and confirm them with a toast.
- Do give every new action a keyboard path, and add it to the Settings shortcut list.
- Do translate every string through
tr/trfwith a Russian entry ini18n/ru.rs. The test suite fails otherwise. - Do test new screens in both themes and both languages with the snapshot tool
(
MUSYX_SNAPSHOT_*, seesnapshot.rs). Russian labels run about 30% longer.
Don't:
- Don't use amber for decoration, borders or illustrations other than the My Wave hero.
- Don't open a dialog for anything that doesn't need typing or a destructive confirmation.
- Don't dim the window for menus, the drawer or toasts.
- Don't fade icons with
scale_alpha. iced's SVG tint drops alpha, so a faded icon renders at full strength. Disabled previous/next already do this. Pre-mix the colour with the surface. - Don't add hardcoded colours outside
theme.rs. About 19 still exist (sign-in, genre tiles, dialogs) and should move into tokens when touched. - Don't add shadows to resting surfaces. Depth comes from
bg→panel→raised.
History
design/mockup.html (published at https://claude.ai/artifact/2gmswtceJM61fcE2F5uYYM) was the
first approved exploration, and it set the palette, type and shell. The build kept those and
deliberately dropped or replaced these parts of it:
- the hero's Tune button and the separate My Wave copy
- the hover play button on cards
- the display-face, two-column chart ranks
- the Podcasts and Disliked collection tabs (Clips was added)
- the Continue listening shelf for podcasts
- the drag grip with an edit bar (replaced by a grip column and live drag)
- Artist wave
- the hover-only "…"
- the animated equaliser on the playing row
- the live sign-in canvas
Treat the mockup as history. Where it and this file disagree, this file and the build win.