Skip to content

Conversation

@Victor239
Copy link
Contributor

Implements #2175: Users can now configure where tabs land when dragged to a panel.

Changes

New setting: moveTabToPanel in Drag and Drop settings

  • Options: 'start' | 'end' (default: 'end')
  • Controls tab placement when dropped to panel area (not between specific tabs)

Modified getDstIndexInside() logic:

// Before: always used nextTabIndex (end of panel)
return dstPanel.nextTabIndex ?? Tabs.list.length

// After: respects user preference
return Settings.state.moveTabToPanel === 'start'
  ? dstPanel.startTabIndex
  : (dstPanel.nextTabIndex ?? Tabs.list.length)

Files changed:

  • src/types/settings.ts - Type definition
  • src/defaults/settings.ts - Default value and options
  • src/page.setup/components/settings.dnd.vue - UI control
  • src/_locales/dict.setup-page.ts - i18n (9 languages)
  • src/services/drag-and-drop.actions.ts - Drop logic

Precise positioning (dropping between specific tabs or onto parents) is unaffected.

@mbnuqw
Copy link
Owner

mbnuqw commented Dec 7, 2025

Thanks

@mbnuqw mbnuqw merged commit 752a402 into mbnuqw:v5 Dec 7, 2025
2 checks passed
@Victor239 Victor239 deleted the drag-and-drop-panel branch December 7, 2025 20:30
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