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): grouping by relation in board
Elian Dorand2184682e563
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/1_Kanban Board_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/1_Kanban Board_image.pngnew file mode 100644index 0000000000..be4b027d2bBinary files /dev/null and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/1_Kanban Board_image.png differdiff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board.htmlindex e4a92ba490..86dc4e4080 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board.html@@ -1,5 +1,5 @@<figure class="image">- <img style="aspect-ratio:918/248;" src="Kanban Board_image.png"+ <img style="aspect-ratio:918/248;" src="1_Kanban Board_image.png"width="918" height="248"></figure><p>The Board view presents sub-notes in columns for a Kanban-like experience.@@ -15,83 +15,115 @@<h2>Interaction</h2><h3>Working with columns</h3><ul>- <li>Create a new column by pressing <em>Add Column</em> near the last column.+ <li data-list-item-id="ed78b9e2ac3200e097ae29e2d528c5e89">Create a new column by pressing <em>Add Column</em> near the last column.<ul>- <li>Once pressed, a text box will be displayed to set the name of the column.+ <li data-list-item-id="ed5ddfffe11d0b328a8072e52be9c7492">Once pressed, a text box will be displayed to set the name of the column.Press <kbd>Enter</kbd> to confirm, or <kbd>Escape</kbd> to dismiss.</li></ul></li>- <li>To reorder a column, simply hold the mouse over the title and drag it+ <li data-list-item-id="eeecd7ac7b32b1c29e7088ad172411862">To reorder a column, simply hold the mouse over the title and drag itto the desired position.</li>- <li>To delete a column, right click on its title and select <em>Delete column</em>.</li>- <li>To rename a column, click on the note title.+ <li data-list-item-id="e6bc6a4b20236a9d2c382a9564eef528f">To delete a column, right click on its title and select <em>Delete column</em>.</li>+ <li+ data-list-item-id="ea3bd7adf8521c4c2fb2f3ef0cf4def28">To rename a column, click on the note title.<ul>- <li>Press Enter to confirm.</li>- <li>Upon renaming a column, the corresponding status attribute of all its+ <li data-list-item-id="eb1b0ee1c933e5ca2f4cb57a05b5c07eb">Press Enter to confirm.</li>+ <li data-list-item-id="eabddc4dae9e10189e9c7dc087496e846">Upon renaming a column, the corresponding status attribute of all itsnotes will be changed in bulk.</li></ul>- </li>- <li>If there are many columns, use the mouse wheel to scroll.</li>+ </li>+ <li data-list-item-id="efc70bbc5f0d1dc25e919a5b9e41a54e2">If there are many columns, use the mouse wheel to scroll.</li></ul><h3>Working with notes</h3><ul>- <li>Create a new note in any column by pressing <em>New item</em>+ <li data-list-item-id="ee1000666f3c92f251a0262d5e2e30cbf">Create a new note in any column by pressing <em>New item</em><ul>- <li>Enter the name of the note and press <kbd>Enter</kbd> or click away. To+ <li data-list-item-id="ea3d86963b86f6820335c3994e3c7a00c">Enter the name of the note and press <kbd>Enter</kbd> or click away. Todismiss the creation of a new note, simply press <kbd>Escape</kbd> or leavethe name empty.</li>- <li>Once created, the new note will have an attribute (<code>status</code> label+ <li data-list-item-id="ee8280e96edd38a1bc247ee34ea514c88">Once created, the new note will have an attribute (<code>status</code> labelby default) set to the name of the column.</li></ul></li>- <li>To open the note, simply click on it.</li>- <li>To change the title of the note directly from the board, hover the mouse+ <li data-list-item-id="eb03f96167236a14a55a7538b588bed05">To open the note, simply click on it.</li>+ <li data-list-item-id="e29a6c1186c096f5ec6316edd9d44e626">To change the title of the note directly from the board, hover the mouseover its card and press the edit button on the right.</li>- <li>To change the state of a note, simply drag a note from one column to the+ <li data-list-item-id="e201e4e28bad20f532c5e2c0ada6398f7">To change the state of a note, simply drag a note from one column to theother to change its state.</li>- <li>The order of the notes in each column corresponds to their position in+ <li data-list-item-id="e98766e577d03db3dfd8acb850ddf8268">The order of the notes in each column corresponds to their position inthe tree.<ul>- <li>It's possible to reorder notes simply by dragging them to the desired+ <li data-list-item-id="e905430d6d0a5e51e2596611ccb3a0f2a">It's possible to reorder notes simply by dragging them to the desiredposition within the same columns.</li>- <li>It's also possible to drag notes across columns, at the desired position.</li>+ <li data-list-item-id="e66108d33aee9387b325a554e12a85a73">It's also possible to drag notes across columns, at the desired position.</li></ul></li>- <li>For more options, right click on a note to display a context menu with+ <li data-list-item-id="ebb5b8df8459f8b32d2e1712d268b63df">For more options, right click on a note to display a context menu withthe following options:<ul>- <li>Open the note in a new tab/split/window or quick edit.</li>- <li>Move the note to any column.</li>- <li>Insert a new note above/below the current one.</li>- <li>Archive/unarchive the current note.</li>- <li>Delete the current note.</li>+ <li data-list-item-id="efe7840fa83c41d4a23759927bbe824d2">Open the note in a new tab/split/window or quick edit.</li>+ <li data-list-item-id="ea44a2cd0895413620eff0720524e9938">Move the note to any column.</li>+ <li data-list-item-id="e505699fc18903f73f96ddfe29a4cc694">Insert a new note above/below the current one.</li>+ <li data-list-item-id="e153bf42c4f955bb1421d586f9e7b5498">Archive/unarchive the current note.</li>+ <li data-list-item-id="e3c0a0113e5bb4a69a9dfe90862f5ee1e">Delete the current note.</li></ul></li>- <li>If there are many notes within the column, move the mouse over the column+ <li data-list-item-id="e1d6b1303eb3567b51fec1174993dcb71">If there are many notes within the column, move the mouse over the columnand use the mouse wheel to scroll.</li></ul>-<h2>Keyboard interaction</h2>+<h3>Keyboard interaction</h3><p>The board view has mild support for keyboard-based navigation:</p><ul>- <li>Use <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> to navigate between+ <li data-list-item-id="ef209d621d05adddb8648e11c1aff106a">Use <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> to navigate betweencolumn titles, notes and the “New item” button for each of the columns,in sequential order.</li>- <li>To rename a column or a note, press <kbd>F2</kbd> while it is focused.</li>- <li>To open a specific note or create a new item, press <kbd>Enter</kbd> while+ <li data-list-item-id="e48cffbf4ee1a7452c1e01277c8dd2cbf">To rename a column or a note, press <kbd>F2</kbd> while it is focused.</li>+ <li+ data-list-item-id="e02a6fb1c98d4e4b75e9e4245cf7cf6b1">To open a specific note or create a new item, press <kbd>Enter</kbd> whileit is focused.</li>- <li>To dismiss a rename of a note or a column, press <kbd>Escape</kbd>.</li>+ <li data-list-item-id="eec6f2285fa4d8e95f6a3d40cf51e3d69">To dismiss a rename of a note or a column, press <kbd>Escape</kbd>.</li></ul><h2>Configuration</h2>-<h3>Grouping by another attribute</h3>+<h3>Grouping by another label</h3><p>By default, the label used to group the notes is <code>#status</code>.It is possible to use a different label if needed by defining a label named <code>#board:groupBy</code> with- the value being the attribute to use (without <code>#</code> attribute prefix).</p>-<aside-class="admonition note">- <p>It's currently not possible to set a relation as the grouping criteria.- There are plans to add support for it.</p>- </aside>- <h2>Limitations</h2>- <ul>- <li>It is not possible yet to use group by a relation, only by label.</li>- </ul>\ No newline at end of file+ the value being the attribute to use (with or without <code>#</code> attribute+ prefix).</p>+<h3>Grouping by relations</h3>+<figure class="image image-style-align-right">+ <img style="aspect-ratio:535/245;" src="Kanban Board_image.png"+ width="535" height="245">+</figure>+<p>A more advanced use-case is grouping by <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_Cq5X6iKQop6R">Relations</a>.</p>+<p>During this mode:</p>+<ul>+ <li data-list-item-id="e597b9ecddfae34bb858559de09ee1f6a">The columns represent the <em>target notes</em> of a relation.</li>+ <li data-list-item-id="eb59f890b2223d7f3f43e7ebae747002d">When creating a new column, a note is selected instead of a column name.</li>+ <li+ data-list-item-id="e566f9ab556f5c47b00ce0854def37bea">The column icon will match the target note.</li>+ <li data-list-item-id="e43d3786e7e6590a003f16f3eb437bba5">Moving notes between columns will change its relation.</li>+ <li data-list-item-id="e5c2a414d0c80f0d1a67066078c7a4f79">Renaming an existing column will change the target note of all the notes+ in that column.</li>+</ul>+<p>Using relations instead of labels has some benefits:</p>+<ul>+ <li data-list-item-id="e580344f5638c09e80f566dc789db656a">The status/grouping of the notes is visible outside the Kanban board,+ for example on the <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_bdUJEHsAPYQR">Note Map</a>.</li>+ <li+ data-list-item-id="e1d59fe7873950babd8e1f3dbcb913e1a">Columns can have icons.</li>+ <li data-list-item-id="e9933195c1f7708326f434321482cd917">Renaming columns is less intensive since it simply involves changing the+ note title of the target note instead of having to do a bulk rename.</li>+</ul>+<p>To do so:</p>+<ol>+ <li data-list-item-id="e66855292cf2639a13ecd642482681653">First, create a Kanban board from scratch and not a template:</li>+ <li+ data-list-item-id="eaf16b94767674ca24de65ae102b84fc7">Assign <code>#viewType=board #hidePromotedAttributes</code> to emulate the+ default template.</li>+ <li data-list-item-id="e861d2859085e0dba83a44946fdc67c32">Set <code>#board:groupBy</code> to the name of a relation to group by, <strong>including the </strong><code><strong>~</strong></code><strong> prefix</strong> (e.g. <code>~status</code>).</li>+ <li+ data-list-item-id="efd300f3e766d485e28b7c8fd0a73364c">+ <p>Optionally, use <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a> for+ easy status change within the note:</p><pre><code class="language-text-x-trilium-auto">#relation:status(inheritable)="promoted,alias=Status,single"</code></pre>+ </li>+</ol>\ No newline at end of filediff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board_image.pngindex be4b027d2b..1ccb0a3ccf 100644Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board_image.png and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Kanban Board_image.png differdiff --git a/docs/Developer Guide/!!!meta.json b/docs/Developer Guide/!!!meta.jsonindex 5d95a894c7..cdf47264f3 100644--- a/docs/Developer Guide/!!!meta.json+++ b/docs/Developer Guide/!!!meta.json@@ -1,6 +1,6 @@{"formatVersion": 2,- "appVersion": "0.99.4",+ "appVersion": "0.99.5","files": [{"isClone": false,@@ -110,6 +110,13 @@"type": "text","mime": "text/html","attributes": [+ {+ "type": "relation",+ "name": "internalLink",+ "value": "4nwtTJyjNDKd",+ "isInheritable": false,+ "position": 10+ },{"type": "label","name": "iconClass",@@ -117,13 +124,6 @@"isInheritable": false,"position": 20},- {- "type": "relation",- "name": "internalLink",- "value": "4nwtTJyjNDKd",- "isInheritable": false,- "position": 30- },{"type": "label","name": "shareAlias",@@ -1263,10 +1263,17 @@{"type": "relation","name": "internalLink",- "value": "zdQzavvHDl1k",+ "value": "ccIoz7nqgDRK","isInheritable": false,"position": 10},+ {+ "type": "relation",+ "name": "internalLink",+ "value": "zdQzavvHDl1k",+ "isInheritable": false,+ "position": 20+ },{"type": "label","name": "iconClass",@@ -1280,13 +1287,6 @@"value": "releasing","isInheritable": false,"position": 40- },- {- "type": "relation",- "name": "internalLink",- "value": "ccIoz7nqgDRK",- "isInheritable": false,- "position": 50}],"format": "markdown",diff --git a/docs/Developer Guide/Developer Guide/Documentation.md b/docs/Developer Guide/Developer Guide/Documentation.mdindex 63cfdc33ec..5f9f17e5f3 100644--- a/docs/Developer Guide/Developer Guide/Documentation.md+++ b/docs/Developer Guide/Developer Guide/Documentation.md@@ -1,5 +1,5 @@# Documentation-There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/E6pFkO6VwPFI/Documentation_image.png" width="205" height="162">+There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/cJTTOrI5C1jn/Documentation_image.png" width="205" height="162">* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing <kbd>F1</kbd>.* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.diff --git a/docs/Release Notes/!!!meta.json b/docs/Release Notes/!!!meta.jsonindex c2c0b02ba2..a2210f04e0 100644--- a/docs/Release Notes/!!!meta.json+++ b/docs/Release Notes/!!!meta.json@@ -1,6 +1,6 @@{"formatVersion": 2,- "appVersion": "0.99.4",+ "appVersion": "0.99.5","files": [{"isClone": false,diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.jsonindex bb262ac18e..de161c37de 100644--- a/docs/User Guide/!!!meta.json+++ b/docs/User Guide/!!!meta.json@@ -1,6 +1,6 @@{"formatVersion": 2,- "appVersion": "0.99.4",+ "appVersion": "0.99.5","files": [{"isClone": false,@@ -9884,18 +9884,47 @@"value": "kanban-board","isInheritable": false,"position": 20+ },+ {+ "type": "relation",+ "name": "internalLink",+ "value": "Cq5X6iKQop6R",+ "isInheritable": false,+ "position": 30+ },+ {+ "type": "relation",+ "name": "internalLink",+ "value": "OFXdgB2nNk1F",+ "isInheritable": false,+ "position": 40+ },+ {+ "type": "relation",+ "name": "internalLink",+ "value": "bdUJEHsAPYQR",+ "isInheritable": false,+ "position": 50}],"format": "markdown","dataFileName": "Kanban Board.md","attachments": [{- "attachmentId": "usSSa0WI6dDK",+ "attachmentId": "IrIeh59VGjHq","title": "image.png","role": "image","mime": "image/png","position": 10,"dataFileName": "Kanban Board_image.png"+ },+ {+ "attachmentId": "usSSa0WI6dDK",+ "title": "image.png",+ "role": "image",+ "mime": "image/png",+ "position": 10,+ "dataFileName": "1_Kanban Board_image.png"}]},diff --git a/docs/User Guide/User Guide/Collections/1_Kanban Board_image.png b/docs/User Guide/User Guide/Collections/1_Kanban Board_image.pngnew file mode 100644index 0000000000..be4b027d2bBinary files /dev/null and b/docs/User Guide/User Guide/Collections/1_Kanban Board_image.png differdiff --git a/docs/User Guide/User Guide/Collections/Kanban Board.md b/docs/User Guide/User Guide/Collections/Kanban Board.mdindex e4efcdc261..c9b0225377 100644--- a/docs/User Guide/User Guide/Collections/Kanban Board.md+++ b/docs/User Guide/User Guide/Collections/Kanban Board.md@@ -1,5 +1,5 @@# Kanban Board-<figure class="image"><img style="aspect-ratio:918/248;" src="Kanban Board_image.png" width="918" height="248"></figure>+<figure class="image"><img style="aspect-ratio:918/248;" src="1_Kanban Board_image.png" width="918" height="248"></figure>The Board view presents sub-notes in columns for a Kanban-like experience. Each column represents a possible value for a status label, which can be adjusted.@@ -41,7 +41,7 @@ Notes are displayed recursively, so even the child notes of the child notes will* Delete the current note.* If there are many notes within the column, move the mouse over the column and use the mouse wheel to scroll.-## Keyboard interaction+### Keyboard interactionThe board view has mild support for keyboard-based navigation:@@ -52,13 +52,37 @@ The board view has mild support for keyboard-based navigation:## Configuration-### Grouping by another attribute+### Grouping by another label-By default, the label used to group the notes is `#status`. It is possible to use a different label if needed by defining a label named `#board:groupBy` with the value being the attribute to use (without `#` attribute prefix).+By default, the label used to group the notes is `#status`. It is possible to use a different label if needed by defining a label named `#board:groupBy` with the value being the attribute to use (with or without `#` attribute prefix).-> [!NOTE]-> It's currently not possible to set a relation as the grouping criteria. There are plans to add support for it.+### Grouping by relations-## Limitations+<figure class="image image-style-align-right"><img style="aspect-ratio:535/245;" src="Kanban Board_image.png" width="535" height="245"></figure>-* It is not possible yet to use group by a relation, only by label.\ No newline at end of file+A more advanced use-case is grouping by [Relations](../Advanced%20Usage/Attributes/Relations.md).++During this mode:++* The columns represent the _target notes_ of a relation.+* When creating a new column, a note is selected instead of a column name.+* The column icon will match the target note.+* Moving notes between columns will change its relation.+* Renaming an existing column will change the target note of all the notes in that column.++Using relations instead of labels has some benefits:++* The status/grouping of the notes is visible outside the Kanban board, for example on the <a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a>.+* Columns can have icons.+* Renaming columns is less intensive since it simply involves changing the note title of the target note instead of having to do a bulk rename.++To do so:++1. First, create a Kanban board from scratch and not a template:+2. Assign `#viewType=board #hidePromotedAttributes` to emulate the default template.+3. Set `#board:groupBy` to the name of a relation to group by, **including the** `**~**` **prefix** (e.g. `~status`).+4. Optionally, use <a class="reference-link" href="../Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a> for easy status change within the note:++ ```+ #relation:status(inheritable)="promoted,alias=Status,single"+ ```\ No newline at end of filediff --git a/docs/User Guide/User Guide/Collections/Kanban Board_image.png b/docs/User Guide/User Guide/Collections/Kanban Board_image.pngindex be4b027d2b..1ccb0a3ccf 100644Binary files a/docs/User Guide/User Guide/Collections/Kanban Board_image.png and b/docs/User Guide/User Guide/Collections/Kanban Board_image.png differ