obsidian-periodic-notes icon indicating copy to clipboard operation
obsidian-periodic-notes copied to clipboard

fix: configure ribbon all configuredGranularities

Open doug-w opened this issue 1 year ago • 2 comments

Addresses #230 previously only configuredGranularities[0] ribbon was being added, now a foreach over them is done.

doug-w avatar Oct 04 '24 02:10 doug-w

You could lose the if (configuredGranularities.length) { at line 129 as it's redundant following your changes.

More importantly though, I think this method of deleting and then re-adding the ribbon icons is incorrect. I realise it did that in the previous implementation, and hasn't been introduced with this change, but it would be a good idea not to perpetuate it.

One way this incorrectness manifests itself is that if you re-order the ribbon icon, e.g. move the daily note icon to the top, and then exit the app and come back in, it's moved back to where it was previously.

I'm not familiar enough with Obsidian plugins to know what the best practice would be for this, but it doesn't happen with other plugins so I assume there is one.

CiaranG avatar Jan 01 '25 11:01 CiaranG

Or maybe I'm wrong about the ribbon order, see #200

CiaranG avatar Jan 01 '25 11:01 CiaranG