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

RFC: attributes UI #1068

Closed
zadam opened this issue May 31, 2020 · 15 comments
Closed

RFC: attributes UI #1068

zadam opened this issue May 31, 2020 · 15 comments

Comments

@zadam
Copy link
Owner

zadam commented May 31, 2020

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?

@zadam zadam pinned this issue May 31, 2020
@zadam zadam changed the title RFC: entering attributes RFC: attributes UI May 31, 2020
@Nihisil
Copy link

Nihisil commented Jun 1, 2020

Looking forward for it.

@PAK90
Copy link

PAK90 commented Jun 1, 2020

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
Copy link
Owner Author

zadam commented Jun 1, 2020

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

@lerone-b
Copy link

lerone-b commented Jun 1, 2020

great!

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

@jaroet
Copy link

jaroet commented Jun 1, 2020 via email

@chncho
Copy link

chncho commented Jun 4, 2020

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

@zadam
Copy link
Owner Author

zadam commented Jun 4, 2020

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
Copy link

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
Copy link
Owner Author

zadam commented Jun 5, 2020

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
Copy link

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

@zadam
Copy link
Owner Author

zadam commented Jun 8, 2020

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
Copy link

twh270 commented Jun 11, 2020

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
Copy link

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
Copy link
Owner Author

zadam commented Jul 3, 2020

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

  • expandable "owned" and "inherited" attribute view
  • you can click on an attribute which also allows you to edit the attribute in more GUI way without needing to know the syntax
    • besides that it also shows you list of notes with the same attribute (and value)

@zadam
Copy link
Owner Author

zadam commented Aug 31, 2020

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

@zadam zadam closed this as completed Aug 31, 2020
@zadam zadam unpinned this issue Aug 31, 2020
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

10 participants