obsidian-slash-commander icon indicating copy to clipboard operation
obsidian-slash-commander copied to clipboard

[Feature Request] Add Support for Sub Menus

Open FelipeRearden opened this issue 1 year ago • 6 comments

Hello @alephpiece !!!!!!

This FR is about adding a new feature for power users like me :) SUB MENUS !!!!

By SUB MENUS I mean adding a way to stack commands inside a something like a folder

Example: Imagine that I have these 5 commands in Slash Commander

┏━━━Command 1 ┣━━━Command 2 ┣━━━Command 3 ┣━━━Command 4 ┗━━━Command 5

My FR is about create a submenu where I can stack Command 2 and Command 3 for example

┏━━━Command 1 ┣━━━SUBMENU A ┣━━━Command 4 ┗━━━Command 5

Like this…

┏━━━Command 1 ┣┳ ━ ━SUBMENU A ┃ ┣━━ Command 2 ┃ ┗━━ Command 3 ┣━━━Command 4 ┗━━━Command 5

To give a UI example, it looks like the image that you shared with me here for the Format Submenu .

It the same approach applied to Slash Commanders: an icon with title that opens a menu with a bunch of Slash Commanders inside :)


Let me know if you need more information !!!

Have a great day!!!

FelipeRearden avatar Dec 22 '23 13:12 FelipeRearden

Great idea! I was considering some sort of command group for a while. But I failed to come up with a convincing use case to put me into this feature. I thought the fuzzy search capability just worked well for a bunch of commands. May I ask how you want to use this feature?

alephpiece avatar Dec 22 '23 17:12 alephpiece

Great idea!

Thanks @alephpiece !!!!

I was considering some sort of command group for a while. But I failed to come up with a convincing use case to put me into this feature. I thought the fuzzy search capability just worked well for a bunch of commands. May I ask how you want to use this feature?

The main idea is to stack commands that are related in a stack to avoid a big context menu and have a fast keyboard navigation.

Let me share one workflow that I will use this feature 🙏

I have a large note and I need to search a lot when creating/editing notes.

I have 5 commands related to search 1️⃣ Vault Search: I use a URI command to get the search my entire vault using the selection as a input 2️⃣ In File Search using the command In File Search from Another Quick Switcher Plugin 3️⃣ Find and Replace using the core obsidian command 4️⃣ Vault Search using Float Search plugin when I need navigate in the note that I am searching to see the content around the search 5️⃣ I use the Pluign Wikipedia Search when I need to understand the context about a person/model that is selected in the active note

Based on this, my idea is to have a Sub-Menu Search

IMG_1132


Let me know if you need more information. I am happy to share :)

FelipeRearden avatar Dec 22 '23 17:12 FelipeRearden

Where do you expect the sub commands to show, inside the editor suggester or as a popover just like the right-click menu?

alephpiece avatar Dec 23 '23 04:12 alephpiece

Where do you expect the sub commands to show, inside the editor suggester or as a popover just like the right-click menu?

In my humble opinion as a popover just like the right-click menu is best option because it will keep the UI small when having many commands.

FelipeRearden avatar Dec 23 '23 04:12 FelipeRearden

In this way, a fuzzy search may be limited to the 1st-level commands, not including the sub commands. It that OK?

alephpiece avatar Dec 23 '23 14:12 alephpiece

In this way, a fuzzy search may be limited to the 1st-level commands, not including the sub commands. It that OK?

It is perfect ! 100% agree :)

FelipeRearden avatar Dec 23 '23 14:12 FelipeRearden