Closed ryanwwest closed 1 year ago
Do I understand you correctly, that you want 4 new commands. 2 for each side to go to the left/right tab inside the sidebar?
That's right, I haven't thought of anything more intuitive.
While the link I added also talks about additional commands to focus on each side pane (no matter which tabis currently active) or the main pane, that's probably outside the scope of this plugin.
Well, I don't think an extra command just to change focus on the sidebar is needed. I could implement it that way the switching command can be used to focus on either sidebar and on next call actually switch to left or right.
Are you saying if you have a ~go to next left sidebar tab
command, then the first invocation focuses on the pane, but doesn't actually switch it - and then the second invocation does advance the tab to the right?
That seems a bit confusing to me... but possibly. Do other programs have a similar behavior?
I guess another way to do it is use the same, existing next/previous commands for the main tab but have them apply to the active portion of the window. So have some sort of commands to move the focus between the main pane (or if there are multiple main panes open, between each of them), the left sidebar, and the right sidebar, and the next/previous tab commands apply to whatever the focus is currently on.
Hello @Vinzent03 and @ryanwwest
Trying to help here ....
Just to let you guys know that there is a plugin called Cycle in Sidebars maybe it will help you to achieve what you want π
I hope it helps :)
Thanks @FelipeRearden ! This is the same thing that I originally suggested and appears to work well. @Vinzent03 , I still think this FR (or the final variation of it I mentioned that uses the same hotkeys for cycle forwards/reverse in any pane, mains or left/right sidebar according to focus) could fit in well in the scope of the plugin and thus provide more value overall than that one. However, it's up to you since there's a good alternative now - just as fine if this is closed because a solution exists.
Actually, I just realized that @FelipeRearden opened a very similar varied FR of this on that other plugin: https://github.com/houcheng/obsidian-cycle-in-sidebar-plugin/issues/4, and another regarding moving focus to the sidebar: https://github.com/houcheng/obsidian-cycle-in-sidebar-plugin/issues/5. So he has pretty much my same thought process haha. I realized that you can already use the default Obsidian commands Focus on tab group above/below/to the left/to the right
to also move from the sidebar focus into the main focus, so we really just need a command to get into each sidebar (preferably, the Obsidian devs would just let these same commands also move us into sidebar focus).
So we need two commands to focus on either sidebar. To cycle in them, we could use the existing ones for the root tabs?
Yeah, what if we use the ones you already came up with to focus on whatever pane / sidebar pane is currently focused/active (like https://github.com/houcheng/obsidian-cycle-in-sidebar-plugin/issues/4)? Then the only thing left is a way to focus on left or right sidebar as focusing back on the main panes is already solved.
So we need two commands to focus on either sidebar. To cycle in them, we could use the existing ones for the root tabs?
Exactly @Vinzent03 !!!! What is missing to close the workflow is two commands:
1οΈβ£ focus on left sidebar
2οΈβ£ focus on right sidebar
Because we already have a way to focus on active note. What we dont have today is a way to focus on the sidebars.
Yeah, what if we use the ones you already came up with to focus on whatever pane / sidebar pane is currently focused/active (like https://github.com/houcheng/obsidian-cycle-in-sidebar-plugin/issues/4)? Then the only thing left is a way to focus on left or right sidebar as focusing back on the main panes is already solved.
100% agree with @ryanwwest comment :)
So do you want to use the commands provided by this plugin to cycle through the panes within the sidebar or the ones by Obsidian itself. Currently, the commands from this plugin only work with the root tabs. The ones from Obsidian itself already work within the sidebar.
So do you want to use the commands provided by this plugin to cycle through the panes within the sidebar or the ones by Obsidian itself. Currently, the commands from this plugin only work with the root tabs. The ones from Obsidian itself already work within the sidebar.
I have a solid opinion about this new feature but I am gonna wait for the @ryanwwest reply since he is the creator of the FR :)
Interesting, ctrl-tab
seems to work for moving sidepanes forward, but ctrl-shift-tab
doesn't move them in reverse (though it does for the root/main tabs). I image a future Obsidian update would fix this, but hard to say when. I'm not sure what option is better, interested to hear what @FelipeRearden thinks.
I'm not sure what option is better, interested to hear what @FelipeRearden thinks.
@Vinzent03 let me share my opinion about this ...
1οΈβ£ The pain point is that we can NOT cycle through the sidebars using the keyboard. 2οΈβ£ In my humble opinion doesn't make sense to cycle through PANES + SIDEBARS . We need a way to cycle ONLY through SIDEBARS and ONLY through PANES
Based on this have have these new features:
π» New Command Cycle through Left Sidebar
π» New Command Cycle through Right Sidebar
π BUT these new commands need to have a special feature !!!!!!!!!!!!
β While cycle through the sidebars it need to KEEP the focus on the sidebars instead of jump to the active note (app.commands.executeCommandById('editor:focus')
) every time we cycle inside the sidebar.
β in others words we need to focus on the active sidebar
while we are performing the cycle command
Let me know what you guys think about this and sorry again for step into the conversation π
What about using the existing commands for this case. So they cycle within the current split of the window. Meaning, if you are already in a sidebar, it cycles within that. If you are already in the main tabs, everything stays the same.
By the way, using Go to next tab
and Go to previous tab
from core Obsidian in the sidebar works great for me. Though, note that I'm on the latest Insider version.
What about using the existing commands for this case. So they cycle within the current split of the window. Meaning, if you are already in a sidebar, it cycles within that. If you are already in the main tabs, everything stays the same.
You are a legend @Vinzent03 π₯π₯π₯ spectacular idea to make the commands dynamic !!!! it's the best scenario :)
Please please please make sure that we don't lose the focus that already is in the sidebar while cycle πππ
By the way, using
Go to next tab
andGo to previous tab
from core Obsidian in the sidebar works great for me. Though, note that I'm on the latest Insider version.
Just to let you know ....
πΈ In the latest public release the commands doesn't show in command pallette WHEN the focus is on the sidebar .
β¬οΈThe yellow arrow shows that the focus is in the sidebar instead of the open note
Should be done now! :tada: There are now two new commands to focus on the sidebar. The option (by default enabled) to stay in the current split.
Should be done now! π There are now two new commands to focus on the sidebar. The option (by default enabled) to stay in the current split.
Hello @Vinzent03 and @ryanwwest !!!
I tested the new release and I wanna share some information with you :)
π» Obsidian Latest Public Release
β¨οΈ I tested on Desktop and Mobile (iPad with mouse and keyboard)
πΉ Screen record is on iPad but the behavior is the same on Desktop
1οΈβ£ Left Sidebar with 3 Core Plugins: File Explorer, Tags, Search and Starred
I tested two workflows:
π °οΈ Focus on Left Sidebar β From Active Note to Sidebar (open and/or closed)
π ±οΈ Cycle Through Panes β Cycle Between Sidebar items: File Explorer, Tags, Search and Starred
π I found a issue using the Search Core Plugin when the Search is Empty β it is NOT focusing on the search text field when the search is empty
πΉ Search Not empty
πΉ Search empty
β All good with File Explorer and Tags (Starred doesn't have keyboard navigation)
π» Settings
π Some typo is missing in the end :)
π Unfortunately I couldn't Cycle between the Items using any of the commands β Cycle Next Tab β Cycle Previous Tab β Cycle Right Tab β Cycle Left Tab
βΉοΈ On Desktop I got one Cycle from File Explorer to Tags but nothing more βΉοΈ On Mobile I got nothing
πMaybe this is an issue because I am on public release and you are on the new Beta ;
πI hope you could reproduce some items on your end π
Let me know if you need more tests . I am here to help !
Have a great day !
Thanks for the testing! I forgot to mention that you still need to enable the different view types. So basically call for every view type in the sidebar you want to cycle the "Enable this view type" command. I won't find the time to fix the search focus in the next days. So it will take just a bit more time.
I won't find the time to fix the search focus in the next days. So it will take just a bit more time.
No problem at all :) Thanks for let me know, I really appreciate :)
Thanks for the testing! I forgot to mention that you still need to enable the different view types. So basically call for every view type in the sidebar you want to cycle the "Enable this view type" command.
My bad, I should have thought about this before testing !!!!
This way, just to let you know about this feature on Desktop and Mobile
β It's working perfect on DESKTOP exactly that way that I always wanted to navigate through Sidebars
π It's NOT working on MOBILE unfortunately even after enable these different view types I was not able to cycle between the views on Sidebar . Same behavior when using the mobile emulator on Desktop :(
β I am talking about the behavior Mobile because I use Obsidian Mobile on iPadOS with mouse and keyboard as my main device
β Just to let you know if you wanna take a look in the future π
Lets keep talking @Vinzent03 and thank you very much for everything !!!!!
Should be fixed now :tada: Mobile sidebar works a bit differently...
Should be fixed now π Mobile sidebar works a bit differently...
Hello @Vinzent03 !!!!
Forgive me for my late reply :)
π °οΈ Focus on Search Text Field β Working Perfect on version 1.2.1 - Mobile and Desktop β
π °οΈ Cycle Through Sidebar Panes β Working Perfect on version 1.2.1 - Mobile and Desktop β
Thank you very much for the fix π
Running my tests, I found a new bug ONLY ON MOBILE ....
π The Command Focus on Left Sidebar
stopped working on version only for Mobile (and Desktop emulator)
β By this I mean 2 things:
1οΈβ£ I CANT set the focus from the Active Note to the Sidebar using the command the same way that I do on version 1.2.0
2οΈβ£ While I am cycle through the Sidebar, I dont have focus on the Sidebar. When I press the command Focus on Left Sidebar
after cycle I CANT get focus as well.
Sorry for bring more problems to you π
I wish you a fantastic day βοΈ
It would be awesome if this plugin could cycle not only through the main note panes, but also the left and right sidebar panes. See this FR that I made on Obsidian's Discourse: https://forum.obsidian.md/t/go-to-previous-next-sidebar-pane-and-focus-on-pane/57562. However, I don't expect that to be integrated soon so having it here instead (and hopefully being able to reuse a lot of the existing logic) would be awesome!