Skip to content

feat(media): add an Icon presentation for Now Playing - #71

Closed
thornburywn2 wants to merge 1 commit into
HANCORE-linux:mainfrom
thornburywn2:media-compact-style
Closed

thornburywn2 wants to merge 1 commit into
HANCORE-linux:mainfrom
thornburywn2:media-compact-style

Conversation

@thornburywn2

Copy link
Copy Markdown

Problem

On a narrow output (here a 2880×1800 laptop panel at 3×, so a 1270pt bar), a playing track widens G9 by roughly 160pt: the previous/next controls plus the 88pt title marquee.

  • Bar drops a stage: that pushes the bar from responsive stage 0 to stage 1, which hides G9 (and G10).
  • It stays dropped: a hidden group can't be re-measured, so after playback stops candidates[0] keeps the playing-width figure and the bar stays in stage 1 until the shell reloads.

So on narrow bars, Now Playing disappears exactly when something is playing.

Measured with omarchy-shell shell debugBarGeometry and a silent mpv test track:

Presentation Idle need Playing need Stage while playing
Default 1236 ~1395 1 (G9/G10 hidden)
Compact (FULL/muse) 1236 1365 1 (G9/G10 hidden)
Icon (this PR) 1236 ~1259 0

Change

A third G9 presentation, mediaStyle: "icon": the default row with only play/pause and the playing pulse. The lazy panel keeps the full controls, cover and progress.

  • Media BarWidget.qml: normalizes default / full / icon. iconStyle hides the skip controls and marquee, and the marquee animation isn't started while hidden. Adds marqueeVisible alongside the existing museVisible / v1FullVisible hooks.
  • State Service.qml: normalizedMediaStyle() keeps "icon" in both the reader and the appearance setter. Previously anything other than "full" collapsed to "default".
  • Control Center: G9 offers Default / Compact / Icon. I avoided "Minimal" because the retired-controls check in control-center-regression.sh reserves that word.
  • Docs: describes Icon in docs/v1-presentation-contract.md.

Default and Compact behave exactly as before.

Tests

  • tests/audio-media-plugins-regression.sh: passed.
    • New static checks: normalization, hidden skip controls and marquee, the Control Center option, and state normalization.
    • The media smoke test has a new Icon phase: Icon is active, the row is visible, the visualizer isn't, the marquee is hidden, and play/pause forwards both ways. The Default phase now also asserts the marquee is visible.
    • Width isn't asserted in the smoke test because the headless window never re-lays out the row; the real-bar numbers are in the table above.
  • tests/control-center-regression.sh: passed. The smoke test now expects three G9 options and that cycling persists icon before restoring Default, in both V1 and V2.
  • tests/contract-regression.sh: everything passes except test_package_release.test_lifecycle_contract_pins_exact_release_identities. That's expected: the digest in contracts/lifecycle-predecessors-v1.json changes with any plugin change, and recent fix: commits likewise leave it for the release: repin … step.

Real Wayland check

Omarchy 4.0.4 V1 Shibumi bar on a single 1270pt output, playing a silent mpv track: with Icon selected, G9 shows play/pause and the pulse at 56pt, the bar stays in stage 0, and G9 and G10 remain visible during and after playback.

🤖 Generated with Claude Code

On narrow outputs a playing track widens G9 by the skip controls and the
88pt title marquee (~160pt on a 1270pt-wide bar). That pushes the bar
into a responsive stage that hides G9 and G10, and because a hidden
group cannot be re-measured, the bar stays in that stage after playback
stops until the shell reloads. The existing Compact (FULL/muse)
presentation is about as wide, so it does not avoid this.

Add a third G9 presentation, `mediaStyle: "icon"`: the default row with
only play/pause and the playing pulse. The skip controls and marquee are
hidden (and the marquee animation stays stopped), while the lazy panel
keeps the full controls.

- media BarWidget: normalize default/full/icon; iconStyle hides the skip
  controls and marquee; expose marqueeVisible like the existing hooks.
- state Service: normalizedMediaStyle() keeps "icon" in both the reader
  and the appearance setter.
- Control Center: offer Default / Compact / Icon for G9.
- tests: media smoke checks the Icon presentation and that Default still
  shows the marquee; regression and control-center smoke cover the third
  option and its persistence.
- docs: describe Icon in the V1 presentation contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HANCORE-linux

Copy link
Copy Markdown
Owner

Thanks for the detailed measurements! We'll keep Now Playing at its two presentations; Compact already drops the skip controls and title. The underlying problem you found — the bar staying in the reduced stage after playback stops until the shell reloads — is a real bug, and we'll look at it separately.

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.

2 participants