-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: add nests (a.k.a namespaces) #4112
base: main
Are you sure you want to change the base?
Conversation
@andresmanelli, can you provide some more context around what you are after / how you see nests working. From the code if look like, as you mentioned, 1 nest can have many memos allowing you to group memos into their own context space. From the gif It look like on the FE you using nests as a tag filter. e.g. When you click on a nest the metadata records are not filtered for the nest group. The gif shows the tags are shared across nests. Is this intended? If so, can the same functionality be achieved expanding on the existing tag infrastructure? Do you see nests only being used on on the home page or are shared spaces such as explore and the user pages also needing to make use of them in some way? |
Sure @RoccoSmit, let's say I want to work on my personal notes, my work-related notes, and some project-specific notes. I wouldn't want to mix all of them in the UI, I'd prefer to switch between these namespaces and see their content.
Actually no, I did't quite get how the tags are read from the database, so I couldn't get that done. I think tags that are created in notes of a nest should be show for that nest, but not for the others.
I don't think using tags to filter a namespace is a great idea, as it would require using specific tag names to identify nests (maybe there is another way?). Using a specific database column seems cleaner to me. It does not pollute the rest of the functionality.
I didn't filter the explore page, as I think it is intended to show everything that is Public or Protected (independently of the nest currently being used). Could you explain to me what do you mean by Also, I did not look into the resources for the moment. I think they should be filtered using the related memo's nest (in the resources page). |
Hey @RoccoSmit I added some changes:
I will try to add the nest creation and the default nest selection in the user settings to have an "mvp" of this feature ready. Thanks again for your comments. |
@andresmanelli, good work with the POC. My suggestion at this point, before you spend more time on it, would be to get @boojack and/or @johnnyjoygh 's input on if this feature fits in with their long term view of Memos (this is usually part of issue reviews) so that you have an understanding on if this feature will be merged or not |
@RoccoSmit of course, I understand! I will probably add those two last things anyway to be able to use this, but I'll wait for comments on whether they find it interesting. |
3a1477f
to
754e766
Compare
@andresmanelli I think the Supernotes Collection could be a more fitting solution for the problem you're trying to solve. It allows users to organize their notes into distinct collections, which effectively separates different contexts or categories (like personal, work, and project-specific notes) without mixing them up in the UI. Each collection serves as a namespace, giving you the ability to group related notes together while keeping them isolated from other collections. |
_, err = s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{ | ||
UserId: user.ID, | ||
Key: storepb.UserSettingKey_NEST, | ||
Value: &storepb.UserSetting_Nest{ | ||
Nest: fmt.Sprintf("%d", nest.ID), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this value needs to be stored in the db or if adding it to the local storage on the FE would be sufficient for users to still get the nets they were previously looking at on for e.g. reload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it is kept upon user sign-out (on a per-user basis) ? For the time being I added the line const [nest] = useLocalStorage("nest", "none");
in CommonContextProvider.tsx
but I'm not really sure how or if that works as expected.
So I also kept the database entry (and fixed the sql migration).
Some additional general notes from testing and code review.
|
@johnnyjoygh thanks for the feedback! I looked into Supernotes Collections, and I see it shares the basic concept of organizing notes in categories (based on filters, which is quite nice). One subtle difference, is that all the notes keep sharing tags for example, or calendar view (maybe all metadata, but I didn't spend a lot of time testing). I think collections could be also used on top of nests (different filter sets for different contexts). Does that make sense? |
@RoccoSmit Not at all, I actually chose
I fixed that in my latest commits, moving the nest filter under the
Agree.
Agree. |
@boojack , @johnnyjoygh , thoughts on:
|
Hello,
First of all, thank you for this amazing tool. I love the simplicity of it and the clean UI.
What I'm missing is the ability to separate personal/work/other notes (maybe it is there, and I couldn't find it).
Anyway, I thought of giving it a try, so I added what I called
nests
: basically, a group of notes that belong to a namespace.I'm no front-end developer, so there are a couple of things missing.
For the moment, there are only two hard-coded nests in the UI.
I added the nest filter to several requests, so you can switch back and forth without issues:
Let me know what you think.