docs(user): grouping by relation in board

This commit is contained in:
Elian Doran 2025-11-15 13:37:24 +02:00
parent 63cc5b21b4
commit d2184682e5
No known key found for this signature in database
10 changed files with 155 additions and 70 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,5 +1,5 @@
<figure class="image"> <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"> width="918" height="248">
</figure> </figure>
<p>The Board view presents sub-notes in columns for a Kanban-like experience. <p>The Board view presents sub-notes in columns for a Kanban-like experience.
@ -15,83 +15,115 @@
<h2>Interaction</h2> <h2>Interaction</h2>
<h3>Working with columns</h3> <h3>Working with columns</h3>
<ul> <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> <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> Press <kbd>Enter</kbd> to confirm, or <kbd>Escape</kbd> to dismiss.</li>
</ul> </ul>
</li> </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 it
to the desired position.</li> to the desired position.</li>
<li>To delete a column, right click on its title and select <em>Delete column</em>.</li> <li data-list-item-id="e6bc6a4b20236a9d2c382a9564eef528f">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="ea3bd7adf8521c4c2fb2f3ef0cf4def28">To rename a column, click on the note title.
<ul> <ul>
<li>Press Enter to confirm.</li> <li data-list-item-id="eb1b0ee1c933e5ca2f4cb57a05b5c07eb">Press Enter to confirm.</li>
<li>Upon renaming a column, the corresponding status attribute of all its <li data-list-item-id="eabddc4dae9e10189e9c7dc087496e846">Upon renaming a column, the corresponding status attribute of all its
notes will be changed in bulk.</li> notes will be changed in bulk.</li>
</ul> </ul>
</li> </li>
<li>If there are many columns, use the mouse wheel to scroll.</li> <li data-list-item-id="efc70bbc5f0d1dc25e919a5b9e41a54e2">If there are many columns, use the mouse wheel to scroll.</li>
</ul> </ul>
<h3>Working with notes</h3> <h3>Working with notes</h3>
<ul> <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> <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. To
dismiss the creation of a new note, simply press <kbd>Escape</kbd> or leave dismiss the creation of a new note, simply press <kbd>Escape</kbd> or leave
the name empty.</li> the 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> label
by default) set to the name of the column.</li> by default) set to the name of the column.</li>
</ul> </ul>
</li> </li>
<li>To open the note, simply click on it.</li> <li data-list-item-id="eb03f96167236a14a55a7538b588bed05">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="e29a6c1186c096f5ec6316edd9d44e626">To change the title of the note directly from the board, hover the mouse
over its card and press the edit button on the right.</li> over 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 the
other to change its state.</li> other 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 in
the tree. the tree.
<ul> <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 desired
position within the same columns.</li> position 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> </ul>
</li> </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 with
the following options: the following options:
<ul> <ul>
<li>Open the note in a new tab/split/window or quick edit.</li> <li data-list-item-id="efe7840fa83c41d4a23759927bbe824d2">Open the note in a new tab/split/window or quick edit.</li>
<li>Move the note to any column.</li> <li data-list-item-id="ea44a2cd0895413620eff0720524e9938">Move the note to any column.</li>
<li>Insert a new note above/below the current one.</li> <li data-list-item-id="e505699fc18903f73f96ddfe29a4cc694">Insert a new note above/below the current one.</li>
<li>Archive/unarchive the current note.</li> <li data-list-item-id="e153bf42c4f955bb1421d586f9e7b5498">Archive/unarchive the current note.</li>
<li>Delete the current note.</li> <li data-list-item-id="e3c0a0113e5bb4a69a9dfe90862f5ee1e">Delete the current note.</li>
</ul> </ul>
</li> </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 column
and use the mouse wheel to scroll.</li> and use the mouse wheel to scroll.</li>
</ul> </ul>
<h2>Keyboard interaction</h2> <h3>Keyboard interaction</h3>
<p>The board view has mild support for keyboard-based navigation:</p> <p>The board view has mild support for keyboard-based navigation:</p>
<ul> <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 between
column titles, notes and the “New item” button for each of the columns, column titles, notes and the “New item” button for each of the columns,
in sequential order.</li> in sequential order.</li>
<li>To rename a column or a note, press <kbd>F2</kbd> while it is focused.</li> <li data-list-item-id="e48cffbf4ee1a7452c1e01277c8dd2cbf">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="e02a6fb1c98d4e4b75e9e4245cf7cf6b1">To open a specific note or create a new item, press <kbd>Enter</kbd> while
it is focused.</li> it 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> </ul>
<h2>Configuration</h2> <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>. <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 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> the value being the attribute to use (with or without <code>#</code> attribute
<aside prefix).</p>
class="admonition note"> <h3>Grouping by relations</h3>
<p>It's currently not possible to set a relation as the grouping criteria. <figure class="image image-style-align-right">
There are plans to add support for it.</p> <img style="aspect-ratio:535/245;" src="Kanban Board_image.png"
</aside> width="535" height="245">
<h2>Limitations</h2> </figure>
<ul> <p>A more advanced use-case is grouping by <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_Cq5X6iKQop6R">Relations</a>.</p>
<li>It is not possible yet to use group by a relation, only by label.</li> <p>During this mode:</p>
</ul> <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&nbsp;<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&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,6 +1,6 @@
{ {
"formatVersion": 2, "formatVersion": 2,
"appVersion": "0.99.4", "appVersion": "0.99.5",
"files": [ "files": [
{ {
"isClone": false, "isClone": false,
@ -110,6 +110,13 @@
"type": "text", "type": "text",
"mime": "text/html", "mime": "text/html",
"attributes": [ "attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "4nwtTJyjNDKd",
"isInheritable": false,
"position": 10
},
{ {
"type": "label", "type": "label",
"name": "iconClass", "name": "iconClass",
@ -117,13 +124,6 @@
"isInheritable": false, "isInheritable": false,
"position": 20 "position": 20
}, },
{
"type": "relation",
"name": "internalLink",
"value": "4nwtTJyjNDKd",
"isInheritable": false,
"position": 30
},
{ {
"type": "label", "type": "label",
"name": "shareAlias", "name": "shareAlias",
@ -1263,10 +1263,17 @@
{ {
"type": "relation", "type": "relation",
"name": "internalLink", "name": "internalLink",
"value": "zdQzavvHDl1k", "value": "ccIoz7nqgDRK",
"isInheritable": false, "isInheritable": false,
"position": 10 "position": 10
}, },
{
"type": "relation",
"name": "internalLink",
"value": "zdQzavvHDl1k",
"isInheritable": false,
"position": 20
},
{ {
"type": "label", "type": "label",
"name": "iconClass", "name": "iconClass",
@ -1280,13 +1287,6 @@
"value": "releasing", "value": "releasing",
"isInheritable": false, "isInheritable": false,
"position": 40 "position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "ccIoz7nqgDRK",
"isInheritable": false,
"position": 50
} }
], ],
"format": "markdown", "format": "markdown",

View File

@ -1,5 +1,5 @@
# Documentation # 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 _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. * The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.

View File

@ -1,6 +1,6 @@
{ {
"formatVersion": 2, "formatVersion": 2,
"appVersion": "0.99.4", "appVersion": "0.99.5",
"files": [ "files": [
{ {
"isClone": false, "isClone": false,

View File

@ -1,6 +1,6 @@
{ {
"formatVersion": 2, "formatVersion": 2,
"appVersion": "0.99.4", "appVersion": "0.99.5",
"files": [ "files": [
{ {
"isClone": false, "isClone": false,
@ -9884,18 +9884,47 @@
"value": "kanban-board", "value": "kanban-board",
"isInheritable": false, "isInheritable": false,
"position": 20 "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", "format": "markdown",
"dataFileName": "Kanban Board.md", "dataFileName": "Kanban Board.md",
"attachments": [ "attachments": [
{ {
"attachmentId": "usSSa0WI6dDK", "attachmentId": "IrIeh59VGjHq",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "Kanban Board_image.png" "dataFileName": "Kanban Board_image.png"
},
{
"attachmentId": "usSSa0WI6dDK",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Kanban Board_image.png"
} }
] ]
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,5 +1,5 @@
# Kanban Board # 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. 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. * 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. * If there are many notes within the column, move the mouse over the column and use the mouse wheel to scroll.
## Keyboard interaction ### Keyboard interaction
The board view has mild support for keyboard-based navigation: The board view has mild support for keyboard-based navigation:
@ -52,13 +52,37 @@ The board view has mild support for keyboard-based navigation:
## Configuration ## 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] ### Grouping by relations
> It's currently not possible to set a relation as the grouping criteria. There are plans to add support for it.
## 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. 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"
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 15 KiB