Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Radio Button' Style Menu Items #173

Closed
18 tasks done
adambarlow opened this issue Jan 11, 2019 · 5 comments
Closed
18 tasks done

'Radio Button' Style Menu Items #173

adambarlow opened this issue Jan 11, 2019 · 5 comments
Assignees
Labels
area-Menus feature proposal New feature proposal team-Controls Issue for the Controls team
Milestone

Comments

@adambarlow
Copy link
Contributor

adambarlow commented Jan 11, 2019

The WinUI Team has completed this feature. How-to and API documentation is now live.

Proposal: 'Radio Button' Style Menu Items

Summary

Many applications, including visual studio, allow for the addition of checkboxes in the menu options of their MenuBars. These have been an important part of applications which use MenuBar for a very long time. The XAML MenuBar currently supports checkboxes.

However, another lesser used pattern is radio-button style menu options. This patter presents options that automatically swap selection within their group of items. While this patter is used less frequently, it does find precedent in various UIs and is a customer request.

Below is an example of this usage from the Win10 desktop context menu--
image

Rationale

Implementing this request will:

  • Allow for radio-button style options in XAML MenuBars without having to custom implement the logic (e.g. for 'view' menus, etc.)
  • Provide a consistent look and feel for this scenario (if we don't support this it will be implemented in various ways and will not be consistent)

Functional Requirements

# Feature Priority
1 API is straightforward and simple Must
2 API doesn’t require styling, e.g. the 'dot' comes for free Must
3 API allows for the styling of the glyph used for the 'dot' Should

Detailed Feature Design

We plan to create a RadioMenuFlyoutItem in WinUI that derives from ToggleMenuFlyoutItem
It would have the following additional APIs:

  • String GroupName
    • All RadioMenuFlyoutItems within a MenuFlyout with the same GroupName will be grouped together
    • Note: This works the same as in RadioButton today

Open Questions

  • What should the visual distinction around the groups look like, if any?

Release Checklists

Prerelease readiness

  • Dev: quality review + code review done
  • Dev: test coverage added
  • Dev: initial accessibility review done
  • Dev: data metrics plan ready
  • PM: spec up to date
  • PM: feature ready for feedback
  • PM: docs.microsoft.com updates ready

Stable release readiness

  • Dev: feature previously shipped in a prerelease NuGet package
  • Dev: Azure CI tests passing
  • Dev: data metrics ready
  • Dev: accessibility review done
  • Dev: API review done
  • Dev: IDL attribute switched from preview to public
  • PM: spec done
  • PM: glob/loc, privacy, security, license compliance ready
  • PM: customer validation done
  • PM: docs.microsoft.com updated
  • PM: Xaml Controls Gallery updated
@adambarlow adambarlow added the feature proposal New feature proposal label Jan 11, 2019
@mdtauk
Copy link
Contributor

mdtauk commented Jan 11, 2019

Perhaps a hollow circle/ring for unselected items, and a filled one for selected.

@adambarlow
Copy link
Contributor Author

@mdtauk, thanks for the suggestion, we will add that as a suggestion as design takes a look at this.

@michael-hawker
Copy link
Collaborator

@mdtauk I think the key of how this works in existing patterns is that they're always grouped together in a section of the menu, so the user sees this is clearly a group by that construction.

If these items can be placed anywhere though with the same name, a developer isn't bound by that design constraint though and this could lead to messy UX by a developer. I'd almost like to see a RadioMenuFlyoutGroup collection item which is added to a menu and contains the set of items to be grouped. This would force construction to behave like existing system implementations and provide a consistent UX where it's not possible to have radio menu items placed across a menu, e.g.

( We Don't Want This )
-- Radio Option 1
-- Some Checked Item
-- Radio Option 2

@mdtauk
Copy link
Contributor

mdtauk commented Jan 14, 2019

Of course, they would need to be grouped. I would agree it needs to be done in a way where RadioMenuItems have to be placed within a RadioMenuGroup.

image

At present with the Win32 menus, there is no indicator for unchecked items. That would also work with the constraint of placing the items in a group. For that matter, would there also be a case for including an unticked indicator for toggle menu items?

@jevansaks jevansaks assigned caminadab and adambarlow and unassigned caminadab Jan 14, 2019
@jesbis jesbis added this to New proposal in Feature tracking Jan 24, 2019
@jevansaks jevansaks added this to Approved in Controls Triage Feb 11, 2019
@jevansaks jevansaks moved this from Approved to Approved - Assigned in Controls Triage Feb 22, 2019
@YuliKl YuliKl assigned YuliKl and unassigned adambarlow Mar 4, 2019
@YuliKl YuliKl moved this from New proposal to Spec in progress in Feature tracking Mar 6, 2019
@msft-github-bot msft-github-bot added this to Spec in progress in API review status Mar 6, 2019
@jevansaks jevansaks added this to the WinUI 2.1 milestone Mar 8, 2019
@YuliKl YuliKl moved this from Spec in progress to Docs/samples needed in Feature tracking Mar 21, 2019
@YuliKl YuliKl moved this from Spec in progress to API Reviewed in API review status Mar 21, 2019
@YuliKl YuliKl moved this from Docs/samples needed to Spec in progress in Feature tracking Mar 28, 2019
@YuliKl YuliKl moved this from Spec in progress to Docs/samples ready for review in Feature tracking Mar 28, 2019
@msft-github-bot msft-github-bot moved this from API Reviewed to Spec in progress in API review status Mar 28, 2019
@YuliKl YuliKl moved this from Spec in progress to API Reviewed in API review status Mar 28, 2019
Controls Triage automation moved this from Approved - Assigned to Closed Apr 1, 2019
@msft-github-bot msft-github-bot removed this from Closed in Controls Triage Apr 1, 2019
@jevansaks jevansaks moved this from Docs/samples ready for review to Docs/samples needed in Feature tracking Apr 12, 2019
@jevansaks jevansaks moved this from Docs/samples needed to Docs/samples ready for review in Feature tracking Apr 12, 2019
@msft-github-bot msft-github-bot moved this from API Reviewed to Spec in progress in API review status Apr 12, 2019
@msft-github-bot
Copy link
Collaborator

Testing: @jevansaks docs and samples are ready for review

@ryandemopoulos ryandemopoulos moved this from Front Burner: Docs/Samples to Review to Docs/Samples Needed in Feature tracking Apr 23, 2019
@YuliKl YuliKl moved this from Spec in progress to API Reviewed in API review status May 14, 2019
@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Menus feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
API review status
API Reviewed
Feature tracking
Code Complete, needs Docs/Samples
Development

No branches or pull requests

7 participants