Allow flexible space, space, and separator in toolbar customization#322
Merged
Conversation
toolbarAllowedItemIdentifiers: was only returning custom toolbar item identifiers, preventing users from dragging flexible spaces, regular spaces, or separators from the Customize Toolbar panel. This adds all three system identifiers to the allowed list. Also fixes toolbarSelectableItemIdentifiers: to return only custom identifiers directly, instead of delegating to toolbarAllowedItemIdentifiers: which would now incorrectly include system items in the selectable set. Adds comprehensive XCTest coverage for all NSToolbarDelegate methods in MPToolbarController. Related to #313 https://claude.ai/code/session_015RrSRJBb5HzrDUAMkZ3Zjj
Contributor
Code Coverage ReportCurrent Coverage: 55.17% Coverage Details (Summary) |
3 tasks
This was referenced Jun 24, 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.
Summary
toolbarAllowedItemIdentifiers:to includeNSToolbarFlexibleSpaceItemIdentifier,NSToolbarSpaceItemIdentifier, andNSToolbarSeparatorItemIdentifierso users can drag these items from the Customize Toolbar paneltoolbarSelectableItemIdentifiers:to return only custom item identifiers (not system spacers), preventing unintended selection state on space/separator itemsMPToolbarControllerTests.mcovering allNSToolbarDelegatemethods: allowed identifiers, selectable identifiers, default identifiers, item lookup, toolbar item groups, and consistency relationships between methodsRelated to #313
Changes
Production code (
MPToolbarController.m, 2 methods changed):toolbarAllowedItemIdentifiers:— appends the three system toolbar item identifiers to the custom item listtoolbarSelectableItemIdentifiers:— returns custom identifiers directly instead of delegating totoolbarAllowedItemIdentifiers:(which would now incorrectly include system items)Tests (
MPToolbarControllerTests.m, 37 tests):toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:Documentation (plans/):
Test plan
All 37 new tests pass on CI across all 4 macOS runners (macos-14, macos-15, macos-15-intel, macos-26).
Manual verification checklist: