Open samaellain opened 3 months ago
It's also loading icons in the ribbon that were previously disabled.
I have updated in v1.0.5 to always load plugins in alphabetical order (with a short staggered delay between loading to give it the best chance to always be the same order).
To truly solve what you're asking for, there would need to be a setting in the plugin to choose the loading order. Obsidian doesn't have any UX components for reordering a list built in, so it would need to be created which would add additional complexity and loading time to the Lazy plugin. I will consider it, but no promises.
Another option would be to use an existing plugin like https://github.com/Opisek/obsidian-statusbar-organizer , and have that load as a long delay after your other plugins.
Hey @alangrainger
the order and visibility of the icons in the ribbon are saved by obsidian in workspace.json.
Something like:
"left-ribbon": { "hiddenItems": { "homepage:Open homepage": false, "switcher:Open quick switcher": true, "graph:Open graph view": false, "canvas:Create new canvas": true, "daily-notes:Open today's daily note": false, "command-palette:Open command palette": false, "obsidian-read-it-later:ReadItLater: Save clipboard": false, "obsidian42-brat:BRAT": false, "obsidian-local-images-plus:Local Images Plus 0.15.9\r\nLocalize attachments (plugin folder)": false, "templater-obsidian:Templater": false, "obsidian-projects:Open projects": false, "cmdr:Open settings": false }
Can the plugin somehow read this configuration and use it to solve this problem? If possible, this would also solve the problem that @LemurTech reported about hidden icons reappearing.
I think my issue was that the Workspaces plugin had somehow gotten disabled--which is odd because I always leave it enabled. But that is fixed now.
I'll leave this issue open as if there's enough interest I will make a companion plugin to Lazy Loader.
It's very simple - the companion plugin would have a settings page with a draggable list of plugins so you can re-order them however you like.
Then it would hook into the plugin enabled event and rearrange the icons to your specified order whenever any plugin loads.
@alangrainger, do you know of a reasonable solution for the issue of ribbon plugins getting loaded after the Workspaces core plugin has loaded? Workspaces will apply icon visibility preferences, but then it just gets wiped out as the Lazy Loader does its thing. I end up having to reapply my Workspace setting if I then want to get rid of all those extra icons. Of course, I could just sacrifice having the ribbon and wean myself away from it, but I do use it at present.
@LemurTech Sorry, no workaround for that yet. That core plugin is not designed to listen for other plugin changes and then update its icons.
It will require a companion plugin to Lazy Loader which I mention here: https://github.com/alangrainger/obsidian-lazy-plugins/issues/2#issuecomment-2288334961
So this is something I noticed with the original FastStart.js as the sidebar ribbon would get jumbled as things load, one way I fixed it was with a custom CSS snippet. It's a lot more "manual" of a way to set it up, but you might get some ideas. Very lightweight as it uses normal CSS to reorder them. Doing it this way allows you assign the desired order and if a plugin loads later than others, it automatically slots into the proper position.
As a side note for anyone using this, I would recommend doing orders of 10 (e.g. 10, 20, 30) instead of the 1,2,3 I have. It allows you to easily slot a plugin in without having to renumber everything (so if you want one between 2 & 3, you could just do 21).
See below:
/* Sidebar Ribbon Order of Display Overrides */
/* Daily Note Carrot */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open today's obligator note"] {
order: 0;
}
/* Omnisearch */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Omnisearch"] {
order: 1;
}
/* Open graph view */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open graph view"] {
order: 2;
}
/* Create new canvas */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Create new canvas"] {
order: 3;
}
/* Insert Template */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Insert template"] {
order: 3;
}
/* Open command palette */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open command palette"] {
order: 4;
}
/* New encrypted note */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="New encrypted note"] {
order: 5;
}
/* Encrypt/Decrypt */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Encrypt/Decrypt"] {
order: 6;
}
/* Templater */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Templater"] {
order: 7;
}
/* Show hidden folders */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Show hidden folders"] {
order: 8;
}
/* Replicate */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Replicate"] {
order: 9;
}
/* Show log */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Show log"] {
order: 10;
}
/* Show log */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action {
order: 100;
}
/* Sidebar Ribbon -> Hide Element Overrides */
/* Manage workspace layouts, Open Daily Note Editor, Open in Headings Mode, Open Symbols for active editor, Toggle custom sorting, Open Markdown Table Editor */
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Manage workspace layouts"],
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open Daily Note Editor"],
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open in Headings Mode"],
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open Symbols for active editor"],
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Toggle custom sorting"],
.side-dock-actions div.clickable-icon.side-dock-ribbon-action[aria-label="Open Markdown Table Editor"] {
display: none !important;
}```
@alangrainger adds:
If there's enough interest I will make a companion plugin to Lazy Loader. It's pretty simple - the companion plugin would have a settings page with a draggable list of plugins so you can re-order them however you like.
Then it would hook into the plugin enabled event and rearrange the icons to your specified order whenever any plugin loads.
Original post:
Expected Behavior
The plugins that were set to be delayed should retain the order in the ribbon.
Actual Behavior
The plugins set to be delayed are placed in random order.
Steps to Reproduce
Additional Information
Obsidian place the icons in the ribbon at the moment the plugin is enabled, I'm not sure if there's a way to work around this and retain the custom order.