piroor / treestyletab

Tree Style Tab, Show tabs like a tree.
http://piro.sakura.ne.jp/xul/treestyletab/
Other
3.5k stars 278 forks source link

[Bug] Moving parent tab has unexpected(?) behaviour #3651

Open N1ftyB1z opened 2 days ago

N1ftyB1z commented 2 days ago

Abstract

Dragging a parent tab (not root parent) to move it promotes the First Child, when it should(?) Promote All Children.

Steps to reproduce

  1. Have tabs set up like so: a. (RootParent) a.i. (Parent, Child of RP) a.i.1 (Child) a.i.2 a.ii.
  2. Move a.i out of the tree.

Expected result

My desired behaviour for moving the parent tab (not root parent) out of the tree is for the children of that tab to all promote/outdent – the same behaviour as when deleting the tab. If this behaviour isn't a bug can it please be added as an option?

This is desired behaviour as it's a way to 'outdent' every tab below the selected parent tab (to get the parent tab on the same depth/level as the first child), without having to select all of the children manually then drag those tabs — Which is useful for putting a tree under a group (as a label for bookmarking, etc.) when the tree consists of 1 tab with lots of children, for instance, as the result of an initial google search and following many links in new tabs.

Actual result

Dragging a parent tab (not root parent) to move it promotes the First Child, when it seems as though it should promote Promote All Children based on the settings menu. This persists when trying different settings in the Tree Behaviour and Drag and Drop categories in the Options menu, such as setting 'Promote All Children to the parent level always' (I've attached my current settings for these categories below), as well as when disabling TST add-ons.

Drag & Drop options:

DragDrop

Tree Behaviour options:

TreeBehaviour

I'm not sure if this is a bug, or if i'm missing an option in the settings (it was a bit confusing what does what between the options in the Tree Behaviour and Drag and Drop categories, though I think I understand them now from looking into them).

This behaviour seems to contrast to the behaviour when deleting the tab, as well as the behaviours when moving or deleting a root parent tab:

Close Root Parent: (result as expected)

TSTCloseRootParent

Move Root Parent: (result as expected)

TSTMoveRootParent

Close Parent 2 / Sub-parent: (result as expected)

TSTCloseParent2

Move Parent 2 / Sub-parent: (unexpected result)

TSTMoveParent2_Unexpected

*'Feature' and 'Suspended' tabs should be in-line / same depth with each other.

Environment

piroor commented 1 day ago

Thanks, I've pushed a change to apply the chosen behavior on a solo tab drag-and-drop case.