hdykokd / obsidian-vertical-tabs-view

A plugin for Obsidian that provides a vertical tabs view
MIT License
29 stars 3 forks source link

【feature request】allow pinned tabs on top and rearranging tabs by dragging the tab #21

Closed Ravenclawer closed 1 year ago

Ravenclawer commented 1 year ago

For now, the pinned tabs are scattered around. To avoid accidentally closing the pinned tabs. It's nice to have an option to allow pinned tabs on top and rearranging tabs by dragging the tab

hdykokd commented 1 year ago

Yes, I am considering making it sortable, but I have a feeling the implementation might be challenging. State management would be required, which significantly increases the likelihood of introducing bugs. A major issue when sorting is whether or not to synchronize with the original tabs. I hardly ever use the split window, but it's annoying to have to consider this.

related: #13

For now, implementing an option 'allow pinned tabs on top' which is effective within the Vertical Tabs View might be desirable.

hdykokd commented 1 year ago

Creating a draggable UI with plain CSS and JavaScript is also a big hurdle. While it might be possible to introduce some sort of framework, it's not desirable for the size of the plugin's script to increase.

hdykokd commented 1 year ago

The issue of pinned tabs accidentally closing might be resolved by obsidian-advanced-close-tab (I've created). It might also be a good idea to implement an option to not display a close button for pinned tabs.

hdykokd commented 1 year ago

I'll work on #13

hdykokd commented 1 year ago

@Ravenclawer I've released the sorting feature in 1.2.0. Please give it a try!

Ravenclawer commented 1 year ago

Thank you for developing the plugin so fast, I have just tried it and the drag and drop is smooth. I also found that when there are too many tabs, and click on unpin button on a scrolled-down-positioned-pinned tab, the scroll position will reset to the top, I am not sure if this is a bug or just a default behavior.

Ravenclawer commented 1 year ago

This scroll position reset behavior is also observed on pinning a scroll-down-positioned tab on 2.0 version of the plugin

hdykokd commented 1 year ago

Thank you for feedback. I will investigate it.

hdykokd commented 1 year ago

@Ravenclawer I've released the fix in 2.0.1. Please check it out.

Ravenclawer commented 1 year ago

I have 20 tabs open, and it works perfectly