oxdc / obsidian-vertical-tabs

An Obsidian plugin that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.
MIT License
85 stars 0 forks source link

Unexpected behavior - new note appears in inactive folder group #49

Open Lotus49b opened 3 weeks ago

Lotus49b commented 3 weeks ago

I've noticed this at various times.

I open a new daily note (Friday) while I'm in the current folder/group (1). The daily note for Thursday is still open at this time (as seen in the top tab bar and in Vertical Tabs). The new daily note (Friday, created by Templater) then opens as expected, but instead of appearing in folder 1 (the active folder), it goes into folder 2 (inactive) instead.

Now I drag the new note to the correct folder (1)

image

oxdc commented 3 weeks ago

Thank you for providing the details. This, however, might be an issue with Obsidian because Vertical Tabs does not manage the creation of new tabs, the preferred location is automatically chosen by Obsidian.

The exact behavior is as follows:

While modifying the tab creation could cause more issues, Vertical Tabs will keep the current implementation. I'll close this issue right now. If you encounter related problems or need help, feel free to comment below.

Related FR: Click links/files to open in new tab by default

oxdc commented 3 weeks ago

A "New Tab" button is added to the end of each group! Just hover your mouse there! This will, to some degrees, solve your problem. Please update to v0.10.0 for testing.

oxdc commented 2 weeks ago

Hi @Lotus49b, I think I have figured a way out! See the demo video below.

At first, I'm working on note 2 in group A. Both notes in group A are pinned. The only available unpinned tab is note 3 in group B. So when I try to open note 4, note 3 get replaced and note 4 appears in group B, despite that group A is active. — This is Obsidian's original design, which causes your problem.

Then, I enabled a new feature called "Always open in new tab". After refocusing on note 2 in group A, this time, when I try to open note 4, it appears right after note 2 in the same group! — This is what you and many users expected.

https://github.com/user-attachments/assets/a706487a-9003-42ba-8855-dcd2af5cabf0

Lotus49b commented 2 weeks ago

That looks great! Look forward to this feature, thanks

oxdc commented 1 week ago

"Always open in new tab" should no longer break the Word Counter core plugin. This feature will be publicly available after some tests.

https://github.com/user-attachments/assets/e06e90e4-f927-4659-b085-866fc0a49982

https://github.com/user-attachments/assets/0b1cbc95-c015-4ed6-bff8-94b2f1abcd23

Now, I'm getting closer to the IDE-like tab management!

https://github.com/user-attachments/assets/a1f84d5a-a837-44ec-bb97-82e20d55f616