cheatset icon indicating copy to clipboard operation
cheatset copied to clipboard

Allow Multiple Notes Entries On Every Cheatsheet Level

Open Robert-M-Muench opened this issue 4 years ago • 5 comments

1..N top-level notes 1..N category notes 1..N entry notes

Robert-M-Muench avatar Jan 08 '20 10:01 Robert-M-Muench

I see I can have multiple td_notes on an entry but just a single notes (a later one overrides the former)

holyjak avatar Sep 20 '21 11:09 holyjak

How would multiple notes be handled? Where would they appear? What would the HTML output to?

Kapeli avatar Sep 22 '21 10:09 Kapeli

After havingread these current docs:

td_notes (under entry) - just like notes, but multiple ones are added in a separate column (as opposed to a separate row)

I assumed that notes adds a separate row inside the entry. If I understand it correctly, now an Entry is implemented as a <tr> inside a table, with the first and only TD holding the <div class="name"> and <div class="notes">. One could argue that additional notes could be simply appended to the content inside that div.

It could be also argued that this is unnecessary complexity and work for you and if I want to have mutliple notes, I can concatenate the content manually and put it inside a single note. If you decide for this way, it would be nice to add an error checking and fail with a clear message ("only a single notes allowed) instead of silently overriding any previous notes on the same entry. Also clarifying the docs would be nice:

td_notes (under entry) - just like notes but can be repeated multiple times, each becoming a separate column

holyjak avatar Sep 22 '21 14:09 holyjak

I see. I have no issues with adding support for multiple notes, apart from time. Pull requests welcome.

td_notes (under entry) - just like notes but can be repeated multiple times, each becoming a separate column

I've made this change. Thank you!

Kapeli avatar Sep 23 '21 18:09 Kapeli

Thank you!

holyjak avatar Sep 24 '21 06:09 holyjak