rebus-ink / ink-API

Hobb API Server: backend for the Rebus Reader system
GNU Affero General Public License v3.0
4 stars 5 forks source link

Enable creating and updating notes with tags #599

Closed Marie000 closed 4 years ago

Marie000 commented 4 years ago

@baldurbjarnason @cesarCSM

So the basic idea is that when you create or update a note, you would be able to pass in a 'tags' property, which would be an array of tags to assign to that note.

Some questions:

cesarCSM commented 4 years ago
baldurbjarnason commented 4 years ago
  1. See Cesar's answer. He knows what the UI plan is better than I do.
  2. My preference would be for the tags property to overwrite existing tags (if it isn't in the list, remove it). That way the front end will always know what's supposed to happen when a note is updated.
  3. Ideally, the tags property should be able to take a list of either ids or objects. If the object doesn't have an id then that means it is a new tag to be created.
  4. Currently, tags are managed as a single block because the front end gets them as a single block (through the /tags endpoint) which is easy because they all behave the same. It would only really be useful to add new, more specific, properties if those properties behave differently or have more specific error scenarios.

For example: it would make sense to add a colour property if that property only allows for one colour at a time (the current colour of the note). Adding more than one colour would then be an error.

I think it's a bit too early for that as we're still in the middle of a redesign and managing tags together as a single group is still working well.