Unbox icon indicating copy to clipboard operation
Unbox copied to clipboard

Tree Style Tab support

Open YfheA3r opened this issue 4 years ago • 11 comments

Problem Statement

Stashing tab doesn't keep the tree structure of the Tree Style Tab addon and tabs are unstashed on the root level. It would be very useful to have the structure saved and restored.

Preferred Solution(s)

Adding an option to keep the tree structure if TST is installed.

Alternative Solution(s)

Additional Context


Readers: If you are also interested in seeing this feature be developed, please vote for it by giving the ORIGINAL POST a thumbs-up using the :smiley: button. You are welcome to leave comments and discuss the feature request, but "Me too!" comments are not counted by the voting system.

YfheA3r avatar Nov 03 '20 15:11 YfheA3r

Hi, thanks for your request! Unfortunately, Firefox keeps extensions isolated from each other for security reasons, so I'm afraid it's not possible for Tab Stash to understand the structure of tree style tabs.

However, there is another issue, #14, asking for a similar tree structure for Tab Stash itself. It's not quite the same as what you're asking here, but I wanted to mention it in case it's something you might be interested in—you can subscribe to that issue to get updates.

Sorry I won't be able to help you with this!

josh-berry avatar Nov 06 '20 19:11 josh-berry

Thanks for the reply,

I've done some researches and I think that you can save and restore the openerTabId properties of tabs and TST should rearrange them, from what i understand this is what Tab Session Manager does to support TST. Maybe in this case to save the opener tab you can create some kind of structure using bookmarks folder.

YfheA3r avatar Nov 06 '20 20:11 YfheA3r

Oh, thanks, that's useful to know. I will look into this further when I get a chance.

josh-berry avatar Nov 06 '20 23:11 josh-berry

Also valid for the extension Sidebery ;) (which is really nice btw)

tennox avatar Jan 12 '22 00:01 tennox

Would also love to see this! :heart:

I use TST pretty heavily and was really excited to give your extension a shot! Will be keeping an eye on this thread :)

DrTexx avatar Apr 22 '22 03:04 DrTexx

OK, so I've done a little investigation, and unfortunately this isn't as simple as we all might expect for a couple reasons:

  1. Tab Stash doesn't always create new tabs when restoring things from the stash. It generally tries to keep stashed tabs open but hidden by default. So "opening" a tab from the stash is sometimes a "create" operation, but sometimes it's a "move and unhide" operation.
  2. Firefox doesn't tell extensions when a tab's openerTabId changes, presumably because it's never expected to change. There's just no event in the extension APIs an extension can listen for to learn when this happens.

Both of these things taken together mean that, when Tab Stash is restoring a tab, it's possible for truly new tabs to get grouped appropriately (because I can set their openerTabIds at tab creation time), but it's impossible for Tab Stash to move an existing tab (e.g. a hidden tab that's being restored) into the right place in the tree.

I actually did a little experiment with TST to test this out, and sure enough, it did not notice when I changed an openerTabId by hand—the tab stayed where it was in the tree. Moving the tab into the right position didn't help either.

To be honest, I'm reluctant to implement something that's likely to give inconsistent results, because I think it's going to be very confusing for everyone. ("Why did this tab go into the tree but that one didn't?") So I think we're at a little bit of a dead end here, but I'm open to other ideas.

josh-berry avatar Dec 03 '22 20:12 josh-berry

Not to dredge up an old issue, but I figure since it's still open, might as well give my input.

@josh-berry , would the issues you have here be ameliorated if users set the setting that controls whether tabs are hidden or fully unloaded to immediately unload the tab?

I'm checking out some potential solutions to my tab hoarding problems and your addon looks like a great option, I'm just not 100% ready to give up my tree style tabs / sidebery.

ipaqi avatar Apr 25 '23 08:04 ipaqi

Not to dredge up an old issue, but I figure since it's still open, might as well give my input.

@ipaqi Not at all; if it's open it's fair game! :)

@josh-berry , would the issues you have here be ameliorated if users set the setting that controls whether tabs are hidden or fully unloaded to immediately unload the tab?

The only option that would work here is "Close the tab immediately", because then opening a tab from Tab Stash would always create a new tab. Loaded/unloaded doesn't help here, because the tab still exists even if it's unloaded.

josh-berry avatar Apr 25 '23 16:04 josh-berry

Haha Idk that issue existed. I'm in a dilemma ship now, when Tab Session Manager accepted me to restore hierarchy tabs with TST, but it cannot store any history session of tab as Tab Stash did. But I'm still using your Tab Stash now because my golden-fish brain is too bad in short memory. Just hope the owner could take a look or make any collab to make extension more powerful when it would work well with TST

vuongtuha avatar May 10 '23 09:05 vuongtuha

There has been some major updates to Tree Style Tab.

Maybe take another look at this?

TFWol avatar Apr 14 '24 03:04 TFWol