microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.35k stars 678 forks source link

Proposal: TabView should have a mode for locking tab dragging within the tab row #1685

Open zadjii-msft opened 4 years ago

zadjii-msft commented 4 years ago

Proposal: TabView should have a mode for locking tab dragging within the tab row

Summary

This is a proposal based on https://github.com/microsoft/terminal/issues/3734

I find it confusing from the point of user experience that tab reordering is visually implemented as regular drag and drop. It makes me feel that in addition to reordering I can:

a) detach a tab into its own window, like I'm used to do with web browser tabs; b) drag a tab from one terminal window to other and thus move the tab between windows (again, like in web browsers); c) and some users may even expect that they can drop a tab into some other app (e.g. embed it into a word document).

My opinion on this is unless implementing features mentioned above is on the roadmap, tab reordering should not allow dragging a tab outside of the tab panel. Instead, the tab being moved should slide within the tab row. A good example is how the tabs are visually sliding during reordering in MS Edge (Chromium version).

We should add a setting to the TabView that enables drag reordering of tabs, but only within the tab row itself. For applications that don't support tab tear-out, but do want to support tab reordering, this would possibly be a more intuitive experiences.

Right now, we're creating our TabView the following way:

    <mux:TabView x:Name="TabView"
                 VerticalAlignment="Bottom"
                 HorizontalContentAlignment="Stretch"
                 IsAddTabButtonVisible="false"
                 TabWidthMode="SizeToContent"
                 CanReorderTabs="True"
                 CanDragTabs="True"
                 AllowDropTabs="True">

I would have imagined that CanReorderTabs="True", CanDragTabs="False", AllowDropTabs="False", or some other combination of those properties would have resulted in the behavior we're looking for.

yaira2 commented 2 years ago

We'd like to see this behavior for Files as well.