Lej77 / bookmark-tree-for-tree-style-tab

9 stars 2 forks source link

Feature Request: Drag to Bookmarks Manager #3

Open atondwal opened 5 years ago

atondwal commented 5 years ago

Would be really nice if when I dragged a tree into the bookmarks manager, instead of just a list of tabs I got the tree structure

Lej77 commented 4 years ago

Tree Style Tab has its own support for bookmarking tabs with tree data since version 3.2.0. The change was introduced due to Tree Style Tab issue 1639. I wrote some about the format that it uses on the summary page of this extension and on this extension's option page.

Unfortunately while you can drag and drop the tabs from the sidebar to the bookmarks menu it won't save them with tree data. You could make this feature request directly to Tree Style Tab's author, Piroor, who is usually quite active and quick to respond to issues. He might reject the request but it could be worth a try.

Regarding implementing this feature in this extension I don't know if it is possible or how good an implementation could be. Until recently I don't think it could even be done. But Tree Style Tab v3.4.0 exposed some new addon APIs that probably could be used to implement something like this. Even so I don't think I will have the motivation or time to do it so Tree Style Tab's bookmark implementation is probably your best hope unless you want to implement it yourself.

atondwal commented 4 years ago

Thanks for the reply!

You're totally right: now that TST has built in "bookmark tree" support, I should an issue with TST itself for the drag-and-drop.

Playing around with it, looks like it works almost perfectly with this extension. The format migration works beautifully, but I find myself having to do a bunch of migration back-and-forth if I want to next TST-saved trees and subtrees of bookmark-folder-organized tabs. Perhaps, it would be nice if we could auto-detect the style per-folder instead of for the whole tree, but I haven't thought about the full implications.

Lej77 commented 4 years ago

Glad that it seems to be working! I don't quite understand your current problem. Do you mean that you have a folder with bookmarks saved using the title format (TST's data format) that also contains sub-folders that are saved using the separator or folder formats? Perhaps I could have a Auto Detect Mixed format that allowed sub-folders that were using different tree data formats. Don't know how hard that would be to implement actually but it should be possible.

atondwal commented 4 years ago

Yes, well, the opposite of that, I've got folders in which I've saved title-style saved tabs and I'd like to be able to operate on those (or at least clean them up somehow, e.g. by format converting to a "proper" format). Auto Detect Mixed would solve this problem handily!

(Sorry, for the delayed reply... the world seems to be on fire)

On Tue, Mar 31, 2020 at 9:32 AM Lej77 notifications@github.com wrote:

Glad that it seems to be working! I don't quite understand your current problem. Do you mean that you have a folder with bookmarks saved using the title format (TST's data format) that also contains sub-folders that are saved using the separator or folder formats? Perhaps I could have a Auto Detect Mixed format that allowed sub-folders that were using different tree data formats. Don't know how hard that would be to implement actually but it should be possible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Lej77/bookmark-tree-for-tree-style-tab/issues/3#issuecomment-606736658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTYCAKTV5PYG5L5QIABPLRKILIJANCNFSM4HSFLY7Q .

Lej77 commented 4 years ago

No worries about any delays! The extension can already convert title-style saved tabs to other formats. So is the problem that it doesn't work to convert multiple such folders at once? If so then do you want the converted bookmarks to be in a single folder or do you want to mirror the original folder structure?

atondwal commented 4 years ago

The latter: I have a folder with and existing tree structure, and I saved some trees into it using the "title" structure, and I'd like to combine this two structures.

Concretely, I think this just means that Auto Detect Mixed structure should detect structure at each folder, instead of once for the entire tree.

Well, that is, assuming that the outer structure is folder, but I don't see any way to nest mixed structures into any of the other formats (do you?)

On Mon, Apr 6, 2020, 06:48 Lej77 notifications@github.com wrote:

No worries about any delays, it doesn't really affect me! The extension can already convert title-style saved tabs to other formats. So is the problem that it doesn't work to convert multiple such folders at once? If so then do you want the converted bookmarks to be in a single folder or do you want to mirror the original folder structure?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Lej77/bookmark-tree-for-tree-style-tab/issues/3#issuecomment-609805477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTYCHLKV7IIZ4VIEQ2NFLRLHMRLANCNFSM4HSFLY7Q .

Lej77 commented 4 years ago

So, do you have several different format mixed in a single folder like this:

Folder
\- Separator
\- Bookmark (separator format) (parent)
\- Bookmark (separator format) (child)
\- Bookmark (separator format) (child)
\- Separator
\- Separator
\- Bookmark (title format) (parent)
\- > Bookmark (title format) (child)

Or do you have a folder with sub-folders that use different tree formats:

Folder
\- Folder
    \- Separator
    \- Bookmark (separator format) (parent)
    \- Bookmark (separator format) (child)
    \- Bookmark (separator format) (child)
    \- Separator
    \- Separator
\- Folder
    \- Bookmark (title format) (parent)
    \- > Bookmark (title format) (child)

Auto Detect Mixed format as I thought of it would correctly detect the second case but not the first. I could perhaps have a Mixed format that could be used for the first case. It would accept any parent-child indicator so that a separator would increase the tree level and then > prefixes would increase it even more.

atondwal commented 4 years ago

The second one: different formats in each subfolder. Bascially I just created them by being very sloppy about how I saved each tree, and then dragging them around to rearrange.

On Mon, Apr 6, 2020, 07:03 Lej77 notifications@github.com wrote:

So, do you have several different format mixed in a single folder like this:

Folder - Separator - Bookmark (separator format) (parent) - Bookmark (separator format) (child) - Bookmark (separator format) (child) - Separator - Separator - Bookmark (title format) (parent) - > Bookmark (title format) (child)

Or do you have a folder with sub-folders that use different tree formats:

Folder - Folder - Separator - Bookmark (separator format) (parent) - Bookmark (separator format) (child) - Bookmark (separator format) (child) - Separator - Separator - Folder - Bookmark (title format) (parent) - > Bookmark (title format) (child)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Lej77/bookmark-tree-for-tree-style-tab/issues/3#issuecomment-609814732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTYCFYQWGMEP2ACJ4Z3QTRLHOKNANCNFSM4HSFLY7Q .

Lej77 commented 4 years ago

Ahh, okay! And you want to convert all the sub-folders at the same time, instead of converting them one by one? You also want to keep the folder structure as it is and not flatten it? Did I understand everything correctly?

Lej77 commented 4 years ago

I think I could solve your problem by special casing bookmark folders that only contains sub-folders and no bookmarks. If the Change Bookmark Format or Restore Tree context menu items are used on such a folder then I could just re-apply the command for each sub-folder. This should be very simple to implement but still be quite powerful to use. For Change Bookmark Format context menu item I would of course also ensure that the migrated bookmarks were created in a single folder instead of several, as would happen if the user actually used the context menu item several times.

atondwal commented 4 years ago

Oops, thought I'd responded to this! That's not quite what I was thinking; Imagine if I had a bunch of tree saved in different formats, and I had one tree saved using the folder format. Then I can drag all these trees into the folder tree at some point, and it seems to me that the root nodes of those dragged trees should become siblings to all the other trees in that folder. Right now it seems like it works this way if both trees are saved in the folder-style, but I'd like to handle cases when I drag in a tree that's saved in a different format. Thanks!

Lej77 commented 4 years ago

Okay! Then I would probably need to implement some auto detection that scans each sub-folder separately, the Auto Detect Mixed format I proposed earlier. That could increase the risk of the wrong format being detected but hopefully that remains unlikely.