obsidian-commander
obsidian-commander copied to clipboard
Add example on how to reorder
The plugin description mentions reordering of items but I am unable to find such feature.
Specifically I would like to reorder item in left ribbon side menu.
Hey @Schallabajzr thanks for the feedback! You can reorder commands in the plugin settings menu with the arrows circled in the image above. The order of the list in the plugin setting menu is the same order that appears in the left ribbon. I will update the readme to make this clear and possibly in the future we can reorder with drag and drop from the menus themselves. If you have any other questions or comments don't hesitate to share :D
I see. If I understand correctly it is possible to reorder commands added with the plugin, but is there a way to reorder/mix with buttons from other sources (the ones shown under hide other commands)?
I see. If I understand correctly it is possible to reorder commands added with the plugin, but is there a way to reorder/mix with buttons from other sources (the ones shown under hide other commands)?
The way to achieve this at the moment would be to hide the command ('Open Graph View' for example) then add the Open Graph View command again with our plugin so that you can then re order it with our plugin settings menu. Let me know if that makes sense. There may be another way to solve this problem from the design side and I will take note to look into it.
I see. If I understand correctly it is possible to reorder commands added with the plugin, but is there a way to reorder/mix with buttons from other sources (the ones shown under hide other commands)?
The way to achieve this at the moment would be to hide the command ('Open Graph View' for example) then add the Open Graph View command again with our plugin so that you can then re order it with our plugin settings menu. Let me know if that makes sense. There may be another way to solve this problem from the design side and I will take note to look into it.
Yes it makes sense. I found this repo coming from a deprecated plugin https://github.com/phibr0/obsidian-customizable-sidebar specifically for the reorder feature and I think it fits with the theme of this plugin.
One thing that might be worth noting is that if you name the command exactly the same as the core/plugin command button you're replacing when you hide the core/plugin command it will also hide the new one. Not a big deal, just slightly confusing.
I also noticed that not all (plugin) commands seem to have icons associated with them, BRAT picks up the existing icon fine but I had to use a generic one for Templater.
For anyone willing to sort other plugin buttons in left ribbon without having to recreate those in Commander I am sharing my CSS snippet for this:
.side-dock-ribbon-action[aria-label="Open today"] {
order: -999; /* Pushes icon to the top */
border-bottom: 1px solid #6c7384; /* Separator */
border-radius: 0px;
padding-bottom: 10px;
}
.side-dock-ribbon-action[aria-label="Omnisearch"] {
order: -990;
}
.side-dock-ribbon-action[aria-label="Add new command"] {
order: 999; /* Pushes icon to the bottom */
}
This works great for me. I used this instead of recreating buttons in Commander, because I wanted to preserve context menu on "Open today" button, that allows me to use "Open this week" and "Open this month" commands from the same button.