zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.97k stars 1.89k forks source link

RFC: attributes UI #1068

Closed zadam closed 4 years ago

zadam commented 4 years ago

Hello, in 0.44 besides search re-work discussed in #1041 I also plan to change the way the attributes (labels and relations) will be defined. Currently, you can add labels and relations only through Attributes dialog which seems to bring slow workflow and takes a person out of flow.

See screenshot of an alternative WIP UI for adding labels and relations:

So the basic idea is that it's just a text field (separate from main content though) where you can just freely type labels and relations (with the help of autocomplete). No dialog needed. You can copy and paste attributes from one note to another with just clipboard.

For now, this will be just preferred alternative and Attributes dialog will stay as it is for the old experience for now.

It's still not clear how to present inherited attributes here but I have some ideas.

What do you think?

Nihisil commented 4 years ago

Looking forward for it.

PAK90 commented 4 years ago

How would you see this working for multi-attributes? I'd imagine it's either multi-defined (e.g. #a=1 #a=2 #a=3) or defined with an array (e.g. #a=[1,2,3])?

zadam commented 4 years ago

@PAK90 same as now, you will define the label multiple times, so #a=1 #a=2 #a=3

lerone-b commented 4 years ago

great!

– would the same approach work for secondary annotations / aka 'side notes' of a note? ( see #527 )

jaroet commented 4 years ago

Hello,

I like this new way of showing and editing attributes. A few remarks. I would like some kind of larger input box (like Excel when you click on a dropdown icon at the end of the input field) for example 4 rows with on each row only 1 attribute. I like the single line, single attribute you have now (although now it has to much 'lost space' around it).

I would prefer having it in the sidebar as a widget but then freely editable. I do not need to see the attributes constantly as your screenshot suggests.

For showing inherited attributes I guess you can use alternative colors or gradients. Might be configurable through CSS also.

Just MHO.

Regards, JeRoen

Op zo 31 mei 2020 om 22:55 schreef zadam notifications@github.com:

Hello, in 0.43 besides search re-work discussed in #1041 https://github.com/zadam/trilium/issues/1041 I also plan to change the way the attributes (labels and relations) will be defined. Currently, you can add labels and relations only through Attributes dialog which seems to bring slow workflow and takes a person out of flow.

See screenshot of an alternative WIP UI for adding labels and relations:

https://user-images.githubusercontent.com/617641/83362460-b5913800-a391-11ea-9d61-cfd32d87e3cd.png

So the basic idea is that it's just a text field (separate from main content though) where you can just freely type labels and relations (with the help of autocomplete). No dialog needed. You can copy and paste attributes from one note to another with just clipboard.

For now, this will be just preferred alternative and Attributes dialog will stay as it is for the old experience for now.

It's still not clear how to present inherited attributes here but I have some ideas.

What do you think?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zadam/trilium/issues/1068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CDWHM2CE22FUKL25THILRUK753ANCNFSM4NPKC56Q .

chncho commented 4 years ago

The interface looks good, and the storage form in the database will not change, isn't it ?

zadam commented 4 years ago

Schema in the database is not affected by these changes - attributes will be stored exactly as before.

There will be some changes in how promoted attribute definitions are represented in the schema, but this shouldn't affect anybody.

leeyaunlong commented 4 years ago

Schema in the database is not affected by these changes - attributes will be stored exactly as before.

There will be some changes in how promoted attribute definitions are represented in the schema, but this shouldn't affect anybody. How to show relate links ? Current, my notes will link many other notes. the relate link include "relation internalLink" (20 chars) + URI string(assume length is 10 chars) = 30 chars. if a note include 5 links, the label input box will fill over 150 chars ( 30 * 5). It is hard to add other labels in input box.

zadam commented 4 years ago

The input box will automatically grow with number of notes. Probably with some upper limit (scrollbar will be shown then).

Regarding the internalLink relations (and similar) - I still think about how to show them there - probably these won't be shown by default and only on click, since these relations are only derived from the content and also shown better in the link map...

JakeCoxon commented 4 years ago

Will the attributes input always be visible there? I wonder if it's better to hide by default?

zadam commented 4 years ago

I'm thinking about adding some expanded so the user can keep it visible or hide it as they want, but not yet exactly sure how to do it ...

twh270 commented 4 years ago

I agree the existing way of editing attributes takes one out of the 'flow', this looks like it will work much better. Agree with @jaroet that a larger input box / one attribute per line would at least sometimes be nicer. Here's my thoughts on user stories:

  1. (MVP) A single line, always visible, that allows space-separated attributes.
  2. Allow quotes around attribute values, e.g. %location="Paris, France". (Bonus: support escaping for quote characters inside the value.)
  3. Multi-line support, multiple attributes per line.
  4. Collapsible attribute box. Hover over a drop-down arrow / chevron / something to display, click on it to "pin" it open.
  5. An attribute that, if present, means "always pin open the attributes for this note".
  6. Keyboard navigation (Ctrl-U doesn't seem to be bound to anything?)
  7. Custom CSS styling around the entire attribute box and for individual attributes.

I realize that's a long wish list. I've never worked on an Electron app before but might could have a go at a couple of these once you have the basic support in place.

(Also, unrelated, I grew up on a steady diet of science fiction and was probably in my early teens when I encountered The Last Question. Young me was quite surprised at the ending!)

lerone-b commented 4 years ago

just to mention / add an observation: I just realized there is a not too obvious implicit consequence of changing the attributs input UI: until now the (very helpful) note hover previews were automatically showing all (propagated) attributes. – as in my case this can take up to 100% of the preview.

I am not sure what is preferable / intended, but wanted to flag that a decision on attribute display for the thumbs/previews is also inherent in such an overhaul. – and maybe that is a good opportunity to reflect on wanted behaviour here.

zadam commented 4 years ago

GIF showing some progress and new features of the attribute view:

zadam commented 4 years ago

Functionality described in this issue has been implemented and will be released soon in v0.44 so closing ...