sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
183 stars 22 forks source link

Feature request: Pin a page for quick reference? #196

Open virtadpt opened 4 years ago

virtadpt commented 4 years ago

A potential use case for Pepperminty Wiki is for the user to have a handful of pages that they refer to often out of a large collection of documents that aren't constantly in use (e.g., a TO-DO list alongside a few hundred wiki pages of notes). The "More..." menu is an on-demand drop-down of links. Would it be possible for users to have a customizable drop-down of often referenced wiki pages in the same way?

sbrl commented 4 years ago

Hrm, interesting idea!

The more menu is currently rather special in it's implementation, but you can certainly insert links to pages into any of the navigational elements. Do this with the nav_links, nav_links_extra, and nav_links_bottom settings in peppermint.json, and use the following URL: ?action=view&page=PAGE_NAME_HERE, replacing PAGE_NAME_HERE with the escaped page name (e.g. use the encodeURIComponent() command in your browser console).

Dropdowns are (at the moment) out of reach. The most complicated part of that is determining thee data structure to use in peppermint.json to represent it, and what the UI would look like. Some questions for you:

  1. What would such a dropdown look like and how would it work (perhaps a pencil / whiteboard sketch here would help?)
  2. Any ideas as to how the existing data structure for the navigational elements could be extended to support additional dropdowns?
virtadpt commented 4 years ago

I didn't realize that, I'll give it a try later today.

What I was thinking is, an HTML < ul >< /ul > that comes and goes when it's clicked. Something like Bootstrap's "dropdown-menu" attribute. Or like the Blue theme's "More..." menu.

sbrl commented 4 years ago

Cool, thanks! A diagram / drawing would be really helpful :-)

virtadpt commented 4 years ago

I can sketch one up over a screenshot later today.