Treestyletab: Tree structure of tabs not restored when opening "Bookmark all tabs/this tree" folder

Created on 1 Dec 2017  路  8Comments  路  Source: piroor/treestyletab


When the option "Bookmark all tabs" or "Bookmark this tree" is selected, and a bookmarks folder is created by TST and then all tabs are opened in a new window or in new tabs at a later time, the tab tree structure is not persistent and all of the bookmarked tabs reside on the default level-0 tab depth.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Bookmark a small tab tree or all tabs demonstrating multiple tree levels
  4. Either select "Open All in Tabs" or [SHIFT+Left-Click] to open the bookmarked tabs

Expected result

The structure of the tab tree(s) would look the same after being opened from a bookmark folder created from "Bookmark all tab/this tree" as was before.
e.g.:
A
- B
-- C
When bookmarked and stored in a folder should produce the same 3 level deep tree when opened all at once.

Actual result

The structure of the tab tree(s) is not persistent and each tab loses its individual depth and place in a tree (all tabs that were bookmarked are opened to the default level-0 depth).
e.g.:
A
- B
-- C
Results in the following tree when the tabs bookmark folder is opened:
A
B
C

Environment

  • Platform (OS): Windows 7, 64-bit
  • Version of Firefox: 57.0.1 (64-bit)
  • Version (or revision) of Tree Style Tab: 2.3.0
fixed workaround exists

Most helpful comment

This is impossible on WebExtensions due to missing API to store arbitrary metadata to bookmarks. I filed a feature request in a past day but it was rejected: https://bugzilla.mozilla.org/show_bug.cgi?id=1271567 However my old proposal was tied to Firefox's existing "annotation" feature, so I think we should file a renewed proposal based on more abstract idea.

All 8 comments

This is impossible on WebExtensions due to missing API to store arbitrary metadata to bookmarks. I filed a feature request in a past day but it was rejected: https://bugzilla.mozilla.org/show_bug.cgi?id=1271567 However my old proposal was tied to Firefox's existing "annotation" feature, so I think we should file a renewed proposal based on more abstract idea.

What if you used the title to indicate tree-depth? (I believe the API allows access to the title?)

Something like:

Reddit Main page
> Reddit post comment page
>> Amazon product linked from comments
>>> Related amazon product
> Other reddit post comments
> Reddit messages

Obviously it's kinda hacky; you'd have to make sure to store them in order, but I believe order is determined simply by what time they're added? (unless the user reorganizes)

The only part that would slow that down as far as I can tell is that you'd have to implement a feature in your addon to open a bookmark folder manually, wouldn't be able to open directly from the bookmarks screen.

Though, was that modified proposal ever submitted?

@piroor I think this can be closed. I don't think this will even be addressed via bookmarks. This can be solved better by using a session manager like Tab Session Manager which obviously supports TST.

Prefixes for bookmark items to indicate tree structure looks effective. We can add extra context menu command for bookmarks like:

browser.menus.create({
  title: "Open As Tree",
  contexts: ["bookmark"]
});

So it looks possible to open tabs and restore tree structure based on these prefixes. I'll try to implement that.

@piroor does this accomplish the same thing? (I have not tried it) https://addons.mozilla.org/en-US/firefox/addon/bookmark-tree-for-tst/

"To restore trees from bookmarks you right click on a bookmark folder saved with this extension and click the "Restore Tree" item."

@irvinm Oh, you're right. I completely forgot that.

Because it is already done by Bookmark Tree for Tree Style Tab, I've decided to close this. BTW, I think I need to add links to such helper addons from TST's start page and options page.

Piroor,

First of all, I LOVE TST. I really can't live without it... and I've been using it for over a decade. So thanks!

You're right that BTTST handles Saving and Restoring tab tree structure already...which is great. But, I have an arugment why you should make TST "Bookmark Tree" do it also...

1) Installing a bunch of addons slows down Firefox

2) It just feels like it should be something native to TST in the first place. We all make the complicated tree structures for a reason. Opening those tabs again without that structure is confusing.

3) It would be super nice to be able to be able to restore the tab structure from Preview of TST Bookmarks Subpanel.. which is one of your addons.
-----Sure, we could switch to the bookmarks panel, restore then switch back to TST but.....

Maybe Lej77 (the dev of BTTST) would be willing to help you include their code natively in TST AND maintain that part of it whenever it needed to be updated? I'm thinking this route because it hopefully wouldn't really mean any more work for you. (beyond a shoutout to Lej77 saying that you were updating TST before you put out a new stable version of it)

I've changed my mind with the comment https://github.com/piroor/treestyletab/issues/1639#issuecomment-531693353 - I agree that it is unnatural: "Bookmark This Tree" doesn't store tree structure to bookmarks. TST's built-in feature just saves the level of the tree item as the number of prefix > in bookmark's title.

https://github.com/piroor/treestyletab/compare/15212d54887acda32db0cdcfe51f05d1431dd52c..03f0cfe0d650108ddce195154899af20461917c0

Was this page helpful?
0 / 5 - 0 ratings