liamcain / obsidian-periodic-notes

Create/manage your daily, weekly, and monthly notes in Obsidian
MIT License
941 stars 61 forks source link

Icon doesn't maintain its position in the ribbon #200

Closed geewiz closed 2 weeks ago

geewiz commented 11 months ago

The plugin's icon is currently displayed at the bottom of my sidebar ribbon. When I move the icon within the ribbon and restart Obsidian, it's at the bottom again. Any other icon maintains its position where ever I put it.

I'm using Obsidian 1.4.14 and Periodic Notes 0.0.17.

lzilioli commented 9 months ago

I am experiencing this as well. Very annoying.

natattack99 commented 8 months ago

It also does this if you disable the ribbon from within settings (appearance -> interface -> ribbon menu)

itsonlyjames commented 1 month ago

Noticed this issue myself too, it's the way the ribbon icon items get added via onLayoutReady and onSettingsChange. They always get appended to the list, rather than being added once, and not changed or reinstated. I'm going to attempt to fix myself because it's super frustrating. If I succeed, I'll let you know.

Worth noting, this issue exists in both mobile and desktop, I only noticed it through the mobile ribbon.

itsonlyjames commented 1 month ago

You're not gonna believe this... easiest fix ever once I figured it out

I moved two lines of code...

image

Problem solved. Trouble now is, how we get this out to users. This project is seeimngly abandoned and no PR has been merged since 2022... I don't know how to go about this. Obviously for me it's fixed, but for everyone else you'll need to either manually mimic this fix, or we can somehow adopt this plugin so as to provide this fix for the 314,465 other users...

To fix it, go into .obsidian/plugins/periodic-notes/main.js and move the code like in the screenshot.