Skip to content

Milestone 6: artwork styles and settings - #7

Merged
rodzy merged 10 commits into
mainfrom
milestone-6-styling
Nov 28, 2026
Merged

rodzy merged 10 commits into
mainfrom
milestone-6-styling

Conversation

@rodzy

@rodzy rodzy commented Nov 28, 2026

Copy link
Copy Markdown
Owner

What does this change?

Milestone 6: artwork styles chosen in Sine's settings.

  • New Sine setting zen-media-viz.artwork-style (preferences.json), read and observed through src/settings.js. Changes apply live.
    • Small (default): 48px thumbnail beside the title.
    • Large: centered cover above the title.
    • Background: artwork behind the whole card. The card grows to a square on hover so the whole cover shows, with the progress bar and controls at the bottom.
  • src/card.js can place the image in the card itself (background) or in the info container.
  • src/runtime.js marks the toolbar with zen-media-viz-style, sizes the image per style, and fetches a sharper image when the window moves to a denser screen.
  • chrome.css: styles for the three modes, a fix for Zen's text fade covering the start of the title, the small thumbnail hidden in very narrow sidebars, and a pointer cursor on the media card's buttons.
  • CLAUDE.md: notes on Sine settings, that chrome.css is a user sheet (overrides need !important), and that artwork renders under Zen's window CSP (tested on Zen 1.24.3b, macOS).
  • Docs: changelog, roadmap, and an "Artwork styles" manual checklist.

How was it tested?

  • npm test (141 tests across 9 files), npm run lint, npm run format:check and npm run check:bundle pass.
  • The maintainer tested all three styles by hand in Zen 1.24.3b on macOS during development.

Checklist

  • Tests were written first and cover the change (npm test)
  • npm run lint and npm run format:check pass
  • Bundle rebuilt and committed (npm run build) if anything in src/ changed
  • Relevant items in docs/manual-testing.md checked in a real Zen + Sine install
  • CHANGELOG.md updated under Unreleased

rodzy added 10 commits November 27, 2026 17:52
A dropdown in preferences.json picks a small thumbnail, a large cover or a blurred or sharp background. The runtime marks the toolbar with the style, places the image in the card or its info container, sizes the image per style and pixel density, and follows pref and screen density changes.
The small thumbnail grows to 48px and no longer sits under Zen's text fade. The large cover keeps the title and artist on their own row and opens to a height that fits it. The background style replaces the blurred and sharp variants and grows the card to a square on hover so the whole cover shows.
…ttons

In the background style the progress bar now sits just above the playback controls when the card is expanded. Every enabled button on the media card shows a pointer cursor, so it reads as clickable.
A user pref that exists with a non-string type made getStringPref throw,
which stopped the mod from starting. Read it defensively and use the
small thumbnail instead.
The background card fills a square as wide as the sidebar, so the
240px cover was too soft. Request 400px for that style.

Create the MutationObserver after the pref and pixel-density watchers so
a failure setting those up leaves no observer behind.
…eight

Cards animate while Zen reindexes the stack, which made background cards
jump. Exclude [zen-reindexing] from the card transition.

The small style's taller hover height only fits when the sidebar is wide
enough to show the thumbnail, so apply it only above the 180px container
breakpoint.
@rodzy
rodzy merged commit cc06f37 into main Nov 28, 2026
1 check passed
@rodzy
rodzy deleted the milestone-6-styling branch November 28, 2026 03:03
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