Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Tree Style Tab #43

Open
3d73a4a412 opened this issue May 15, 2018 · 8 comments
Open

Add support for Tree Style Tab #43

3d73a4a412 opened this issue May 15, 2018 · 8 comments

Comments

@3d73a4a412
Copy link

First, great addon, thank you so much for being a viable alternative to the venerable session manager.
Second, I wanted to "second" some of the items you already have on your todo list:

Full save support for pinned tabs - YES!
Support Firefox containers - YES
Better support for multi-windows sessions
    Option to merge windows when saving - Would be nice
Improved configuration for auto-saving
    Rolling buffer instead of overwriting the same session slot
Improved active-session management
    Drag and drop to organize tabs (order, move to a new window) - Would be nice
    Merge widows using drag-n-drop
    Automatically discard tabs after a certain time (should be configurable)

I would like to request something that has been critical for me and so far no sesison managers handle it cleanly, support for Tree Style's trees. That is if I have a few tabs stacked in a "tree", I was able to restore that tree (without extraneous new tabs appearing which one of the session managers that kind of remembers a tree structure does) with Session manager. One of the things I love about your addon is it uses bookmarks so is easier to manage and much more portable so I am really really really hoping that tree style integration can be done.

@ReDEnergy
Copy link
Owner

Hi, thanks for feedback.
How do you actually stack tabs in tree style? Are you using Tree Style Tab ?
From what I know Firefox itself does not support the concept of tree tabs. The only think you can know is which tab opened a certain tab. This can provide you the information required to recreate the tree structure but from this point all features and behaviors are simply implemented by the developer.

What that means... well if I try to provide this feature, I won't be able to know any change that another addon does to his own tree structure representation. The only way this might work is only if I provide a full featured tree style tab implementation inside my addon and you will only use that one for various operations such as (reorganizing the tree)

So basically... I might be able to do that, I can't know for sure how hard is for me to implement
It does create a few issues:

  • how session should be restored (or even displayed)
  • how exactly to keep the tree structure in bookmarks since they don't provide any kind of additional storage
    • here I might use sync storage but for sure that's not something that will be kept once you remove the addon (the same problem I have with pinned tabs and containers)
    • use the actual bookmark url or title to provide this feature (synced and always there but your bookmarks might look weird)
  • there's simply no way of working with another addon
  • if you change the tree structure inside the Tab Tree Style for example I won't be able to detect that

@krakentoa
Copy link

krakentoa commented Jul 17, 2018

Tab session manager ( https://github.com/sienori/Tab-Session-Manager ) is an addon that is compatible with Tree Style Tabs ( https://github.com/piroor/treestyletab ). However it does not sync across devices.
The API seems simple when saving bookmarks...
https://piro.sakura.ne.jp/xul/_treestyletab.html.en#api-bookmarks
There is some discussion of how TST restores state here : piroor/treestyletab#1662 (comment)
It appears it would be sufficient to restore/save the field openerID (i.e. an id for the parent of the tab in the tree) on each tab, and reopen the tabs by order (which will open parents before children).
Opening by order seems to be more problematic, since apparently there is a configurable delay so that TST can catch up. Here's a bit of code from TSM:
https://github.com/sienori/Tab-Session-Manager/blob/e4a4aaf5ab5b0136d357222f828c7c6ad2a446f2/Tab-Session-Manager/background/open.js#L178

let openDelay = 0;
    if (S.get().ifSupportTst) {
      if (BrowserVersion >= 57) createOption.openerTabId = tabList[property.openerTabId];
      openDelay = S.get().tstDelay;
}

@ReDEnergy ReDEnergy changed the title Feature request plus current requests Add support for Tree Style Tab Jul 17, 2018
@ReDEnergy
Copy link
Owner

Mmm... thanks for pointing out all those resources.
As for the request to support Tree Style Tab... as long as the addon knows this information just from how I open the tabs then this should be fairly straight-forward I would say (in reality nothing is that simple) but I think that it should be possible.
I will try to have this in mind and investigate how TST works exactly. I might be able to prototype something and if it works I will definitely add the feature. (Can't really promise right now when I will do that but I might be able to test the idea this week)

@TehCorwiz
Copy link

Hi @ReDEnergy! I wanted to thank you for making this extension.

I wish I had more to add, but I really just came here explicitly to request this feature. 😅

As an aside, I was reading through the reviews on the Firefox extension page while deciding which extension to use and I was impressed with how you responded to questions and problems. In fact, it's what made me choose this one above the others. Keep being awesome. 🥇

@ReDEnergy
Copy link
Owner

@TehCorwiz Thanks for using the addon.
As regarding the request, I feel pretty bad when I see how times goes on (so fast) and so many features I want to add are still missing. I would love to have this implemented but sincerely I have no idea when I will be able to do so. I would say there are a few others that have been waiting for far longer and have a higher priority. At the same I do really hope to have a little more time in the near feature since the last few months were packed 150% for me and had little time to invest into the addon.

@TehCorwiz
Copy link

@ReDEnergy I've been there and completely understand. No worries at all. I have the utmost respect for people who volunteer their time or release their own tools. If I get some time maybe I'll hack on it myself. Are you open to PRs if someone else were to get it working?

@ReDEnergy
Copy link
Owner

PRs are welcomed. Of course, that being said, I wouldn't say that the code is really hard to read, but when you don't have comments, the 20K of vanilla JavaScript with HTML purely generated from JavaScript and half of the DOM in position absolute can get pretty complicated :). Of course, If you ask me, I had to do all this in order to achieve the target performance as well as to implement all the features that the addon does right now.

@lesar
Copy link

lesar commented Oct 29, 2021

Me too use "Tab session manager" integration on "Tree Style Tab" and they work great together.
"Tree Style Tab" help to divide a problem in sub problem or show manual index page and show all opened sub page, ...
I like the idea behind SessionSync and it will be wonderful if SessionSync can be work together "Tree Style Tab"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants