Repository navigation
Description
Problem
Widgets are drawn in two ways. Built-in types (text, clock, active app, and script or provider widgets without a layout) draw through a switch and label() (Sources/StableBar/BarView.swift:321, :392). Widgets with a layout, overlays and popups draw through PopupBlockView. A widget's text is also derived in three places: content(), block() for layout fields (BarView.swift:366) and overflowTitle for the More widgets menu (BarView.swift:161).
Anything that changes how text appears would have to be built twice:
- Transitions. There are none today, so changed text, and widgets that show or hide, snap into place. A clock minute, a new track title or a new front app can't roll or fade in.
- Temporary output, such as showing the volume number for 1.5 s after a change before returning to the icon.
scrollSpeed, which works on text and field blocks but not on a built-in widget's label.
Proposal
- Give each widget kind one function that returns its
text,iconand fields. The renderer, the overflow menu and the inspector all use it. - Give each built-in type a default layout, such as a row of
symbol(icon) andfield(text), and draw every widget throughPopupBlockView. A configuredlayoutreplaces the default, as today. The workspace widget keeps its own view. AddImageRenderersnapshot tests of the default layouts before switching, so existing bars stay pixel-identical. - Then add, in the block renderer only:
transitionon widgets and text, field and symbol blocks:none,fade,roll,numeric(contentTransition(.numericText())). It usesanimationand respects Reduce Motion.- An enter and exit transition when output
hiddenchanges. - Temporary output, for example
"temporary": { "fields": { "text": "62" }, "duration": 1.5 }.
This would unlock:
- Content and show/hide transitions
- Temporary output
- Scrolling text on built-in widgets
Possible today
A layout already gives a widget per-part styles and scrolling text. Nothing gives transitions. animation only affects style and hover changes (BarView.swift:310).
Related
None tracked. #15 (style resolution) also changes BarView.swift. Landing it first keeps this one smaller.
Triaged by Claude Code (Claude Opus 5.5).
Activity
M4n0x commentedon Oct 15, 2026
Performance
The bar draws each widget twice per display: once visibly, and once in a hidden copy that measures widths for the overflow planner (
Sources/StableBar/BarView.swift:60-77). If transitions animate in that copy, the measured widths change every frame and the bar's layout is replanned 60–120 times a second for the length of each animation.Requirements for this change:
.transaction { $0.disablesAnimations = true }. It measures final widths only.TimelineViewor repeating animation runs unless something is moving, such as scrolling text or a progress block heading for its target.AnyView(Sources/StableBar/PopupView.swift:125). Before every built-in widget goes through blocks, replace it with a concrete view per block type, or show with Instruments that it doesn't matter at a typical size (about 20 widgets on two displays).Triaged by Claude Code (Claude Opus 5.5).
M4n0x commentedon Oct 17, 2026
pr16-transitions.mp4
stablebar-releases commentedon Oct 21, 2026
🎉 This issue has been resolved in version 0.5.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀