Repository navigation
feat: show hover controls in an animated tooltip instead of widening the widget - #292
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
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
bar.inlineHoverControlsoff (the default), the Sound slider andhoverLayoutblocks 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 aVolumeSliderview that both use.PopupBackground, the system shadow and the theme's shadow window), and open and close with the bar's popup motion and transition.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.open()intomorph(_:into:…), which both paths call, andmakeShadowWindownow decides on its own whether a style needs a shadow window.fix:commit.TooltipWidthlays a tooltip out at its natural width, up to 320 pt, and measures its height once the text wraps there.fix:commit. A symbol block with awidestSymbol, 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.hoverDelayandinlineHoverControls, Settings, and the guide (Controls on hover, Tooltips, Animation, Popups, Configuration, Settings). Both are app-widebarkeys likekeepWindowsClear, not per-screen ones, and includes, profiles and packages merge them like otherbarkeys. No examples use hover controls.Testing
swift test: 449 Swift Testing and 294 XCTest tests pass.hoveringPopupsWaitsAndKeepsBothTheWidgetAndPopupReachablenow expects the next widget's popup within 100 ms while one is open. It fails without the change.hoverTooltipsFitTheirTextAndDoNotCaptureClicksnow uses one long sentence that has to wrap. Before the fix commit its tooltip was 39 pt tall, one line.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 changeWidgetPopup.swift.Claude Opus 5.5 via Claude Code in T3 Code.