Skip to content

feat: show hover controls in an animated tooltip instead of widening the widget - #292

Merged
Seb-GRAF merged 4 commits into
mainfrom
feat/287-hover-tooltips
Oct 23, 2026
Merged

Seb-GRAF merged 4 commits into
mainfrom
feat/287-hover-tooltips

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Hovering the Sound or Amphetamine widget widened it and pushed the rest of the bar aside. Tooltips appeared without the theme's motion after a fixed delay, and long ones spilled out of their card. The muted Sound speaker also sat left of center.

Closes #287. Fixes #288. Fixes #289.

Changes

  • Hover controls in a tooltip: with the new bar.inlineHoverControls off (the default), the Sound slider and hoverLayout blocks open in a tooltip under the widget instead of widening it. The pointer can move into it, and it stays open while a slider is dragged. Turning the option on keeps the inline reveal from feat: reveal hover controls smoothly beside widgets #189. The Sound slider moved into a VolumeSlider view that both use.
  • One tooltip: text tooltips and hover controls share one window, drawn like a popup (PopupBackground, the system shadow and the theme's shadow window), and open and close with the bar's popup motion and transition.
  • Hover delay: bar.hoverDelay (milliseconds, 400 by default) sets the wait for tooltips, hover controls and hover popups. While one is open, moving to the next widget opens its own at once, as macOS does.
  • Morph: with Morph between popups, an open tooltip or hover popup morphs into the next tooltip or popup, including the popup a click opens from a tooltip. The morph moved out of open() into morph(_:into:…), which both paths call, and makeShadowWindow now decides on its own whether a style needs a shadow window.
  • Settings: a Hover group under General holds Delay and Open hover controls inline, and Settings search finds it. The Morph between popups hint mentions tooltips.
  • Long tooltips (Long tooltips spill out of their card #288): a separate fix: commit. TooltipWidth lays a tooltip out at its natural width, up to 320 pt, and measures its height once the text wraps there.
  • Sound icon (The Sound widget's speaker sits off-center when muted or at zero volume #289): a separate fix: commit. A symbol block with a widestSymbol, which only the Sound widget's default layout sets, draws its symbol centered in that width instead of at its leading edge. The width doesn't change, so the widget keeps its size at every level and the inline slider from feat: show the volume level in the Sound widget's speaker #160 still doesn't move.
  • Surfaces: decoders and schema for hoverDelay and inlineHoverControls, Settings, and the guide (Controls on hover, Tooltips, Animation, Popups, Configuration, Settings). Both are app-wide bar keys like keepWindowsClear, not per-screen ones, and includes, profiles and packages merge them like other bar keys. No examples use hover controls.

Testing

  • swift test: 449 Swift Testing and 294 XCTest tests pass.
  • hoveringPopupsWaitsAndKeepsBothTheWidgetAndPopupReachable now expects the next widget's popup within 100 ms while one is open. It fails without the change.
  • hoverTooltipsFitTheirTextAndDoNotCaptureClicks now uses one long sentence that has to wrap. Before the fix commit its tooltip was 39 pt tall, one line.
  • Offscreen renders of the controls tooltip in light and dark, of the long tooltip before and after the fix, and of the Sound icon at each level before and after centering.
  • Not checked here: hovering on a live bar, dragging inside the tooltip, the open and close animation, and the morph, which all need a pointer. The developer is trying a signed test build. The morph has no automated test, for tooltips or popups, because it can't be observed offscreen without a test-only hook.

Screenshots to follow.

Merging

Merge commit, so the fix: commits for #288 and #289 reach the changelog. This replaces #293. Work on #286 may also change WidgetPopup.swift.

Claude Opus 5.5 via Claude Code in T3 Code.

@Seb-GRAF
Seb-GRAF merged commit c990673 into main Oct 23, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/287-hover-tooltips branch October 23, 2026 14:17
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant