Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Pinned notes #286

Open
uwemock opened this issue Dec 22, 2022 · 2 comments
Open

[Feature Request] Pinned notes #286

uwemock opened this issue Dec 22, 2022 · 2 comments

Comments

@uwemock
Copy link

uwemock commented Dec 22, 2022

I'd like to be able to pin notes, i.e. prevent them from moving down in the menu and in the list in the search window.

@uwemock uwemock changed the title Feature Request: Pinned notes [Feature Request] Pinned notes Dec 22, 2022
@davidbannon
Copy link
Member

Hmm, interesting idea, I will look into it.
Thanks
Davo

@davidbannon
Copy link
Member

OK, thinking out loud.
Mark a Pinned note with a tag, eg in the section, put system:pinned. Will be ignored by older versions of -ng and its cousin applications.

When the notes menu is redrawn, it relies on the fact that we keep the in memory notes sorted by most recently used. So, for the first sweep we look for pinned notes. Then, space permitting, unpinned. That way, we see the Pinned notes in the correct order and then the unpinned, also in correct order. This will be a bit time consuming, bypassing some of the optimizations I have done. So, maybe keep a record in memory as to how many pinned notes the user has, that way, pinned notes, probably more used, will be found first and when they are all found, stop that sweep ? If the user has one pinned note that has not been touched for years, then a full sweep will be necessary. OK if notes in memory but possibly slow for users who choose not to do that.

Another problem will be how to handle that for Sync users. When doing GitHub sync, we will always defer to an existing note's pinned status ? The Index page is generated locally so thats easy. For file sync the xml will tell us all we need. However, if the user is using Github to sync two different machines then the Pinned status will NOT be passed to other machine. Hmm....

A dodgy hidden markdown tag ? Sigh ....

Anyway, does sound like it can be made useful for most users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants