Morikko / sync-tab-groups

Sync Tab Groups is an easy way to manage all your tabs. You organize them depending on a topic by group. Groups can be closed and reopend without caring about your session. Moreover, you can esily search, active, move, save and remove your groups and tabs.
MIT License
146 stars 18 forks source link

Feature request: Support for Tree Style Tab #26

Open cosmicdan opened 6 years ago

cosmicdan commented 6 years ago

Hi,

Only thing missing for me about this extension is that it isn't aware of Tree Style Tab's nesting levels. When restoring a tab group, all the tabs are flattened. Compatibility for it would be great - it's literally the only thing keeping me from migrating to Quantum.

The addon "Tab Session Manager" supports Tree Style Tab, but Sync Tab Groups is the better addon by far. If you need an idea of how to do this, this commit seems to the one that adds Tree Style Tab support - https://github.com/sienori/Tab-Session-Manager/commit/fcb68d5d18512aba2ba1f795a470f5117875d7da (but there may be more, I can't really tell).

Morikko commented 6 years ago

I don't use the extension so I haven't done a deep test.

Just use it and come back if a behavior is not working well. I will see if I will fix it.

cosmicdan commented 6 years ago

Hey there,

Sorry to say that it does have issues.

First I noticed odd nesting behavior but this was remedied once I disabled the option to "Auto-group tabs opened within X msecs" in Tree Style Tab (just mentioning here for your reference, I doubt there's anything that can be done about this). But now I have a new problem that I can't figure out.

This is an example of how my tab tree starts out...

01

...if I close Firefox and re-open, it's preserved OK. But if I then switch to a different tab group, then back again, this is how the tabs look:

02

I have confirmed that this is a bug in the latest Tree Style Tab update 2.4.0 - reverting to 2.3.0 has fixed it.

I have opened an issue to Tree Style Tab too, pleading that you two can work on compatibility since these two addons are a killer combo. I've seriously no idea how anybody has not yet made this compatibility request before.... maybe all the former powerusers have permanently jumped ship to Waterfox....?

But I digress. TST request is here: https://github.com/piroor/treestyletab/issues/1662

Morikko commented 6 years ago

Yes, you will have to disable the option for compatibility. At least, while I have to close/open tabs and I can't let them open (show/hide).

I saw that #1662 was updated, does it solve the problem ?

Thanks for your support :)

cosmicdan commented 6 years ago

Not yet I'm afraid :( reverted back to 2.3.0 again. Suppose it will need to be fixed on the TST addon end.

Thanks again for the extension! I've actually grown to like it more than the ol' clunky Session Manager addon.

cosmicdan commented 6 years ago

Seems to have gotten worse lately, even though I've held-back TST addon. With a reloaded session, collapsing a tree causes random other unrealted tabs to "collapse" (disapear) with it - tabs that aren't even within proximity of the tree tab I'm collapsing (and have multiple tabs between them).

Essentially, the behavior is wildly unpredictable. It might be wise to revert the rudimentary support for TST for now, until if or when you have a chance to take a closer look at it.

Until then, I'll either be using completely seperate Firefox profiles or going back to Waterfox. Regardless, this issue is still a useful entry for posterity.

Morikko commented 6 years ago

I haven't check since as I am focusing on other features. I will check again my code to see if parent Id is well kept.

Morikko commented 6 years ago

Hi @piroor I am well in Case 2 bullet 2.

Actually, since v0.5 I opened my tabs first and next updated the openerTabId (I was waiting to have the full cross reference between old and new ids).

I changed my code to add the openerTabId at the opening stage. It implies that the parentId tab should be opened before the children. For most of the cases it works fine as I open my tabs in the same order the user let them when it closed the groups.

However, since v0.5 also I am first opening the active tab and then the other ones (before and after). I did this choice for 2 obvious reasons. Firstly, the user wants this tab so it should be loaded first. And secondly, as other tabs are "discarded", it avoid to load more than one tab at opening.

So, TST will work again (v0.6.3) except for the active tab. Note: I update the active tab with the openerTabId once all the tabs have been opened. But TST doesn't take this in account

From thread on Tree Style Tab repo. This issue is partially solved (due to the active tab). I have no idea how to fix this. So, it will stay like this from now.

cosmicdan commented 6 years ago

Darn, so close to being perfect! Sorry to sound ungrateful but I think I will still stick with legacy Waterfox and Session Manager for now. I had a play though.

What are the chances of you adding an option to force load tabs sequentially? Or "skip loading active tab first", maybe under an Advanced/Compatibility section down the bottom of settings (relatively hidden)? I mean, if it isn't skipping cache and loading in "Discarded" mode, it should load all the tabs and their tree practically instantly anyway I think - at least legacy Firefox (Waterfox) with Session Manager it does, even ~50 tabs (animations is TST disabled, of course).

Thanks so much for the work so far, though. Sync Tab Groups is coming along really nicely as a modern session manager replacement.

Morikko commented 6 years ago

Actually, I focusing more on #64 that will also avoid to close tabs and thus lost TST information. Opening tabs sequentially might be a solution soon. Although, I need to rewrite part of my code before to make it easier to work with.

Also, I asked for a feature request to update the tree when the parentId is updated.