piroor / treestyletab

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

[Enhancement] Automatically ungroup tabs when closing expanded tab group #3587

Closed sersorrel closed 2 months ago

sersorrel commented 3 months ago

Abstract

At the moment, if you choose "When a parent tab with Expanded Tree is closed/moved, Replace closed/moved parent with a Group Tab", then closing a group tab just causes it to instantly open again i.e. it effectively does nothing. It would be useful, I think, if that would instead perform the "ungroup tabs" action to remove the group tab from the hierarchy,

Steps to see the situation

  1. Start Firefox with clean profile.

  2. Install TST.

  3. Under "When a parent tab is Closed or Moved", select "Recommended preset using Consistent Tab Behaviors controlled under TST" -> "When a parent tab with Expanded Tree is closed/moved, Replace closed/moved parent with a Group Tab"

  4. Open 2+ child tabs of a parent tab:

    Parent
    |- Child 1
    |- Child 2
  5. Close the parent tab:

    Group
    |- Child 1
    |- Child 2
  6. Close the newly-created group tab:

    Group
    |- Child 1
    |- Child 2
  7. The group tab reopened itself!

Expected result

I think you should end up with a structure like this:

Child 1
Child 2

Actual (present) result

You actually end up with a structure like this:

Group
|- Child 1
|- Child 2

Environment

piroor commented 3 months ago

OK, done with the commit b60a592 and b5fe6d6. Setting a new secret option closeParentBehavior_replaceWithGroup_thresholdToPrevent to a negative value (like -1) will take back the old behavior.

github-actions[bot] commented 2 months ago

This issue has been closed due to no response within 14 days after labeled as "fixed", 7 days after last reopened, and 7 days after last commented.