Repository navigation
Milestone 6: artwork styles and settings - #7
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Milestone 6: artwork styles chosen in Sine's settings.
zen-media-viz.artwork-style(preferences.json), read and observed throughsrc/settings.js. Changes apply live.src/card.jscan place the image in the card itself (background) or in the info container.src/runtime.jsmarks the toolbar withzen-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, thatchrome.cssis a user sheet (overrides need!important), and that artwork renders under Zen's window CSP (tested on Zen 1.24.3b, macOS).How was it tested?
npm test(141 tests across 9 files),npm run lint,npm run format:checkandnpm run check:bundlepass.Checklist
npm test)npm run lintandnpm run format:checkpassnpm run build) if anything insrc/changeddocs/manual-testing.mdchecked in a real Zen + Sine installCHANGELOG.mdupdated under Unreleased