Skip to content

Build your personal knowledge base with Trilium Notes

fix(board): show attributes the cards define through a template or another parent (closes #11753)

Elian Doranb16bfed1270d
diff --git a/apps/client/src/widgets/collections/attribute_menu.spec.ts b/apps/client/src/widgets/collections/attribute_menu.spec.ts
index f8fba6aa75..6544951da8 100644
--- a/apps/client/src/widgets/collections/attribute_menu.spec.ts
+++ b/apps/client/src/widgets/collections/attribute_menu.spec.ts
@@ -247,6 +247,7 @@ function attribute(fields: Partial<PromotedAttribute> & { name: string }): Promo
drawnByCollection: false,
definitionValue: "",
isOwned: true,
+ isDefinedByItems: false,
isInheritable: true,
...fields
};
diff --git a/apps/client/src/widgets/collections/board/api.spec.ts b/apps/client/src/widgets/collections/board/api.spec.ts
index 218290f5d7..768f01a5d5 100644
--- a/apps/client/src/widgets/collections/board/api.spec.ts
+++ b/apps/client/src/widgets/collections/board/api.spec.ts
@@ -2127,6 +2127,32 @@ describe("the promoted attributes a card shows", () => {
expect(api.getStoredPromotedAttributes()).toBe(stored);
});
+ /** A card shows attributes defined by its template, so `getPromotedAttributes()` lists them. */
+ it("lists what the cards define through another note, after the board's own", () => {
+ buildNote({
+ id: "projectTemplate",
+ title: "Project",
+ "#label:project(inheritable)": "promoted,single,color",
+ "#label:owner(inheritable)": "promoted,single,relation"
+ });
+ const task = buildNote({ title: "Task", "~template": "projectTemplate" });
+ // `buildNote()` caches only the owned attributes. Deleting the entry makes
+ // `getAttributes()` rebuild it, including the template's attributes.
+ delete noteAttributeCache.attributes[task.noteId];
+ const plain = buildNote({ title: "Plain" });
+ const byColumn: ColumnMap = new Map([ [ "To Do", [
+ { note: task, branch: { branchId: "b_task" } as FBranch },
+ { note: plain, branch: { branchId: "b_plain" } as FBranch }
+ ] ] ]);
+ const { api } = createApi({}, [ "To Do" ], boardWithAttributes(), "status", byColumn);
+
+ expect(api.getVisiblePromotedAttributeNames()).toEqual([ "dueDate", "owner", "project" ]);
+ const [ , owner, project ] = api.getPromotedAttributes();
+ // The board and the template both define `owner`; the board's definition wins.
+ expect(owner).toMatchObject({ labelType: "text", isDefinedByItems: false });
+ expect(project).toMatchObject({ labelType: "color", isDefinedByItems: true });
+ });
+
it("stores the whole list, an attribute the board has dropped along with it", async () => {
const { api, saved } = createApi(
{ promotedAttributes: [ { name: "gone" } ] }, [], boardWithAttributes());
diff --git a/apps/client/src/widgets/collections/board/api.ts b/apps/client/src/widgets/collections/board/api.ts
index 77cd1f3771..7a79efeeba 100644
--- a/apps/client/src/widgets/collections/board/api.ts
+++ b/apps/client/src/widgets/collections/board/api.ts
@@ -30,7 +30,7 @@ import {
parseColumnWidth
} from "./columns";
import { readColumns, writeColumns } from "./column_storage";
-import { ColumnItem, ColumnMap } from "./data";
+import { cardNotes, ColumnItem, ColumnMap } from "./data";
import {
cardReference, ColumnReferenceLabel, columnReference, newColumnId, readColumnId
} from "./reference";
@@ -976,13 +976,19 @@ export default class BoardApi {
}
/**
- * Every promoted attribute the board defines, in the order the reader put them, the one it
- * groups by included: the properties dialog lists that one so it keeps its place among the
- * others for whenever the board is grouped by something else.
+ * Returns the promoted attributes defined by the board note or its cards, in the stored order.
+ * Includes the grouping attribute, so that Board Properties keeps its position for when the
+ * board is grouped by another attribute.
*/
getAllPromotedAttributes() {
return resolvePromotedAttributes(
- this.parentNote, this.viewConfig?.promotedAttributes, [ this.statusAttribute ]);
+ this.parentNote, this.viewConfig?.promotedAttributes, [ this.statusAttribute ],
+ this.getCardNotes());
+ }
+
+ /** Returns the note of every card, including the cards the filter hides. */
+ getCardNotes() {
+ return cardNotes(this.allByColumn ?? this.byColumn);
}
/** Those a card can show or a column sort by, which the columns themselves stand for. */
diff --git a/apps/client/src/widgets/collections/board/data.spec.ts b/apps/client/src/widgets/collections/board/data.spec.ts
index 12a9bbde69..d2d8610048 100644
--- a/apps/client/src/widgets/collections/board/data.spec.ts
+++ b/apps/client/src/widgets/collections/board/data.spec.ts
@@ -659,6 +659,7 @@ function definitions(name: string, type: "label" | "relation") {
drawnByCollection: false,
definitionValue: "",
isOwned: true,
+ isDefinedByItems: false,
isInheritable: true
} ] ]);
}
diff --git a/apps/client/src/widgets/collections/board/data.ts b/apps/client/src/widgets/collections/board/data.ts
index a184c55056..87360117b3 100644
--- a/apps/client/src/widgets/collections/board/data.ts
+++ b/apps/client/src/widgets/collections/board/data.ts
@@ -395,3 +395,14 @@ async function recursiveGroupBy(
seenNoteIds.add(note.noteId);
}
}
+
+/** Returns the note of every card in `byColumn`, once per note. */
+export function cardNotes(byColumn: ColumnMap | undefined): Set<FNote> {
+ const notes = new Set<FNote>();
+ for (const items of byColumn?.values() ?? []) {
+ for (const { note } of items) {
+ notes.add(note);
+ }
+ }
+ return notes;
+}
diff --git a/apps/client/src/widgets/collections/board/index.tsx b/apps/client/src/widgets/collections/board/index.tsx
index f7189e5abe..0d49db4131 100644
--- a/apps/client/src/widgets/collections/board/index.tsx
+++ b/apps/client/src/widgets/collections/board/index.tsx
@@ -26,7 +26,9 @@ import toast from "../../../services/toast";
import ws from "../../../services/ws";
import { escapeHtml, isMobile } from "../../../services/utils";
import { type NoteTypeOption, resolveNoteTypeOptions } from "../../../services/note_types";
-import { type PromotedAttributeSetting, resolvePromotedAttributes } from "../promoted_attributes";
+import {
+ type PromotedAttributeSetting, resolvePromotedAttributes, visiblePromotedAttributeNames
+} from "../promoted_attributes";
import type { SortContext } from "../sorting";
import CollectionProperties from "../../note_bars/CollectionProperties";
import { FormListItem } from "../../react/FormList";
@@ -72,8 +74,8 @@ import { useBoardReference } from "./reference";
import { openBoardContextMenu, openCreateColumnMenu } from "./context_menu";
import { useBoardSort } from "./sort";
import {
- affectsSortOrder, applyCardMoves, ColumnMap, filterColumnMap, getBoardData, resolveColumnSorts,
- resolveSortWatch, sortColumnMap, unfilteredCardIndex
+ affectsSortOrder, applyCardMoves, cardNotes, ColumnMap, filterColumnMap, getBoardData,
+ resolveColumnSorts, resolveSortWatch, sortColumnMap, unfilteredCardIndex
} from "./data";
import { useBoardKeyboard } from "./keyboard";
@@ -528,12 +530,13 @@ export default function BoardView({
collectionNoteIds: noteIds
});
const statusAttribute = groupBy.replace(/^[~#]/, "");
- // Every promoted attribute the board defines, hidden ones included: a column can sort by a
- // field its cards do not draw.
+ // Includes the definitions from the cards, and hidden attributes, because a column can sort by
+ // an attribute the cards do not show.
+ const cards = useMemo(() => cardNotes(allByColumn), [ allByColumn ]);
const promotedAttributes = useMemo(
() => resolvePromotedAttributes(
- parentNote, viewConfig?.promotedAttributes, [ statusAttribute ]),
- [ parentNote, viewConfig, statusAttribute, definitionRevision ]);
+ parentNote, viewConfig?.promotedAttributes, [ statusAttribute ], cards),
+ [ parentNote, viewConfig, statusAttribute, cards, definitionRevision ]);
// Keyed on the label rather than on the committed grouping, so the button names what the reader
// just picked while the columns below are still being read.
const groupingChoices = useMemo(
@@ -643,7 +646,7 @@ export default function BoardView({
// Held while the names are the same, since a new array would redraw every card on every render.
const shownAttributesRef = useRef<string[]>([]);
- const resolvedAttributes = api.getVisiblePromotedAttributeNames();
+ const resolvedAttributes = visiblePromotedAttributeNames(promotedAttributes);
if (resolvedAttributes.join(",") !== shownAttributesRef.current.join(",")) {
shownAttributesRef.current = resolvedAttributes;
}
@@ -1339,9 +1342,12 @@ export default function BoardView({
// The column list is read off the definition, which may be edited from the attribute panel,
// another split, or a synced instance. Re-reading it re-runs the refresh through the effect.
// Any definition the board carries, not only the grouping's: the others are what it offers
- // to group by instead.
+ // to group by instead. A definition that reaches a card, directly or through `~template`
+ // or `~inherit`, also changes `promotedAttributes`.
if (loadResults.getAttributeRows().some(attr =>
- attr.name?.startsWith("label:") && attributes.isAffecting(attr, parentNote))) {
+ (attr.name?.startsWith("label:") && attributes.isAffecting(attr, parentNote))
+ || (isDefinitionSource(attr.name)
+ && [ ...cards ].some(card => attributes.isAffecting(attr, card))))) {
setDefinitionRevision(revision => revision + 1);
}
@@ -1695,6 +1701,12 @@ export function findRefreshReason(loadResults: LoadResults, statusAttribute: str
return null;
}
+/** Returns whether an attribute with this name can change a note's `getAttributeDefinitions()`. */
+function isDefinitionSource(name: string | undefined) {
+ return !!name && (name.startsWith("label:") || name.startsWith("relation:")
+ || name === "template" || name === "inherit");
+}
+
function AddNewColumn({
api, isInRelationMode, columnCount, onCreated, isCreating, setIsCreating
}: {
diff --git a/apps/client/src/widgets/collections/board/properties.spec.tsx b/apps/client/src/widgets/collections/board/properties.spec.tsx
index d8bb685e40..6a7ac43701 100644
--- a/apps/client/src/widgets/collections/board/properties.spec.tsx
+++ b/apps/client/src/widgets/collections/board/properties.spec.tsx
@@ -91,6 +91,7 @@ describe("Board properties", () => {
getCardTemplateIds: () => [ "type:text:text/html" ],
setCardTemplateIds: async (ids: string[]) => { stored.push(ids); },
getStoredPromotedAttributes: () => [ { name: "dueDate" }, { name: "owner" } ],
+ getCardNotes: () => new Set(),
setPromotedAttributes: async (attributes: PromotedAttribute[]) => {
storedAttributes.push(attributes);
},
diff --git a/apps/client/src/widgets/collections/board/properties.tsx b/apps/client/src/widgets/collections/board/properties.tsx
index 55688abe82..5dcf4ceec7 100644
--- a/apps/client/src/widgets/collections/board/properties.tsx
+++ b/apps/client/src/widgets/collections/board/properties.tsx
@@ -50,6 +50,7 @@ export default function BoardProperties({ api, note, shown, onClose }: {
note={note}
settings={api.getStoredPromotedAttributes()}
drawnByCollection={[ api.statusAttribute ]}
+ itemNotes={api.getCardNotes()}
onChange={storeAttributes}
/>
diff --git a/apps/client/src/widgets/collections/promoted_attributes.spec.ts b/apps/client/src/widgets/collections/promoted_attributes.spec.ts
index f9a1dd0e81..fa996e4a58 100644
--- a/apps/client/src/widgets/collections/promoted_attributes.spec.ts
+++ b/apps/client/src/widgets/collections/promoted_attributes.spec.ts
@@ -60,6 +60,7 @@ describe("resolvePromotedAttributes", () => {
drawnByCollection: false,
definitionValue: "promoted,single,text",
isOwned: true,
+ isDefinedByItems: false,
isInheritable: true
},
// No alias, so the name is prefixed by the kind that defines it.
@@ -190,6 +191,27 @@ describe("resolvePromotedAttributes", () => {
.toEqual([ "dueDate", "requiresResearch" ]);
});
+ /**
+ * The items' definitions follow the collection's, once per name, including non-inheritable
+ * ones.
+ */
+ it("appends what only the items define, once per name", () => {
+ const resolved = resolvePromotedAttributes(collection(DEFINED), undefined, [], [
+ collection([ definition("label:project", { noteId: "template1" }) ], "task1"),
+ collection([
+ definition("label:project", { noteId: "template1" }),
+ definition("label:dueDate", { noteId: "template1", alias: "Deadline" }),
+ definition("label:estimate", { noteId: "task2", isInheritable: false })
+ ], "task2")
+ ]);
+
+ expect(resolved.map((attribute) => attribute.name))
+ .toEqual([ "dueDate", "requiresResearch", "owner", "project", "estimate" ]);
+ expect(resolved.map((attribute) => attribute.isDefinedByItems))
+ .toEqual([ false, false, false, true, true ]);
+ expect(resolved[0].title).toBe("Due");
+ });
+
/** Two notes in the chain can define the same attribute; the nearer one is what applies. */
it("keeps the first of two definitions of one name", () => {
const resolved = resolvePromotedAttributes(collection([
diff --git a/apps/client/src/widgets/collections/promoted_attributes.ts b/apps/client/src/widgets/collections/promoted_attributes.ts
index cb6d1fcee0..48db646750 100644
--- a/apps/client/src/widgets/collections/promoted_attributes.ts
+++ b/apps/client/src/widgets/collections/promoted_attributes.ts
@@ -1,5 +1,6 @@
import type { BulkAction } from "@triliumnext/commons";
+import type FAttribute from "../../entities/fattribute";
import type FNote from "../../entities/fnote";
import { executeBulkActions } from "../../services/bulk_action";
import { t } from "../../services/i18n";
@@ -42,6 +43,11 @@ export interface PromotedAttribute {
selectOptions?: string[];
/** Whether the note that defines it is the collection itself rather than an ancestor. */
isOwned: boolean;
+ /**
+ * Whether only the items define it, through a template or another parent, and the collection
+ * note does not. `PromotedAttributesCard` shows no edit or delete button for it.
+ */
+ isDefinedByItems: boolean;
/**
* Whether the definition passes to the notes below. Always true for a resolved attribute, and
* held so that the editor is handed the definition as it stands.
@@ -60,22 +66,27 @@ export interface PromotedAttribute {
* not promoted is still drawn on an item, only without an alias, and a note carrying
* `#hidePromotedAttributes` (which a board is usually given) reports no promoted ones at all.
*
- * Only the inheritable definitions are listed. One that is not describes the collection note alone
- * and never reaches the items, so there is nothing about it for the reader to arrange.
+ * Only the inheritable definitions of `note` are listed, because a non-inheritable one applies to
+ * the collection note alone.
+ *
+ * The definitions of `items` are appended after those of `note`, inheritable or not, because
+ * `UserAttributesDisplay` shows every definition an item has.
*/
export function resolvePromotedAttributes(
note: FNote | null | undefined,
settings: PromotedAttributeSetting[] | undefined,
/** Names the collection draws itself, such as the label a board groups by. */
- drawnByCollection: string[] = []
+ drawnByCollection: string[] = [],
+ /** The notes the collection shows, such as the cards of a board. */
+ items: Iterable<FNote> = []
): PromotedAttribute[] {
const defined = new Map<string, PromotedAttribute>();
- for (const definition of note?.getAttributeDefinitions() ?? []) {
+ const add = (definition: FAttribute, isDefinedByItems: boolean) => {
const [ type, name ] = definition.name.split(":", 2);
if ((type !== "label" && type !== "relation") || !name || defined.has(name)
- || !definition.isInheritable) {
- continue;
+ || (!isDefinedByItems && !definition.isInheritable)) {
+ return;
}
const parsed = definition.getDefinition();
@@ -91,8 +102,19 @@ export function resolvePromotedAttributes(
drawnByCollection: drawnByCollection.includes(name),
definitionValue: definition.value,
isOwned: definition.noteId === note?.noteId,
+ isDefinedByItems,
isInheritable: definition.isInheritable
});
+ };
+
+ for (const definition of note?.getAttributeDefinitions() ?? []) {
+ add(definition, false);
+ }
+
+ for (const item of items) {
+ for (const definition of item.getAttributeDefinitions()) {
+ add(definition, true);
+ }
}
const ordered: PromotedAttribute[] = [];
diff --git a/apps/client/src/widgets/collections/sort_menu.spec.ts b/apps/client/src/widgets/collections/sort_menu.spec.ts
index fb3d54fda0..2fecf365b7 100644
--- a/apps/client/src/widgets/collections/sort_menu.spec.ts
+++ b/apps/client/src/widgets/collections/sort_menu.spec.ts
@@ -232,6 +232,7 @@ function attribute(fields: Partial<PromotedAttribute> & { name: string }): Promo
drawnByCollection: false,
definitionValue: "",
isOwned: true,
+ isDefinedByItems: false,
isInheritable: true,
...fields
};
diff --git a/apps/client/src/widgets/collections/sorting.spec.ts b/apps/client/src/widgets/collections/sorting.spec.ts
index 096ff00f6d..37a47488a4 100644
--- a/apps/client/src/widgets/collections/sorting.spec.ts
+++ b/apps/client/src/widgets/collections/sorting.spec.ts
@@ -277,6 +277,7 @@ function sort(
labelType: isRelation ? undefined : fieldType,
selectOptions,
isOwned: true,
+ isDefinedByItems: false,
isInheritable: true
});
}
diff --git a/apps/client/src/widgets/react/PromotedAttributesCard.spec.tsx b/apps/client/src/widgets/react/PromotedAttributesCard.spec.tsx
index a5e6cf9105..bb69d2a009 100644
--- a/apps/client/src/widgets/react/PromotedAttributesCard.spec.tsx
+++ b/apps/client/src/widgets/react/PromotedAttributesCard.spec.tsx
@@ -83,12 +83,14 @@ describe("PromotedAttributesCard", () => {
let stored: PromotedAttribute[][];
let settings: PromotedAttributeSetting[] | undefined;
let drawnByCollection: string[] | undefined;
+ let itemNotes: FNote[] | undefined;
beforeEach(() => {
vi.clearAllMocks();
stored = [];
settings = undefined;
drawnByCollection = undefined;
+ itemNotes = undefined;
defined = [ definition("label:dueDate", { alias: "Due" }), definition("label:owner") ];
mocks.detail.opts = null;
mocks.confirm.mockResolvedValue(true);
@@ -175,6 +177,30 @@ describe("PromotedAttributesCard", () => {
expect(shown()).toEqual([ false, true ]);
});
+ /**
+ * A definition from an item's template is listed but has no edit or delete button, because
+ * `save()` and `erase()` write to the collection note rather than to the template.
+ */
+ it("lists what only the items define, without offering to edit or delete it", () => {
+ itemNotes = [ {
+ noteId: "task1",
+ getAttributeDefinitions: () => [
+ { ...definition("label:project", { alias: "Project" }), noteId: "template1" }
+ ]
+ } as unknown as FNote ];
+ draw();
+
+ expect(names()).toEqual([ "Due", unnamed("owner"), "Project" ]);
+ expect(shown()).toEqual([ true, true, true ]);
+ expect(segments().map((segment) => !!segment.querySelector(".promoted-attribute-edit")))
+ .toEqual([ true, true, false ]);
+ expect(segments().map((segment) => !!segment.querySelector(".promoted-attribute-delete")))
+ .toEqual([ true, true, false ]);
+
+ toggle(2);
+ expect(stored.at(-1)?.[2]).toMatchObject({ name: "project", hidden: true });
+ });
+
it("reports the whole list in its new order", () => {
draw();
@@ -407,6 +433,7 @@ describe("PromotedAttributesCard", () => {
note={NOTE}
settings={settings}
drawnByCollection={drawnByCollection}
+ itemNotes={itemNotes}
onChange={(attributes) => stored.push(attributes)}
/>
</ParentComponent.Provider>,
diff --git a/apps/client/src/widgets/react/PromotedAttributesCard.tsx b/apps/client/src/widgets/react/PromotedAttributesCard.tsx
index 4a610f37cc..fa8e226a66 100644
--- a/apps/client/src/widgets/react/PromotedAttributesCard.tsx
+++ b/apps/client/src/widgets/react/PromotedAttributesCard.tsx
@@ -50,6 +50,11 @@ export interface PromotedAttributesCardProps {
* arranged with the rest, but their switch is held off: they are already on the screen.
*/
drawnByCollection?: string[];
+ /**
+ * The notes the collection shows. Their definitions are listed after those of `note`, and the
+ * ones only these notes define have no edit or delete button.
+ */
+ itemNotes?: Iterable<FNote>;
/** Called with the whole list after every change, for the caller to store. */
onChange: (attributes: PromotedAttribute[]) => void;
}
@@ -62,10 +67,10 @@ export interface PromotedAttributesCardProps {
* reports the order and what is hidden, which the caller stores.
*/
export default function PromotedAttributesCard({
- heading, instruction, note, settings, drawnByCollection, onChange
+ heading, instruction, note, settings, drawnByCollection, itemNotes, onChange
}: PromotedAttributesCardProps) {
const [ shown, setShown ] =
- useState(() => resolvePromotedAttributes(note, settings, drawnByCollection));
+ useState(() => resolvePromotedAttributes(note, settings, drawnByCollection, itemNotes));
// What the collection draws can change while the card stands, a board being regrouped from
// its header. The rows are marked again where they are, keeping their order and what is
// hidden; the marks are not stored, so nothing is written back for them.
@@ -87,11 +92,12 @@ export default function PromotedAttributesCard({
// A definition created, renamed or deleted here arrives as an attribute change. Resolving
// against the current list is what keeps the order of the rest.
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
- const affects = loadResults.getAttributeRows()
- .some((attribute) => attributes.isAffecting(attribute, note));
+ const notes = [ note, ...itemNotes ?? [] ];
+ const affects = loadResults.getAttributeRows().some((attribute) =>
+ notes.some((affected) => attributes.isAffecting(attribute, affected)));
if (affects) {
- setShown((was) =>
- resolvePromotedAttributes(note, storedPromotedAttributes(was), drawnByCollection));
+ setShown((was) => resolvePromotedAttributes(
+ note, storedPromotedAttributes(was), drawnByCollection, itemNotes));
}
});
@@ -229,25 +235,27 @@ export default function PromotedAttributesCard({
outline
/>
- <ActionButton
- className="promoted-attribute-edit"
- icon="bx bx-edit"
- text={t("promoted_attributes.edit_attribute")}
- onClick={(event) => {
- event.stopPropagation();
- openEditor(event, attribute);
- }}
- />
+ {!attribute.isDefinedByItems && <>
+ <ActionButton
+ className="promoted-attribute-edit"
+ icon="bx bx-edit"
+ text={t("promoted_attributes.edit_attribute")}
+ onClick={(event) => {
+ event.stopPropagation();
+ openEditor(event, attribute);
+ }}
+ />
- <ActionButton
- className="promoted-attribute-delete"
- icon="bx bx-trash"
- text={t("promoted_attributes.delete_attribute")}
- onClick={(event) => {
- event.stopPropagation();
- confirmErase(attribute);
- }}
- />
+ <ActionButton
+ className="promoted-attribute-delete"
+ icon="bx bx-trash"
+ text={t("promoted_attributes.delete_attribute")}
+ onClick={(event) => {
+ event.stopPropagation();
+ confirmErase(attribute);
+ }}
+ />
+ </>}
<FormToggle
currentValue={!attribute.hidden && !attribute.drawnByCollection}
diff --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.html
index 2793192d81..b7bf926fee 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
@@ -497,9 +497,12 @@ class="admonition warning">
</ol>
<aside class="admonition note">
<p>For each newly created attribute, Trilium creates an attribute definition
- on the board collection note. For an attribute to be displayed on the face
- of a card, it must be declared as inheritable and promoted on the board
- note.</p>
+ on the board collection note. A card displays the attributes declared as
+ inheritable on the board note, as well as any attribute the card gets a
+ definition for from elsewhere, for example through <a class="reference-link"
+ href="#root/_help_KC1HB96bqqHX">Templates</a> or another parent note it
+ is cloned under. Attributes that only the cards define are listed after
+ the board's own.</p>
</aside>
<p>Here is an example of the attributes you can define for a typical Kanban
board used to track tasks:</p>
@@ -551,6 +554,9 @@ class="admonition warning">
<li>Press the&nbsp;<span class="tn-icon bx bx-trash"></span> button to delete
the attribute and all its values from every note in the board collection.</li>
</ul>
+<p>Attributes that the cards get from a template or another parent note can
+ be reordered and hidden here, but not modified or deleted. Edit them on
+ the note that defines them.</p>
<h3>Managing card templates</h3>
<p>When you create a new card, Trilium offers four templates by default: <strong>Text</strong>, <strong>Markdown</strong>, <strong>Canvas</strong>,
and <strong>Spreadsheet</strong>. You can customize this list to include
diff --git a/docs/User Guide/User Guide/Collections/Kanban Board.md b/docs/User Guide/User Guide/Collections/Kanban Board.md
index 6519cb1c9f..a4e816b60f 100644
--- a/docs/User Guide/User Guide/Collections/Kanban Board.md
+++ b/docs/User Guide/User Guide/Collections/Kanban Board.md
@@ -315,7 +315,7 @@ To create a new attribute, follow these steps:
5. Press **Save & close**.
> [!NOTE]
-> For each newly created attribute, Trilium creates an attribute definition on the board collection note. For an attribute to be displayed on the face of a card, it must be declared as inheritable and promoted on the board note.
+> For each newly created attribute, Trilium creates an attribute definition on the board collection note. A card displays the attributes declared as inheritable on the board note, as well as any attribute the card gets a definition for from elsewhere, for example through <a class="reference-link" href="../Advanced%20Usage/Templates.md">Templates</a> or another parent note it is cloned under. Attributes that only the cards define are listed after the board's own.
Here is an example of the attributes you can define for a typical Kanban board used to track tasks:
@@ -340,6 +340,8 @@ Go to **Note menu** → **Board properties**. Under the **Card attributes** sect
* Press the <span class="tn-icon bx bxs-edit"></span> button to modify the definition of an attribute.
* Press the <span class="tn-icon bx bx-trash"></span> button to delete the attribute and all its values from every note in the board collection.
+Attributes that the cards get from a template or another parent note can be reordered and hidden here, but not modified or deleted. Edit them on the note that defines them.
+
### Managing card templates
When you create a new card, Trilium offers four templates by default: **Text**, **Markdown**, **Canvas**, and **Spreadsheet**. You can customize this list to include other note types or custom templates with predefined placeholder content and prefilled card attributes.