enchant97 / note-mark

Note Mark is a lighting fast and minimal; web-based Markdown notes app.
https://notemark.docs.enchantedcode.co.uk/
GNU Affero General Public License v3.0
313 stars 8 forks source link

(feat) Add setting to show notebooks as expanded by default #176

Open Roundaround opened 9 months ago

Roundaround commented 9 months ago

Does it fit the projects scope?

Why?

It's a bit annoying to have to click into a notebook before even being able to see the notes therein. I realize this is done for performance since you currently only ever fetch notes on a per-book basis, but you could populate more useful data with the same number of requests with a bit of tweaking to the API.

Solution?

I propose a two-part solution:

  1. Add a user-preference option (simple boolean stored with the user in the DB) whether they'd like all the notes fetched alongside books and displayed on the left. This would require checking the field on the logged-in user's data and optionally calling a "getAllNotes" kind of new endpoint on the API
  2. Add a flag on the book level of whether to always show its notes. Would be visible next to the public checkbox. The UI might not even make any new API calls for this - simply have the backend return nested data for all the books where this flag is set to true.

Alternatives?

No response

Extra Context

No response

enchant97 commented 9 months ago

This can be implemented when offline mode is added. Currently every time you visit a book/note everything is fetched.