Skip to content

feat: overflow widgets at the notch into a popup of the widgets themselves - #316

Merged
Seb-GRAF merged 6 commits into
mainfrom
feat/notch-overflow
Oct 24, 2026
Merged

Seb-GRAF merged 6 commits into
mainfrom
feat/notch-overflow

Conversation

@Seb-GRAF

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

Copy link
Copy Markdown
Collaborator

Problem

Fixes #312. Fixes #313.

On a notched bar, overflow ignored the notch. Widgets left in configuration order, so on the right the clock usually went first. One More widgets button sat at the far right for both sides, and it opened a native menu of text titles. App menus that expand on hover could also move themselves into that menu when hovered, which put their menus out of reach.

Changes

  • Hover (Expanding the app menus on hover can move them into More widgets, out of reach #312). The bar decides what to hide from each widget's resting width, and a widget that grows under the pointer (app menus, the Sound slider, hover layouts) only takes the free room on its side. Nothing hides or moves to make room for it, so the hovered widget never shifts under the pointer. The bar records the resting width with each measurement, so a widget's growth is known only once it's measured, and the widget shows expanded only when the room was granted.
  • App menus that don't fit. When an app menu's titles don't fit in that free room, it stays collapsed and hovering the app name opens its full row of titles in a popup under it (WidgetPopup.showRow), aligned with the app name. Clicking a title opens its menu in store.innerPopup as a child of the row, like Menu bar items, and moving across the titles switches menus. Choosing an item or clicking elsewhere closes both.
  • Overflow at the notch (Overflow widgets at the notch and show them in a popup #313). AdaptiveBarPlanner fits each side of the notch on its own. Among equal priorities, the left side gives up its rightmost widgets and the right side its leftmost, and each side gets its own button beside its widget nearest the notch (at the notch when the whole side is hidden). A side reserves room only for its own button. Displays without a notch keep one button at the right end and the configuration order.
  • A popup with the widgets themselves. The button opens a popup (WidgetPopup.showWidgets) sized to its content like a tooltip and kept open like a clicked popup. It draws the hidden units with BarUnitView. Inside it, a widget's popup or app menu opens under the button and replaces the list. App menus show all their titles there, and hover expansion stays off so the bar doesn't react to it. The popup closes when the set of hidden widgets changes. This replaces the native menu and its special cases for workspaces, app menus, Control Center and menu bar items, which now work as they do on the bar.
  • Motion. The button fades in and out, and a change in what overflows animates with the bar's motion.
  • Theme. The button is drawn as a widget (an ellipsis with a "More widgets" tooltip), so it takes the theme's widget background, colors, hover state and tooltip. The bar measures it like the other widgets, and each side reserves its measured width instead of a fixed 30 pt.
  • Menu bar items. The menuBarItems widget now shows square.grid.2x2 instead of an ellipsis, so it no longer looks like the More widgets button.
  • --popup ID for a hidden widget opens under the button on its side.
  • Docs: Adaptive layout and groups, --popup, and the open state.

Known limits, left for follow-ups:

  • Hover popups, tooltips and hover controls don't open inside the popup.
  • Inline hover controls (Sound slider, hover layouts) don't open when their side has no free room; they no longer push other widgets out.
  • Providers with whenVisible stay suspended for widgets in the popup, as the guide already says for overflowed widgets, so they show their last value.
  • A widget that keeps moving in and out of the bar as its width changes closes the popup each time.

Testing

  • swift test: everything passes except 5 cases in ReleaseTests (unchangedAppRejects…), which fail the same way on main on this Mac.
  • Updated the planner tests for the per-side buttons and added notchedSidesOverflowTheWidgetsNextToTheNotchIntoAButtonBesideTheRest.
  • Added hoverGrowthTakesOnlyFreeRoomAndNeverHidesOrMovesOtherWidgets.
  • nativeConstrainedWorkspaceClipsItsDecorationAndScrollingRemovesOffscreenSelection sized its 80 pt bar around the fixed 30 pt button. With no widget padding in that test, the themed button measures 14 pt, so the bar is now 70 pt to keep the workspaces narrower than one cell.
  • Tried on the maintainer's notched MacBook from a signed build of an earlier commit; that try-out prompted the theming, the button's place beside the nearest widget, the new Menu bar items symbol, and the app menu row (expanding in place hid the workspaces and shifted the menu under the pointer).
  • Rendered a crowded notched bar offscreen from main and from this branch, and the popup's content with the popup's style. Before, the right side drops the network, battery and clock and the only button is at the far right; after, each side drops the widgets next to the notch into a button there. Screenshots to follow.
  • Not checked by the agent: hovering app menus, clicking through the popup, and the motion on the live bar.

Merging

Merge or rebase merge, to keep both the fix: and the feat: commit in the changelog.

Claude Opus 5.5 via Claude Code in T3 Code.

@Seb-GRAF
Seb-GRAF force-pushed the feat/notch-overflow branch from 868a125 to 628a5a7 Compare October 24, 2026 16:11
@Seb-GRAF
Seb-GRAF force-pushed the feat/notch-overflow branch from bc3b16f to 008bd1a Compare October 24, 2026 19:11
@Seb-GRAF
Seb-GRAF merged commit a8e90fd into main Oct 24, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/notch-overflow branch October 24, 2026 19:18
@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

Development

Successfully merging this pull request may close these issues.

Overflow widgets at the notch and show them in a popup Expanding the app menus on hover can move them into More widgets, out of reach

1 participant