Skip to content

Add the Ability to Specify a Separator in CommandBar#2253

Draft
cbowdoin wants to merge 4 commits intomicrosoft:mainfrom
cbowdoin:user/cbowdoin/AddSeperatorSupportToCommandBar
Draft

Add the Ability to Specify a Separator in CommandBar#2253
cbowdoin wants to merge 4 commits intomicrosoft:mainfrom
cbowdoin:user/cbowdoin/AddSeperatorSupportToCommandBar

Conversation

@cbowdoin
Copy link
Contributor

@cbowdoin cbowdoin commented Mar 18, 2026

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

This introduces the ability to specify a separator after a group of commands in the command bar. To accomplish this CommandBarItemGroup was changed from a typealias of [CommandBarItem] to an explicit class and given a new show separator after property.
If this seperator property is set then we will add a separator after the group in CommandBarCommandGroupsView.

CommandBarItemGroup implements RandomAccessCollection and ExpressibleByArrayLiteral to try and maintain any existing functionality that we had from CommandBarItemGroup being and Array before.

Verification

Validated in demo that separator shows with the toggle

Visual Verification
Before After
image image

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant