-
Notifications
You must be signed in to change notification settings - Fork 701
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
Proposal: TabView Parity with WCT TabView #2007
Comments
Can we get Tab Placement for sides and bottom at some point too? |
This issue is specifically about getting to parity with the Windows Community Toolkit version. We'd like to have alternate Tab Placement modes, but those features are tracked in #1332. |
I would like to tackle this issue :) |
I have already finished most features of this proposal, however there are a few questions that came up during development:
|
@chingucoding Based on the spec review for TabView: CloseButtonOverlayMode
@stmoy can say if anything has changed since then (I'm not aware of a spec change). Should be fine going ahead and treat
Yes, that's my suggestion. This already is the case if we don't specify an icon and header for the default tab with mode anyway, see below: |
If |
@chingucoding Reading further through the spec review of TabView V1, it seems there is still room for discussion about this setting in a future TabView V2 spec. The default value itself (currently |
There are pro's and con's to that reasoning. On the one hand, yes developers always align with the system when we say "Auto will always be the default, but what Auto will actually be may change". But what happens if we change what Having this "System default that might change" is not my favorite option. If devs want the default option, why not make it the initial value, instead of having a sort of wrapper for the current default. |
In general, my philosophy is: do what WCT does (unless what WCT is bad). WCT behavior in this case seems to be agnostic to the Icon/Content - meaning the Tab always has a fixed width for both the unselected and selected state. This results in the behavior of the Text showing when the tab is unselected, which I don't think is a great look. The following markup produces the following visuals: <controls:TabViewItem Header="Home" Icon="Home">
<TextBlock Padding="16">The TabView control has multiple uses.</TextBlock>
</controls:TabViewItem>
<controls:TabViewItem Header="Tab 3">
<TextBlock Padding="16">You can enable drag-and-drop and reorder the tabs too.</TextBlock>
</controls:TabViewItem>
<controls:TabViewItem Header=" ">
<TextBlock Padding="16">You can enable drag-and-drop and reorder the tabs too.</TextBlock>
</controls:TabViewItem> My preferred behavior would be that tabs without icons would show blank regardless of if their text is set. Thoughts?
The platform uses To that end, since there is already the Persistent behavior, I think the introduction of
Semantically, I think CC: @MikeHillberg |
Yes that seems to be the best way in my opinion. Showing 3 letters of the TabItem header usually isn't really helpful, so I think this is the best way to handle missing icons.
Oh, I see. I have updated the PR accordingly so that |
Could it be possible to have an option making the same style and looking as WCT TabView? WCT TabView is gonna be deprecated but I really miss its reveal and acrylic effects, which, in my opinion, still looks more consistent with the current Fluent Design system. I also know some developers want to style their TabView in that way, so it would be great to provide an option such that they can update from WCT without re-designing their apps. Furthermore, I'm also wondering in the future of WinUI3, as everything will be united, in addition to matching the chromium Edge from WinUI side, can Edge also steps towards the current fluent design? It would be great to see Edge uses TabView and other WinUI components and becomes more "fluent" :) |
If the WCT version has fluent, then the WinUI TabView needs fluent in order to obtain parity. |
Proposal: TabView Parity with WCT TabView
Summary
The WinUI TabView is missing two main features relative to the Windows Community Toolkit TabView:
Tab Width Behavior: Compact API Link
The unselected tabs show only their icon and no text until they are selected.
Overlay Close Button API Link
The x-to-close button is shown when the user hovers over the tab.
Rationale
Scope
Important Notes
The proposed API for these properties is outlined in #304, which is the initial proposal for TabView.
Specifically, the following APIs are proposed:
Tab Width Behavior: Compact
Existing enum (with new value) and existing property
TabWidthMode : {Equal, SizeToContent, Compact}
<TabView TabWidthMode="Compact" />
Overlay Close Button
New enum and property
CloseButtonOverlay : {Auto, OnHover, Persistent}
<TabView CloseButtonOverlay="OnHover" />
Open Questions
The text was updated successfully, but these errors were encountered: