Skip to content

fix: enable tab group chip dragging in all animation modes and preser…#1160

Merged
mathuo merged 3 commits intomasterfrom
fix/tab-group-chip-drag
Apr 9, 2026
Merged

fix: enable tab group chip dragging in all animation modes and preser…#1160
mathuo merged 3 commits intomasterfrom
fix/tab-group-chip-drag

Conversation

@mathuo
Copy link
Copy Markdown
Owner

@mathuo mathuo commented Apr 8, 2026

…ve groups across moves

Tab group chip dragging was broken in default (non-smooth) animation mode because _animState was never initialized, preventing dragover/drop from firing. Additionally, LocalSelectionTransfer was never set for chip drags, so other drop targets couldn't recognize the drag as internal.

  • Always initialize _animState and set LocalSelectionTransfer/PanelTransfer for chip drags regardless of animation mode
  • Set dataTransfer.effectAllowed and setData for react-dnd compatibility
  • Disable iframe pointer events during chip drag
  • Add tabGroupId to PanelTransfer so cross-group drops can distinguish tab group drags from full group drags
  • Add moveTabGroupToGroup to preserve tab group metadata (label, color, collapsed state) when moving a tab group to another group
  • Remove redundant drag class toggling from TabGroupChip (managed by Tabs)

…ve groups across moves

Tab group chip dragging was broken in default (non-smooth) animation mode
because _animState was never initialized, preventing dragover/drop from
firing. Additionally, LocalSelectionTransfer was never set for chip drags,
so other drop targets couldn't recognize the drag as internal.

- Always initialize _animState and set LocalSelectionTransfer/PanelTransfer
  for chip drags regardless of animation mode
- Set dataTransfer.effectAllowed and setData for react-dnd compatibility
- Disable iframe pointer events during chip drag
- Add tabGroupId to PanelTransfer so cross-group drops can distinguish
  tab group drags from full group drags
- Add moveTabGroupToGroup to preserve tab group metadata (label, color,
  collapsed state) when moving a tab group to another group
- Remove redundant drag class toggling from TabGroupChip (managed by Tabs)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Apr 8, 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 48b2822:

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 and others added 2 commits April 8, 2026 23:16
- TabGroupChip: verify dragstart no longer self-manages the dragging class
- Tabs animation: 11 tests covering chip drag initialization in all modes,
  LocalSelectionTransfer setup, dataTransfer properties, collapse behavior,
  insertion index computation, transform skipping in default mode, cleanup
  on cancel, and drop handling in default mode
- DockviewComponent: 4 tests covering moveGroupOrPanel with tabGroupId
  for center drops, collapsed state preservation, extremity drops creating
  new groups, and partial group moves leaving other panels in source

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@mathuo mathuo merged commit 8c8f16f into master Apr 9, 2026
9 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.

1 participant