joelpt / sidewise

Persistent sidebar extension for Chrome featuring tree style tabs and tab hibernation.
Creative Commons Zero v1.0 Universal
68 stars 13 forks source link

Sync sort order with browser #38

Closed YodaEmbedding closed 11 years ago

YodaEmbedding commented 12 years ago

I expect the tabs in Chrome's "default tab manager" to be sorted along with the Sidewise tabs.

Try out Tabs Outlier and mess around with the tabs. You will see it handles the 'sort syncing' almost perfectly: https://chrome.google.com/webstore/detail/eggkanocgddhmamlbiijnphhppkpkmkl

The benefits include:

joelpt commented 12 years ago

Thanks for the tip to Tabs Outliner. I'm now working on implementing this.

One thing I don't greatly like about Tab Outliner's approach is that if you move a single tab around on Chrome's tabbar, you potentially break the tree structure within Tab Outliner (children tabs get auto promoted to be under the parent window node).

I'm currently tending towards the idea of preserving the tree structure in this way: when you move a tab on Chrome's tabbar, reorder that tab in Sidewise only within the branch that it currently exists within -- thus requiring the user to manually move a tab out from under its current parent within the treeview if that is what they want.

The downside to this approach (and likely why Tab Outliner does what it does) is that you can wind up with Chrome's tab-ordering no longer matching the exact order in the Sidewise tree. Similarly, if a moved tab has children in the tree, I would either need to automatically shift those children to "follow" the moving tab in Chrome's tabbar, or else just allow Chrome and Sidewise's ordering to become out of sync.

What do you think the best approach is?

Also you said Outliner handles sort syncing "almost" perfectly -- is there anything in particular you think it should do differently?

YodaEmbedding commented 12 years ago

One thing I don't greatly like about Tab Outliner's approach is that if you move a single tab around on Chrome's tabbar, you potentially break the tree structure within Tab Outliner (children tabs get auto promoted to be under the parent window node).

I don't think 'child-promotion' is too much of a problem.* The user will learn what happens pretty quickly, and will only move parent tabs within the browser whenever they wish to quickly promote the children. In fact, this might be a good thing -- the fact that Tree Style Tabs couldn't do this easily sort of annoyed me. Tab Outliner's approach works out nicely in practice.

Besides, this feature is nonexistent at the moment anyways. :P

I'm currently tending towards the idea of preserving the tree structure in this way: when you move a tab on Chrome's tabbar, reorder that tab in Sidewise only within the branch that it currently exists within -- thus requiring the user to manually move a tab out from under its current parent within the treeview if that is what they want.

If you still feel that the Tab Outliner method is flawed, you could try moving around all children tabs as quickly as possible. I've tried Tab Extract and Tab Plus, and it seems that tabs can be reordered almost instantaneously. Getting this working seems more difficult than the previous method, and seems to add unnecessary complexity. If you do do this, I suggest keeping it non-default/experimental.

The downside to this approach (and likely why Tab Outliner does what it does) is that you can wind up with Chrome's tab-ordering no longer matching the exact order in the Sidewise tree.

I wouldn't advise letting the tabs go out-of-sync, either, as now the user thinks it's a bug in Sidewise.

*Bringing that sentence out of context, human rights advocates wouldn't be too happy...

joelpt commented 12 years ago

That makes a lot of sense, thanks for the feedback. I'll update this when I'm finished implementing this.

joelpt commented 12 years ago

Making good progress on this, got about half the syncing cases working. I think I'll have this feature released in a week or less.

YodaEmbedding commented 12 years ago

Sounds great! Thanks for the update. :)

joelpt commented 12 years ago

Got this mostly working now. I'm now working through various edge cases.

joelpt commented 11 years ago

I believe I have this all working here now, but I'm going to wait a few days and make sure I didn't miss anything while I'm using the latest version for my normal daily browsing. This fix ended up requiring a few pretty fundamental changes in how Sidewise does its thing and I don't want to release such a significant change prematurely.

One nice side effect of this fix has been that Sidewise is generally smarter about putting tabs in the correct place in the tree initially, by using the tab index as a "hint".

joelpt commented 11 years ago

Planning to release this feature by the end of the month. Everything's working, but I still want to spend a few more days just to make sure I don't run into any missed problems, and also do a few experiments upgrading from the last released version to this one, since this change significantly alters how the page tree is ordered and stored. Want to make sure the upgrade works without a hitch.

You are right, Ctrl+Tab and smart-focus work much more cleanly now.