-
Notifications
You must be signed in to change notification settings - Fork 53
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
🧪 [Experiment] Segmented #392
Comments
Ugh, the new behavior of linked prs automatically closing when they don't say 'fixed' is a bit annoying. Maybe this gets better with tasklists in the future... |
I'm really liking these designs! Thanks so much for picking up this control. It is one of the clear missing points in WinUI and it appeared upstream didn't even understand the original discussion. I'm not sure multiple designs should be supported out of the box though. WinUI doesn't usually do this. My vote would be for the PivotSegmentedStyle to be the only out-of-box style. Apps can customize it as needed. |
Great feedback :)! The default style is according to the design specs in the Windows Visual Library (Figma). In general, the |
Makes sense. I think a group of toggle buttons is fundamentally the only new thing a segmented control can do. It's already possible to restyle a group of radio buttons and has been for some time. The real power of this control though is not filling that one little "grouped toggle buttons" feature gap. It's generalizing both the designs and control API to unify all these settings/option type use cases into one control. I also know the TabStrip type view selection mode is technically a violation of standard conventions. But because there is no TabStrip in WinUI I think this control again serves as an interesting option. It again unifies some things that at first appear to be different but perhaps, fundamentally, are not. |
@niels9001 @michael-hawker I realized that this control is actually a What this means is in the controls hierarchy A |
It was announced on the call yesterday that a new control, Segmented Control will be added in version 1.4.2. |
@robloo appreciate your breakdown here. We do have the selection mode option on the current control. Our original intent wasn't really to provide functionality for a tab-strip, though @niels9001 did just add a sample for a pivot like experience in a PR here: CommunityToolkit/Windows#236 If the platform does implement a Segmented control, I'm not sure which approach to compositing they'll take, but it's something we can certainly highlight. On that note... @ghost1372 yes, it's on their roadmap for 1.5 to investigate (not 1.4.2). FYI, we've also shipped the Segmented control in the 8.0 release in our main repo. If the platform decides to invest in this type of experience/control, we'll work with them, as we've done in the past, to help share what we've built, its experience, and feedback as a starting point. Since we've shipped this experiment, I'm going to close this issue, as we don't need it for tracking anymore. Anything new should open a discussion on the main repo. Thanks! |
@michael-hawker Yea, my point is this control hasn't reached the correct level of generalization yet. I think it's fundamentally a SelectionStrip and represents a whole class of controls. Several people are putting various ideas together separately but it's hasn't been brought together yet. I think the whole thing needs to be generalized to a SelectionStrip before wide release. |
Approved from Discussion
#314
Problem Statement
The WinUI controlset lacks a control that allows for configuring a view or setting. It allows developers to declare 2 to 5 items that can be (multi) selected to update a view or select a specific function.
Mobile platforms like iOS and Android have been using Segmented Control for years, but Windows does not. The Pivot control comes close, but hasn't been updated and is more used for navigation, not for selection.
Overview
This experiment adds the following components:
Using
You can try it out via the NuGet Packages here:
UWP
https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.Uwp.Segmented
WinUI 3
https://dev.azure.com/dotnet/CommunityToolkit/_artifacts/feed/CommunityToolkit-Labs/NuGet/CommunityToolkit.Labs.WinUI.Segmented
Read more about Preview Packages here.
Code
Result
Docs & samples
https://github.com/CommunityToolkit/Labs-Windows/tree/main/components/SegmentedControl/samples
Additional info
No response
Implementation Requirements
Tested Platforms
Technical Review
Community Help?
Yes
The text was updated successfully, but these errors were encountered: