Repository navigation
feat: open app menus in StableBar's popup instead of a native menu - #291
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Nov 3, 2026
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
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
AppMenubuilds a popup for a title instead of anNSMenu. It reads the menu's items through Accessibility (title, enabled, checkmark, submenu) into a new built-inappMenupopup block, 260 pt wide and aligned to the title's leading edge. The native menu code, with its.eventTrackingtimer, is gone.AppMenuViewopens that popup throughWidgetPopup, 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.AppMenuListdraws the rows: a checkmark column when any item is checked, dimmed disabled items, separators, a chevron for submenus, and the popup's hover background.PopupPanelbeside the row that hosts the samePopupView. 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.setPopupVisibleWidgetcloses them whenever the popup closes or changes.docs/widgets.mddescribes the popup, switching, morphing and submenus.Testing
swift testpasses on this branch.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.