liamcain / obsidian-periodic-notes

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

Allow user-specified menu message from calendar icon in the ribbon #199

Open Gnossos opened 1 year ago

Gnossos commented 1 year ago

I'm designing a PKM system that has:

  1. A "Today.md" note as its main interface. Today.md resides in the vault's root directory, and I use the HomePage community plugin to point to it.
  2. On the other hand, the system uses the Periodic Notes plugin to keep "Daily" notes in "Documents/periodic_notes/Daily/[YYYY]/, with one note per day, and each one named "YYYY-MM-DD ddd.md" where, for example, the note for Oct. 7, 2023 is "2023-10-07 Sat.md".

The Periodic Notes plugin adds a calendar icon to the ribbon, and right-clicking it presents a context menu for notes for the current day, week, and month. (Curiously, the context menu has no entries for "quarter" or "year.") The menu item for the current day says, "Open today." But in my case it doesn't really point to the "Today" note in #1 above. Instead, it points to the Daily note described in #2 above. This shouldn't be.

A simple way to fix the problem is to use a consistent language throughout the context menu: Day, Week, Month, Quarter, Year, with the understanding that these signify the current Daily, Weekly, Monthly, Quarterly, and Yearly notes as specified in the Periodic Notes plugin's options for Format, Template, and Folder.

Perhaps equally simple, but more flexible, would be to add a fourth item for each period on the options page. This item would let the user specify the label used for the corresponding entry in the context menu. For example, instead of "Open today," I'd like to substitute "Open today's daily note." Someone else might prefer to change "Open this month" to "Open October 2023," where the menu item is specified as "Open ["MMMM YYYY"]". Etc. The daily note example is just different text, but the month example involves a symbolic representation. So the month example is more complicated than just substituting a different menu item.

Nonetheless, since whole point of context menus and the like is to make the choices easier to make and be user-friendly, IMHO fixing this small glitch is warranted.