microsoft / microsoft/terminal

[MEGATHREAD] Tab drag/drop/tear-out gaps

Open
#14,900 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-UserInterface External-Blocked-WinUI3 Issue-Scenario Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

A follow-up to #1256 and #5000. Now that those are in the final stages, it has become more obvious where the papercuts lie.

## We CANNOT fix it

* [ ] You cannot drag / drop tabs as admin.
- See #6661
* [ ] When tearing-out with touch, the tab will appear where the pointer is. NOT where the touch is.
- I'm told there's no way to get the touch position at the _end_ of the drag.

## "Tear out v1" gaps

_Things that are obvious gaps in the initial version of drag/drop._ Firefox-like (hopefully).

* [ ] Tabs have no preview of what's being dragged
* [ ] Tabs can only be dropped on the TabView, but not the whole titlebar
* [ ] The tab item corners are rounded on top, and flat on the bottom
* [ ] #15438
- The tab view item shows a 🚫 when dragging over _not the Terminal_, even though you totally can just drop there to make a new window
- There is a way in the Sept'23 OS release to suppress the drag icon, however, this _ENTIRELY_ suppresses the drag icon. That means there's no `Move ↗` for successful ones, either. So that's ridiculous.
* [ ] VsCode shows that it can accept a "Move" of a Terminal tab, even though that's obviously insane
* [ ] The tab view of the target doesn't expand to make room for the new tab. It makes a gap, but it doesn't increase its width, so the existing tabs are clipped on the right
* [ ] The target doesn't show a preview of the dragged tab's content "in place" when hovering over the tab view
* [ ] We shouldn't "animate in" tab items when dropping. They should just appear
* It wasn't trivial to just `AllowDependentAnimations(false)` then re-enable. Presumably they're independent animations
* [ ] pressing escape should stop the drag and put the window back where it started
* [ ] while tab dragging, if you drag over another window (and switch to 'move' in the image being dragged), the window you've dragged over should be raised in zorder. this could expose places to drop the tab.
* [ ] if window is snapped and you drag a tab out, you're using the snap rect (so, left snap and drag out would be as tall as the monitor). You should use the normal position, `GetWindowPlacement`
* [ ] https://github.com/microsoft/microsoft-ui-xaml/issues/8442

## The fullness of time gaps

_Given infinite engineering resources, what would we like the experience to be?_ Basically, Chromium-like or better.

Note that this experience is currently blocked entirely for Terminal. We'll need to be able to switch to WinUI 3 (WASDK 1.6) before we can use the new tab APIs they provided

* [ ] #16129
* Including, but not limited to:
* [ ] Tabs should make a new window as soon as their torn out
* [ ] Torn-out tabs need to be able to snap to snap positions (maximized, snap layouts) without dropping first
* [ ] Multiple tabs can't be dragged/dropped all at once
* [ ] Dragging a tab in a window with a single tab should just drag the window

## Resources

_Notes to myself on internal threads to investigate_

* MSFT:42334223: TabView Crash when moving tab in dozens of tabs
* os.2020!8180615: Suppressing drag feedback icon while dragging a tab

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by choosing one unchecked gap in this megathread and read its linked issue or referenced resource, such as #15438 or #16129. No source file or test is named, so locating the relevant tab drag/drop implementation will require project research. Done means one specific drag/drop behavior is implemented and verified without expanding the entire thread’s scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.