Skip to content

feat: open app menus in StableBar's popup instead of a native menu - #291

Merged
Seb-GRAF merged 1 commit into
mainfrom
feat/286-app-menu-popup
Oct 23, 2026
Merged

Seb-GRAF merged 1 commit into
mainfrom
feat/286-app-menu-popup

Conversation

@Seb-GRAF

Copy link
Copy Markdown
Collaborator

Problem

Fixes #286. Clicking an app menu title opens a native macOS menu, which ignores the bar's theme and doesn't morph between titles like widget popups do.

Changes

  • AppMenu builds a popup for a title instead of an NSMenu. It reads the menu's items through Accessibility (title, enabled, checkmark, submenu) into a new built-in appMenu popup block, 260 pt wide and aligned to the title's leading edge. The native menu code, with its .eventTracking timer, is gone.
  • AppMenuView opens that popup through WidgetPopup, anchored to the clicked title, so it gets the theme's popup style, transitions and morphing. While a menu is open, pointing at another title opens its menu, and the open title stays highlighted.
  • AppMenuList draws the rows: a checkmark column when any item is checked, dimmed disabled items, separators, a chevron for submenus, and the popup's hover background.
  • A submenu opens when the pointer rests on its row for 0.2 s, or on click, in a PopupPanel beside the row that hosts the same PopupView. Submenus are child windows of the popup, so its event monitor treats clicks in them as its own. They open on the left near the screen's right edge and stay within the screen's height. BarStore.setPopupVisibleWidget closes them whenever the popup closes or changes.
  • The Apple menu widget and the bar's overflow menu open the same popup.
  • docs/widgets.md describes the popup, switching, morphing and submenus.

Testing

  • swift test passes on this branch.
  • Not checked on screen: this session has no Accessibility access, so it couldn't open a menu on a live bar. Switching titles, submenu placement and clicks in submenu windows need a manual check.
  • No screenshots: this session can't upload images to GitHub.

Known gaps: the fixed 260 pt width cuts long items short; there's no keyboard navigation or press-drag-release; shortcuts still aren't shown; submenus use the system shadow rather than the theme's and appear without animation.

Merging

One commit. A merge commit or a rebase merge keeps it in the changelog.

Claude Opus 5.5 via Claude Code in T3 Code.

@Seb-GRAF
Seb-GRAF merged commit c2dd9aa into main Oct 23, 2026
7 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/286-app-menu-popup branch October 23, 2026 12:38
@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.

Open app menus in StableBar's popup instead of a native menu

1 participant