Add menubar popover mode with window option#176
Draft
nwoodfine wants to merge 3 commits intosuperhighfives:mainfrom
Draft
Add menubar popover mode with window option#176nwoodfine wants to merge 3 commits intosuperhighfives:mainfrom
nwoodfine wants to merge 3 commits intosuperhighfives:mainfrom
Conversation
This was referenced Mar 1, 2026
afd2141 to
18b757f
Compare
added 3 commits
March 1, 2026 15:49
Addresses superhighfives#139 Adds a color history bar below the footer showing recently picked colors. Tapping a swatch applies it as the foreground and copies to clipboard. - ColorHistoryManager: MRU list with immediate and debounced recording - SwatchBar: Reusable swatch component (shared with future palette feature) - Refactored system color picker to use togglePicker() directly - Dynamic window resizing when history appears/disappears
Adds user-defined color palettes in a text format with support for all color formats (hex, rgb, hsl, hsb, lab, oklch). Palettes appear as swatch bars below color history and sync via iCloud Key-Value Store. - PaletteParser: INI-style [Name] headers with comma-separated colors - NSColor.fromColorString(): Reverse parsing for all supported formats - PaletteSyncManager: Bidirectional iCloud KVS sync with loop prevention - PaletteEditor: Monospaced text input with validation feedback - Up to 5 palettes, 20 colors each
Replaces the status bar menu with a native SwiftUI MenuBarExtra that shows the full Pika interface in a popover. "Open as window" preference lets users revert to traditional window behavior in menubar mode. - PikaApp: @main SwiftUI App with MenuBarExtra (.window style) - PopoverContentView: Explicit frame sizing for popover content - Simplified status item management for hybrid popover/window mode - System color picker activation fix for MenuBarExtra context
18b757f to
5021139
Compare
Owner
|
I've refactored a lot of the app, so I think I'd need to rethink how the PR works, but I'd love to understand the use case here. Is the popover preferable to having a window? Did you find any rough edges? Can take a pass a this one too, just curious to understand more of the rationale between docked and menu-bar-free-floating. |
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.
Addresses #181
Replaces the menu bar menu window with a native SwiftUI
MenuBarExtrathat shows the full Pika interface in a popover. The new popover mode is made default (maybe I've been presumptuous that users will prefer this!), but there's an Open as window preference in General Settings that lets users revert to traditional window behavior.Window mode is still the default behavior when dock is enabled (instead of menu bar). Also fixed made some small style fixes for the color format dropdown in window mode.
Stacked PR: This builds on #177 (Color History) and #178 (Custom Palettes). The diff currently includes commits from those PRs—please review and merge PRs 1 & 2 first, then I'll rebase so only PR 3 changes remain.
This is PR 3 of 3 in a stacked series:
mainmain(depends on PR 1)main(depends on PRs 1 & 2)Changes (this PR only)
@mainSwiftUI App entry point withMenuBarExtra(.windowstyle)@main,NSMenuDelegate, and old status bar system (NSStatusItem+NSMenu). AddedsetupStatusItem()for "open as window" mode,isMenubarModecomputed property, preference observersstart()now checksisMenubarModeto skip hide/show behavior in popover contextNSApp.activate(ignoringOtherApps: true)before showing panel, required for MenuBarExtra context where app runs with.accessoryactivation policyNew files
Pika/PikaApp.swiftTesting
Test plan
Note on dependencies
These changes were developed and tested with locally updated dependencies. The PRs intentionally do not include these dependency bumps — they remain on the versions currently in
main. The features should not require the newer versions to build or run. For reference, the development environment used:mainversion891afd44c707