Skip to content

feat(dockview-core): add slide tab reorder mode with FLIP animations#1129

Merged
mathuo merged 5 commits intomathuo:masterfrom
KyDenZ:tab-drag-animation
Mar 26, 2026
Merged

feat(dockview-core): add slide tab reorder mode with FLIP animations#1129
mathuo merged 5 commits intomathuo:masterfrom
KyDenZ:tab-drag-animation

Conversation

@KyDenZ
Copy link
Contributor

@KyDenZ KyDenZ commented Mar 4, 2026

Summary

Introduces smoothTabReorder: boolean — a new option that enables browser-tab-like slide animations during drag-and-drop tab reorder. Defaults to false (existing behavior unchanged).

Changes

During drag, tabs slide apart to open a gap showing where the dragged tab will land
On drop, tabs animate to their final positions
The dragged tab collapses in-place (dv-tab--dragging) so the gap is clearly visible
Respects prefers-reduced-motion media query

Docs

Added template with a toggle to enable/disable smoothTabReorder in tabview sandbox

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 4, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c282b97:

Sandbox Source
dockview-app Configuration
editor-gridview Configuration
externaldnd-dockview Configuration
fullwidthtab-dockview Configuration
iframe-dockview Configuration
keyboard-dockview Configuration
nativeapp-dockview Configuration
rendering-dockview Configuration

@mathuo
Copy link
Owner

mathuo commented Mar 4, 2026

@KyDenZ don't suppose you have a quick gif of the behavior?

@KyDenZ
Copy link
Contributor Author

KyDenZ commented Mar 5, 2026

Sure! Here are two recordings showing the feature in action:

Default behavior: smoothTabReorder: false
Screen Recording 2026-03-05 at 10 05 33

New behavior: smoothTabReorder: true
Screen Recording 2026-03-05 at 10 05 54

Enabling smoothTabReorder makes tabs slide apart during drag to reveal the insertion gap, then animate to their final positions on drop. The default behavior is unchanged.

*
* Defaults to `false`.
*/
smoothTabReorder?: boolean;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to be a pain, could we change to tabAnimation="smooth"|"default" defaulting to "default"?

and then I will get this merged!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mathuo
Copy link
Owner

mathuo commented Mar 24, 2026

A couple of new build checks were added recently. npm run format should fix the format issues.

Flavien VACCARETTI added 2 commits March 25, 2026 10:31
…efault

Replace boolean smoothTabReorder option with a string union tabAnimation
property, defaulting to default. Introduce TabAnimation type and
DEFAULT_TAB_ANIMATION constant. Update Angular binding, tests, docs, and
examples accordingly.
@KyDenZ KyDenZ force-pushed the tab-drag-animation branch from 11b2d06 to c282b97 Compare March 25, 2026 09:37
@mathuo mathuo merged commit c6d3bd5 into mathuo:master Mar 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants