Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
docs(user): document the new add mechanism
Elian Doran0aa6c0333cef
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.htmlindex f068d87080..6f2f78a12e 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.html@@ -6,33 +6,22 @@<h2>Sections</h2><p>The following information is displayed in sections:</p><ul>- <li>- <p><em>Owned attributes</em>, contains a list of the attributes that belong- to this note.</p>- </li>- <li>- <p><em>Inherited attributes</em> are attributes that apply to the current- note but come through <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">Attribute Inheritance</a>.</p>- </li>- <li>- <p><em>Definitions</em> describe the type of attributes and are used in - <a- class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> and <a class="reference-link" href="#root/pOsGYCXsbNQG/GTwFsgaA0lCt/_help_2FvYrpmOXm29">Table</a> collections.</p>- </li>+ <li><em>Owned attributes</em>, contains a list of the attributes that belong+ to this note.</li>+ <li><em>Inherited attributes</em> are attributes that apply to the current+ note but come through <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">Attribute Inheritance</a>.</li>+ <li><em>Definitions</em> describe the type of attributes and are used in + <a+ class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> and <a class="reference-link" href="#root/pOsGYCXsbNQG/GTwFsgaA0lCt/_help_2FvYrpmOXm29">Table</a> collections.</li></ul><h2>Owned attributes</h2><p>Every item is structured as such:</p><ul>- <li>- <p>The icon of each item indicates whether it's a <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_HI6GBBIduIgv">label</a> or- a <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_Cq5X6iKQop6R">relation</a> (link- to another note).</p>- </li>- <li>- <p>The first text is the name of the label.</p>- </li>- <li>- <p>The value of the attribute is displayed after the name, if present.</p>+ <li>The icon of each item indicates whether it's a <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_HI6GBBIduIgv">label</a> or+ a <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_Cq5X6iKQop6R">relation</a> (link+ to another note).</li>+ <li>The first text is the name of the label.</li>+ <li>The value of the attribute is displayed after the name, if present.<ul><li>The value is shown in a graphical way: a relation's value is a clickablenote link; a color label shows a color chip.</li>@@ -43,95 +32,78 @@cog near the icon and are grouped separately from the user-defined ones.</p><p>Interaction:</p><ul>- <li>- <p>Clicking on the item (apart from the value and links) reveals a dedicated- popup where the name, value and <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">Attribute Inheritance</a> can- be defined.</p>- </li>- <li>- <p>The value of the attributes can be edited in-place:</p>+ <li>Clicking on the item (apart from the value and links) reveals a dedicated+ popup where the name, value and <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_bwZpz2ajCEwO">Attribute Inheritance</a> can+ be defined.</li>+ <li>The value of the attributes can be edited in-place:<ul>- <li>- <p>The input box follows the type defined in a corresponding label definition- (date, color, dropdown, numbers), as well as for system attributes that- have a specific type (e.g. <code spellcheck="false">color</code>).</p>- </li>- <li>- <p>For labels, clicking on the value edits its in-place. Press <kbd spellcheck="false">Enter</kbd> to- confirm or click outside the input box, or <kbd spellcheck="false">Esc</kbd> to- dismiss.</p>- </li>- <li>- <p>For multi-line text, <kbd spellcheck="false">Ctrl</kbd>+<kbd spellcheck="false">Enter</kbd> confirms- whereas <kbd spellcheck="false">Enter</kbd> creates a newline.</p>- </li>- <li>- <p>For labels without a value, a value can be added by clicking on the <em>No value</em> text- which appears while the mouse is hovered on the item.</p>- </li>- <li>- <p>For relations, there is a dedicated pencil button instead.</p>- </li>+ <li>The input box follows the type defined in a corresponding label definition+ (date, color, dropdown, numbers), as well as for system attributes that+ have a specific type (e.g. <code spellcheck="false">color</code>).</li>+ <li>For labels, clicking on the value edits its in-place. Press <kbd spellcheck="false">Enter</kbd> to+ confirm or click outside the input box, or <kbd spellcheck="false">Esc</kbd> to+ dismiss.</li>+ <li>For multi-line text, <kbd spellcheck="false">Ctrl</kbd>+<kbd spellcheck="false">Enter</kbd> confirms+ whereas <kbd spellcheck="false">Enter</kbd> creates a newline.</li>+ <li>For labels without a value, a value can be added by clicking on the <em>No value</em> text+ which appears while the mouse is hovered on the item.</li>+ <li>For relations, there is a dedicated pencil button instead.</li></ul></li>- <li>- <p>An attribute can be deleted by pressing the X button to its right, which- only appears while hovered. A confirmation screen is displayed first to- ensure the attribute is not accidentally deleted.</p>- </li>- <li>- <p>A new label, relation or attribute definition can be added from the +- button near the title of the section.</p>+ <li>An attribute can be deleted by pressing the X button to its right, which+ only appears while hovered. A confirmation screen is displayed first to+ ensure the attribute is not accidentally deleted.</li>+</ul>+<p>Attributes can be added in two ways:</p>+<ul>+ <li>A new label, relation or attribute definition can be added from the ++ button near the title of the section. This shows the full detail popup.</li>+ <li>To quickly add a label or a relation directly from the sidebar, click+ the <em>Add attribute</em> item at the end of the list.+ <ul>+ <li>The name field will be focused first. By default, a label will be created+ instead but it can be toggled to a relation by typing <kbd spellcheck="false">~</kbd> or+ pressing the icon (similarly, typing <code spellcheck="false">#</code> will+ switch back to a label instead of a relation).</li>+ <li>Once the name is filled, press <kbd spellcheck="false">Enter</kbd> to continue+ to the value. Type in a value if desired and then press <kbd spellcheck="false">Enter</kbd> again+ to create the attribute. </li>+ <li>Clicking outside the editor will also create the attribute, but only if+ a name is specified.</li>+ </ul></li></ul><h2>Inherited attributes</h2><p>Inherited labels or relations are shown in the same fashion as <em>Owned attributes</em>.</p><p>The only differences are:</p><ul>- <li>- <p>To the right of the inherited attribute there is a link to the note where- the attribute comes from, as well as an icon to indicate that it's inheritable.</p>- </li>- <li>- <p>Clicking on an inherited attribute will reveal the same popup as owned- attributes, but it is not editable. To edit it, first navigate to the note- where the attribute is defined.</p>- </li>+ <li>To the right of the inherited attribute there is a link to the note where+ the attribute comes from, as well as an icon to indicate that it's inheritable.</li>+ <li>Clicking on an inherited attribute will reveal the same popup as owned+ attributes, but it is not editable. To edit it, first navigate to the note+ where the attribute is defined.</li></ul><h2>Definitions</h2><p>For attribute definition (see <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a>):</p><ul>- <li>- <p>The icon indicates the type of the attribute (text, number).</p>+ <li>The icon indicates the type of the attribute (text, number).<ul>- <li>- <p>If an attribute is promoted, it has a small chevron icon overlaid on top- of it.</p>- </li>+ <li>If an attribute is promoted, it has a small chevron icon overlaid on top+ of it.</li></ul></li>- <li>- <p>The name indicates the name of the attribute it defines (without the- <code- spellcheck="false">label:</code>or <code spellcheck="false">relation:</code> prefix).</p>- </li>- <li>- <p>To the right of the name a short summary is displayed which indicates- the display name (alias), whether it has multiple values or an inverse- relation.</p>- </li>- <li>- <p>Clicking on a definition reveals a popup, where the name, type, display- name and other aspects can be configured.</p>- </li>- <li>- <p>A new label or relation definition can be added from the + button near- the title of the section.</p>- </li>- <li>- <p>For inherited definition, there is a link to the note where the definition- comes from, as well as an icon to indicate that it's inherited.</p>- </li>+ <li>The name indicates the name of the attribute it defines (without the+ <code+ spellcheck="false">label:</code>or <code spellcheck="false">relation:</code> prefix).</li>+ <li>To the right of the name a short summary is displayed which indicates+ the display name (alias), whether it has multiple values or an inverse+ relation.</li>+ <li>Clicking on a definition reveals a popup, where the name, type, display+ name and other aspects can be configured.</li>+ <li>A new label or relation definition can be added from the + button near+ the title of the section.</li>+ <li>For inherited definition, there is a link to the note where the definition+ comes from, as well as an icon to indicate that it's inherited.</li></ul><h2>Mobile</h2><p>The attributes can also be edited visually on mobile, but not as partdiff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.mdindex 97986d37c4..20019557ab 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Right Sidebar/Attributes tab.md@@ -18,7 +18,6 @@ Every item is structured as such:* The icon of each item indicates whether it's a [label](../../../Advanced%20Usage/Attributes/Labels.md) or a [relation](../../../Advanced%20Usage/Attributes/Relations.md) (link to another note).* The first text is the name of the label.* The value of the attribute is displayed after the name, if present.-* The value is shown in a graphical way: a relation's value is a clickable note link; a color label shows a color chip.System attributes (that have a special meaning in Trilium) show a small cog near the icon and are grouped separately from the user-defined ones.@@ -27,14 +26,20 @@ Interaction:* Clicking on the item (apart from the value and links) reveals a dedicated popup where the name, value and <a class="reference-link" href="../../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md">Attribute Inheritance</a> can be defined.* The value of the attributes can be edited in-place:-* The input box follows the type defined in a corresponding label definition (date, color, dropdown, numbers), as well as for system attributes that have a specific type (e.g. `color`).* For labels, clicking on the value edits its in-place. Press <kbd spellcheck="false">Enter</kbd> to confirm or click outside the input box, or <kbd spellcheck="false">Esc</kbd> to dismiss.* For multi-line text, <kbd spellcheck="false">Ctrl</kbd>+<kbd spellcheck="false">Enter</kbd> confirms whereas <kbd spellcheck="false">Enter</kbd> creates a newline.* For labels without a value, a value can be added by clicking on the _No value_ text which appears while the mouse is hovered on the item.* For relations, there is a dedicated pencil button instead.* An attribute can be deleted by pressing the X button to its right, which only appears while hovered. A confirmation screen is displayed first to ensure the attribute is not accidentally deleted.-* A new label, relation or attribute definition can be added from the + button near the title of the section.++Attributes can be added in two ways:++* A new label, relation or attribute definition can be added from the + button near the title of the section. This shows the full detail popup.+* To quickly add a label or a relation directly from the sidebar, click the _Add attribute_ item at the end of the list.+ * The name field will be focused first. By default, a label will be created instead but it can be toggled to a relation by typing <kbd spellcheck="false">~</kbd> or pressing the icon (similarly, typing `#` will switch back to a label instead of a relation).+ * Once the name is filled, press <kbd spellcheck="false">Enter</kbd> to continue to the value. Type in a value if desired and then press <kbd spellcheck="false">Enter</kbd> again to create the attribute.+ * Clicking outside the editor will also create the attribute, but only if a name is specified.## Inherited attributes@@ -50,7 +55,6 @@ The only differences are:For attribute definition (see <a class="reference-link" href="../../../Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a>):* The icon indicates the type of the attribute (text, number).-* If an attribute is promoted, it has a small chevron icon overlaid on top of it.* The name indicates the name of the attribute it defines (without the `label:` or `relation:` prefix).* To the right of the name a short summary is displayed which indicates the display name (alias), whether it has multiple values or an inverse relation.