Skip to content

Build your personal knowledge base with Trilium Notes

client/collections/board: add the "board:" prefix to the board-dedicated attributes

Adorian Doran932a326ec702
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index be97ec3eb2..d6dc164411 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -749,7 +749,7 @@
"enable_inbox_column": "For board collections, shows the inbox column, which lists all child notes that are not assigned to a board column.",
"board_card_redirect_to": "On a board card, opening the card jumps to the note this points at instead of opening the card itself.",
"sort_columns": "For board collections, the order the columns sort their cards in, which a column follows unless it is given an order of its own. Holds <code>title</code>, <code>creationDate</code> or <code>attr:</code> followed by a promoted attribute's name.",
- "sort_columns_descending": "For board collections, runs the order in <code>#sortColumns</code> backwards.",
+ "sort_columns_descending": "For board collections, runs the order in <code>#board:sortColumns</code> backwards.",
"calendar_view": "Which view a calendar opens in: <code>timeGridDay</code>, <code>timeGridWeek</code>, <code>dayGridMonth</code>, <code>multiMonthYear</code> or <code>listMonth</code>.",
"calendar_initial_date": "The date a calendar opens on. Opens on today when unset.",
"calendar_hide_weekends": "Hides Saturday and Sunday from the calendar. Applies whatever its value.",
diff --git a/apps/client/src/widgets/attribute_widgets/attr_help.ts b/apps/client/src/widgets/attribute_widgets/attr_help.ts
index b6d85fb8ba..b9a33dc786 100644
--- a/apps/client/src/widgets/attribute_widgets/attr_help.ts
+++ b/apps/client/src/widgets/attribute_widgets/attr_help.ts
@@ -156,10 +156,10 @@ export const ATTR_HELP: AttrHelpMap = {
isHidden: t("attribute_detail.is_hidden"),
maxNestingDepth: t("attribute_detail.max_nesting_depth"),
includeArchived: t("attribute_detail.include_archived"),
- enableInboxColumn: t("attribute_detail.enable_inbox_column"),
- boardCardWidth: t("attribute_detail.board_card_width"),
- sortColumns: t("attribute_detail.sort_columns"),
- sortColumnsDescending: t("attribute_detail.sort_columns_descending"),
+ "board:showInbox": t("attribute_detail.enable_inbox_column"),
+ "board:columnWidth": t("attribute_detail.board_card_width"),
+ "board:sortColumns": t("attribute_detail.sort_columns"),
+ "board:sortColumnsDescending": t("attribute_detail.sort_columns_descending"),
"calendar:view": t("attribute_detail.calendar_view"),
"calendar:initialDate": t("attribute_detail.calendar_initial_date"),
"calendar:hideWeekends": t("attribute_detail.calendar_hide_weekends"),
@@ -194,6 +194,7 @@ export const ATTR_HELP: AttrHelpMap = {
internalBookmark: t("attribute_detail.internal_bookmark")
},
relation: {
+ "board:cardRedirectTo": t("attribute_detail.board_card_redirect_to"),
boardCardRedirectTo: t("attribute_detail.board_card_redirect_to"),
runOnNoteCreation: t("attribute_detail.run_on_note_creation"),
runOnChildNoteCreation: t("attribute_detail.run_on_child_note_creation"),
diff --git a/apps/client/src/widgets/collections/board/api.spec.ts b/apps/client/src/widgets/collections/board/api.spec.ts
index 02cd5e0390..547731dac1 100644
--- a/apps/client/src/widgets/collections/board/api.spec.ts
+++ b/apps/client/src/widgets/collections/board/api.spec.ts
@@ -593,12 +593,28 @@ describe("BoardApi card operations", () => {
"openInPopup", { noteIdOrPath: items[0].note.noteId });
});
+ /**
+ * The relation is read under both names, so a board written before the rename still
+ * redirects. Stated as literals: these are what a reader types, not what the code calls it.
+ */
+ it.each([ "board:cardRedirectTo", "boardCardRedirectTo" ])(
+ "redirects through the %s relation", (relation) => {
+ const { api, items } = createBoardWithCards();
+ const setNote = vi.fn();
+ api.noteContext = { setNote } as never;
+
+ addRedirect(items[0].note, "targetNote", relation);
+ api.openCard(items[0].note);
+
+ expect(setNote).toHaveBeenCalledWith("targetNote");
+ });
+
/** Files the relation straight into froca, which is all `openCard` reads. */
- function addRedirect(note: FNote, target: string) {
- const attributeId = `redirect-${note.noteId}`;
+ function addRedirect(note: FNote, target: string, name = "board:cardRedirectTo") {
+ const attributeId = `redirect-${name}-${note.noteId}`;
froca.attributes[attributeId] = new FAttribute(froca, {
noteId: note.noteId, attributeId, type: "relation",
- name: "boardCardRedirectTo", value: target, position: 0, isInheritable: false
+ name, value: target, position: 0, isInheritable: false
});
note.attributes.push(attributeId);
// Cleared rather than emptied: the cache is rebuilt only for a note it has no entry for.
@@ -2136,7 +2152,7 @@ describe("how a column orders its cards", () => {
const { api } = createApi(
{ columns: [ { value: "To Do", orderBy: "manual" } ] },
[ "To Do" ],
- buildNote({ title: "Board", "#sortColumns": "title" }));
+ buildNote({ title: "Board", "#board:sortColumns": "title" }));
expect(api.getColumnSort("To Do").orderBy).toBeUndefined();
expect(api.getEffectiveColumnSort("To Do").orderBy).toBeUndefined();
@@ -2210,7 +2226,7 @@ describe("a column that takes the board's order", () => {
/** A board holding an order of its own, which a column can be stored as taking. */
function boardSorting() {
return buildNote({
- title: "Board", "#sortColumns": "attr:dueDate", "#sortColumnsDescending": ""
+ title: "Board", "#board:sortColumns": "attr:dueDate", "#board:sortColumnsDescending": ""
});
}
@@ -2262,8 +2278,8 @@ describe("the order the board offers its columns", () => {
const { api } = createApi({}, [], buildNote({
title: "Board",
- "#sortColumns": "attr:dueDate",
- "#sortColumnsDescending": ""
+ "#board:sortColumns": "attr:dueDate",
+ "#board:sortColumnsDescending": ""
}));
expect(api.getDefaultSort()).toEqual({ orderBy: "attr:dueDate", isDescending: true });
});
@@ -2271,7 +2287,7 @@ describe("the order the board offers its columns", () => {
// A key written by hand, or by a newer version, leaves the board offering the manual order.
it("reads a key it does not know as the manual order", () => {
const { api } = createApi({}, [], buildNote({
- title: "Board", "#sortColumns": "dateModified"
+ title: "Board", "#board:sortColumns": "dateModified"
}));
expect(api.getDefaultSort().orderBy).toBeUndefined();
@@ -2286,13 +2302,13 @@ describe("the order the board offers its columns", () => {
const { api, board } = createApi({}, []);
await api.setDefaultSort("title");
- expect(setAttribute).toHaveBeenCalledWith(board, "label", "sortColumns", "title");
+ expect(setAttribute).toHaveBeenCalledWith(board, "label", "board:sortColumns", "title");
await api.setDefaultSort(undefined);
- expect(setAttribute).toHaveBeenLastCalledWith(board, "label", "sortColumns", null);
+ expect(setAttribute).toHaveBeenLastCalledWith(board, "label", "board:sortColumns", null);
await api.setDefaultSortDirection(true);
- expect(setBoolean).toHaveBeenCalledWith(board, "sortColumnsDescending", true);
+ expect(setBoolean).toHaveBeenCalledWith(board, "board:sortColumnsDescending", true);
});
it("puts every column back to the board's order, keeping what else each one holds", async () => {
@@ -2533,7 +2549,7 @@ describe("how wide the board draws its columns", () => {
it("reads the label, falling back to the default for a width it does not offer", () => {
const width = (label?: string) => createApi(
- {}, [], buildNote(label ? { title: "Board", "#boardCardWidth": label }
+ {}, [], buildNote(label ? { title: "Board", "#board:columnWidth": label }
: { title: "Board" })).api.columnWidth;
expect(width()).toBe("narrow");
@@ -2549,12 +2565,12 @@ describe("how wide the board draws its columns", () => {
await api.setColumnWidth("wide");
- expect(setLabel).toHaveBeenCalledWith(board.noteId, "boardCardWidth", "wide");
+ expect(setLabel).toHaveBeenCalledWith(board.noteId, "board:columnWidth", "wide");
});
/** Kept tidy: a board drawn at the default width carries no label for it at all. */
it("takes the label off for the default width", async () => {
- const board = buildNote({ title: "Board", "#boardCardWidth": "wide" });
+ const board = buildNote({ title: "Board", "#board:columnWidth": "wide" });
const setLabel = vi.spyOn(attributes, "setLabel").mockResolvedValue(undefined);
const removeLabel = vi.spyOn(attributes, "removeOwnedLabelByName")
.mockResolvedValue(true);
@@ -2562,7 +2578,7 @@ describe("how wide the board draws its columns", () => {
await api.setColumnWidth("narrow");
- expect(removeLabel).toHaveBeenCalledWith(board, "boardCardWidth");
+ expect(removeLabel).toHaveBeenCalledWith(board, "board:columnWidth");
expect(setLabel).not.toHaveBeenCalled();
});
@@ -2570,7 +2586,7 @@ describe("how wide the board draws its columns", () => {
it("writes the default out where the board inherits another width", async () => {
const parent = buildNote({
title: "Parent",
- "#boardCardWidth(inheritable)": "wide",
+ "#board:columnWidth(inheritable)": "wide",
children: [ { title: "Board" } ]
});
const board = froca.getNoteFromCache(parent.getChildNoteIds()[0]);
@@ -2584,7 +2600,7 @@ describe("how wide the board draws its columns", () => {
await api.setColumnWidth("narrow");
- expect(setLabel).toHaveBeenCalledWith(board.noteId, "boardCardWidth", "narrow");
+ expect(setLabel).toHaveBeenCalledWith(board.noteId, "board:columnWidth", "narrow");
expect(removeLabel).not.toHaveBeenCalled();
});
});
diff --git a/apps/client/src/widgets/collections/board/api.ts b/apps/client/src/widgets/collections/board/api.ts
index 367ac42b70..0c94ab0a9c 100644
--- a/apps/client/src/widgets/collections/board/api.ts
+++ b/apps/client/src/widgets/collections/board/api.ts
@@ -40,7 +40,10 @@ import { SORT_DESCENDING_LABEL, SORT_LABEL } from "./sort";
export type CardPlacement = "top" | "bottom";
/** The relation a card carries to stand in for another note rather than open an editor of its own. */
-export const CARD_REDIRECT_RELATION = "boardCardRedirectTo";
+export const CARD_REDIRECT_RELATION = "board:cardRedirectTo";
+
+/** The name the relation above shipped under. Still read, so boards already using it keep working. */
+export const CARD_REDIRECT_RELATION_LEGACY = "boardCardRedirectTo";
/** One write's claim on a column, held until that write lands or is taken back. */
interface ColumnClaim {
@@ -711,7 +714,7 @@ export default class BoardApi {
*/
async setInboxEnabled(enabled: boolean) {
await attributes.setBooleanWithInheritance(
- this.parentNote, "enableInboxColumn", enabled);
+ this.parentNote, "board:showInbox", enabled);
}
/** Hides the inbox column, which is what its own menu offers. */
@@ -813,7 +816,7 @@ export default class BoardApi {
}
/**
- * Reads `#sortColumns` and `#sortColumnsDescending` off the board note, which is where the
+ * Reads `#board:sortColumns` and `#board:sortColumnsDescending` off the board note, which is where the
* order the columns default to is stored rather than in `board.json`.
*/
getDefaultSort() {
@@ -1450,12 +1453,13 @@ export default class BoardApi {
/**
* Answers the card's own open gesture, a click or Space.
*
- * A card carrying `boardCardRedirectTo` stands in for the note that relation points at, so it
+ * A card carrying `board:cardRedirectTo` stands in for the note that relation points at, so it
* navigates there instead of opening an editor of its own. Quick edit calls `openNote` and
* still opens the card's own editor.
*/
openCard(note: FNote) {
- const target = note.getRelationValue(CARD_REDIRECT_RELATION);
+ const target = note.getRelationValue(CARD_REDIRECT_RELATION)
+ ?? note.getRelationValue(CARD_REDIRECT_RELATION_LEGACY);
if (target) {
const context = this.noteContext ?? appContext.tabManager?.getActiveContext();
void context?.setNote(target);
@@ -1508,7 +1512,7 @@ export default class BoardApi {
* the board, and one already there does not move at all.
*/
get isInboxEnabled() {
- return !!this.parentNote?.isLabelTruthy("enableInboxColumn");
+ return !!this.parentNote?.isLabelTruthy("board:showInbox");
}
/**
diff --git a/apps/client/src/widgets/collections/board/card.tsx b/apps/client/src/widgets/collections/board/card.tsx
index 1e0f55aafa..741275e87e 100644
--- a/apps/client/src/widgets/collections/board/card.tsx
+++ b/apps/client/src/widgets/collections/board/card.tsx
@@ -6,7 +6,7 @@ import {
import FBranch from "../../../entities/fbranch";
import FNote from "../../../entities/fnote";
-import BoardApi, { CARD_REDIRECT_RELATION } from "./api";
+import BoardApi, { CARD_REDIRECT_RELATION, CARD_REDIRECT_RELATION_LEGACY } from "./api";
import {
BoardActionsContext, BoardHighlightTokensContext, BoardKeptCardsContext,
BoardOverlayHostContext, BoardPromotedAttributesContext, BoardSelectionModeContext, TitleEditor
@@ -87,8 +87,9 @@ function Card({
const [ isArchived ] = useNoteLabelBoolean(note, "archived");
const [ iconClass, setIconClass ] = useNoteLabel(note, "iconClass");
// Only whether the card redirects, which is what draws its title as a link. Where it goes is
- // read when the card is opened.
+ // read when the card is opened. Both names are watched, as `openCard` reads both.
const [ redirectTo ] = useNoteRelation(note, CARD_REDIRECT_RELATION);
+ const [ legacyRedirectTo ] = useNoteRelation(note, CARD_REDIRECT_RELATION_LEGACY);
// The card stays the one just made until another is, so what has already been shown is
// remembered here rather than played again by every redraw of the column.
const [ isRevealed, setIsRevealed ] = useState(false);
@@ -298,7 +299,7 @@ function Card({
<div
ref={cardRef}
className={clsx("board-note", colorClass, {
- shortcut: !!redirectTo,
+ shortcut: !!(redirectTo ?? legacyRedirectTo),
dragging: isDragging,
editing: isEditing,
archived: isArchived,
diff --git a/apps/client/src/widgets/collections/board/columns.ts b/apps/client/src/widgets/collections/board/columns.ts
index 2dd338fac6..672a32a5c9 100644
--- a/apps/client/src/widgets/collections/board/columns.ts
+++ b/apps/client/src/widgets/collections/board/columns.ts
@@ -33,7 +33,7 @@ export const INBOX_COLUMN = "";
export const INBOX_COLUMN_ICON = "bx bxs-inbox";
/** The label naming how wide the board draws its columns. */
-export const COLUMN_WIDTH_LABEL = "boardCardWidth";
+export const COLUMN_WIDTH_LABEL = "board:columnWidth";
/** The widths the board offers, in the order the properties dialog lists them. */
export const COLUMN_WIDTHS = [ "narrow", "medium", "wide" ] as const;
diff --git a/apps/client/src/widgets/collections/board/index.css b/apps/client/src/widgets/collections/board/index.css
index 7663b314a8..25f056ba69 100644
--- a/apps/client/src/widgets/collections/board/index.css
+++ b/apps/client/src/widgets/collections/board/index.css
@@ -171,7 +171,7 @@ body.mobile .board-view-container.board-dragging {
cursor: grabbing !important;
}
-/* Set from `#boardCardWidth`, and only while the board carries it: without one of these classes
+/* Set from `#board:columnWidth`, and only while the board carries it: without one of these classes
`--board-column-width` keeps the value it inherits, which a theme can set. The columns and
everything measured against them read the width off that one variable. */
.board-view.board-narrow-columns {
diff --git a/apps/client/src/widgets/collections/board/index.spec.tsx b/apps/client/src/widgets/collections/board/index.spec.tsx
index a64a50e9f1..a69390c79c 100644
--- a/apps/client/src/widgets/collections/board/index.spec.tsx
+++ b/apps/client/src/widgets/collections/board/index.spec.tsx
@@ -4211,8 +4211,8 @@ describe("a column that sorts its cards", () => {
"#viewType": "board",
...(boardSort
? {
- "#sortColumns": boardSort.orderBy,
- ...(boardSort.isDescending ? { "#sortColumnsDescending": "" } : {})
+ "#board:sortColumns": boardSort.orderBy,
+ ...(boardSort.isDescending ? { "#board:sortColumnsDescending": "" } : {})
}
: {}),
...(promoted
@@ -4706,7 +4706,7 @@ describe("how wide the board draws its columns", () => {
title: "Board",
"#collection": "",
"#viewType": "board",
- ...(width ? { "#boardCardWidth": width } : {}),
+ ...(width ? { "#board:columnWidth": width } : {}),
children: [ { title: "First", "#status": "To Do" } ]
});
@@ -4900,7 +4900,7 @@ describe("Card toolbar on mobile", () => {
title: "Board",
"#collection": "",
"#viewType": "board",
- ...(withInbox ? { "#enableInboxColumn": "true" } : {}),
+ ...(withInbox ? { "#board:showInbox": "true" } : {}),
children: [
{ id: "tool1", title: "First", "#status": "To Do" },
{ id: "tool2", title: "Second", "#status": "To Do" },
diff --git a/apps/client/src/widgets/collections/board/index.tsx b/apps/client/src/widgets/collections/board/index.tsx
index 4769183ba3..09da3943d0 100644
--- a/apps/client/src/widgets/collections/board/index.tsx
+++ b/apps/client/src/widgets/collections/board/index.tsx
@@ -380,7 +380,7 @@ export default function BoardView({
() => adoptLegacyColumns(storedConfig, openedOnGroupBy), [ storedConfig, openedOnGroupBy ]);
let viewConfig = adoptedConfig ?? storedConfig;
const [ includeArchived ] = useNoteLabelBoolean(parentNote, "includeArchived");
- const [ inboxEnabled ] = useNoteLabelBoolean(parentNote, "enableInboxColumn");
+ const [ inboxEnabled ] = useNoteLabelBoolean(parentNote, "board:showInbox");
// Read undefaulted: a board naming no width wears no class, so `--board-column-width` keeps
// whatever it inherits.
const [ storedColumnWidth ] = useNoteLabel(parentNote, COLUMN_WIDTH_LABEL);
diff --git a/apps/client/src/widgets/collections/board/keyboard.spec.tsx b/apps/client/src/widgets/collections/board/keyboard.spec.tsx
index 86d6e9ff99..a5029facd8 100644
--- a/apps/client/src/widgets/collections/board/keyboard.spec.tsx
+++ b/apps/client/src/widgets/collections/board/keyboard.spec.tsx
@@ -1312,7 +1312,7 @@ describe("Board keyboard", () => {
title: "Board",
"#collection": "",
"#viewType": "board",
- ...(inbox ? { "#enableInboxColumn": "true" } : {}),
+ ...(inbox ? { "#board:showInbox": "true" } : {}),
children: [
{
title: "First",
diff --git a/apps/client/src/widgets/collections/board/properties.spec.tsx b/apps/client/src/widgets/collections/board/properties.spec.tsx
index 4c0860469c..d8bb685e40 100644
--- a/apps/client/src/widgets/collections/board/properties.spec.tsx
+++ b/apps/client/src/widgets/collections/board/properties.spec.tsx
@@ -96,8 +96,8 @@ describe("Board properties", () => {
},
getPromotedAttributes: () => [ { name: "dueDate", title: "Due" } ],
getDefaultSort: () => ({
- orderBy: labels.sortColumns as SortKey | undefined,
- isDescending: !!labels.sortColumnsDescending
+ orderBy: labels["board:sortColumns"] as SortKey | undefined,
+ isDescending: !!labels["board:sortColumnsDescending"]
}),
setDefaultSort: async (orderBy: SortKey | undefined) => {
sorting.push(`sort:${orderBy ?? "none"}`);
@@ -182,7 +182,7 @@ describe("Board properties", () => {
});
it("names the attribute as the board names it, and turns the arrow over", () => {
- labels = { sortColumns: "attr:dueDate", sortColumnsDescending: "true" };
+ labels = { "board:sortColumns": "attr:dueDate", "board:sortColumnsDescending": "true" };
// Drawn afresh: the labels are read as the card mounts, and a redraw of the same card
// would keep what it read the first time.
act(() => { render(null, container); });
diff --git a/apps/client/src/widgets/collections/board/properties.tsx b/apps/client/src/widgets/collections/board/properties.tsx
index 9197d26f5f..55688abe82 100644
--- a/apps/client/src/widgets/collections/board/properties.tsx
+++ b/apps/client/src/widgets/collections/board/properties.tsx
@@ -67,7 +67,7 @@ export default function BoardProperties({ api, note, shown, onClose }: {
/** What the board draws besides its own cards: the inbox column and what is filed as archived. */
function General({ api, note }: { api: BoardApi, note: FNote }) {
- const [ inboxShown ] = useNoteLabelBoolean(note, "enableInboxColumn");
+ const [ inboxShown ] = useNoteLabelBoolean(note, "board:showInbox");
const [ archivedShown ] = useNoteLabelBoolean(note, "includeArchived");
const [ columnWidth ] =
useNoteLabelWithDefault(note, COLUMN_WIDTH_LABEL, DEFAULT_COLUMN_WIDTH);
diff --git a/apps/client/src/widgets/collections/board/sort.ts b/apps/client/src/widgets/collections/board/sort.ts
index c87d87b84c..dc86ee5ed7 100644
--- a/apps/client/src/widgets/collections/board/sort.ts
+++ b/apps/client/src/widgets/collections/board/sort.ts
@@ -6,8 +6,8 @@ import { parseSortKey } from "../sorting";
import type { ColumnSort } from "./data";
/** The labels the board keeps the order its columns take by default. */
-export const SORT_LABEL = "sortColumns";
-export const SORT_DESCENDING_LABEL = "sortColumnsDescending";
+export const SORT_LABEL = "board:sortColumns";
+export const SORT_DESCENDING_LABEL = "board:sortColumnsDescending";
/**
* Reads the order the board stores in its labels, absent when it stores no key.
diff --git a/apps/client/src/widgets/react/NotePropertyMenu.spec.tsx b/apps/client/src/widgets/react/NotePropertyMenu.spec.tsx
index 7385b09147..9a24774c98 100644
--- a/apps/client/src/widgets/react/NotePropertyMenu.spec.tsx
+++ b/apps/client/src/widgets/react/NotePropertyMenu.spec.tsx
@@ -64,7 +64,7 @@ describe("A collection property's explanation", () => {
label: "Inbox column",
icon: "bx bx-inbox",
helpTooltip: "Shows the notes with no column yet.",
- bindToLabel: "enableInboxColumn"
+ bindToLabel: "board:showInbox"
});
expect(element.textContent).toContain("Inbox column");
diff --git a/apps/client/src/widgets/ribbon/collection-properties-config.tsx b/apps/client/src/widgets/ribbon/collection-properties-config.tsx
index bccaeead2f..3eb9604a59 100644
--- a/apps/client/src/widgets/ribbon/collection-properties-config.tsx
+++ b/apps/client/src/widgets/ribbon/collection-properties-config.tsx
@@ -160,7 +160,7 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {
type: "checkbox",
icon: "bx bx-inbox",
helpTooltip: t("book_properties_config.board-inbox-column-help"),
- bindToLabel: "enableInboxColumn"
+ bindToLabel: "board:showInbox"
}
]
},
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 7405768be0..d20c5ad466 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
@@ -195,11 +195,11 @@
<aside class="admonition warning">
<p>Using the <code>#sorted</code> attribute on Kanban boards <strong>is no longer recommended</strong>,
because it applies to every column and prevents manual sorting. Instead,
- use <code>#sortColumns</code>, which is designed exclusively for board collections
- and can take one of the following values: <code>title</code>, <code>creationDate</code>,
- or <code>attr:_&lt;attribute name&gt;_</code>, for example, <code>#sortColumns=attr:dueDate</code>.
- Using the <code>#sortColumnsDescending</code> label will switch to descending
- order.</p>
+ use <code>#board:sortColumns</code>, which is designed exclusively for board
+ collections and can take one of the following values: <code>title</code>, <code>creationDate</code>,
+ or <code>attr:_&lt;attribute name&gt;_</code>, for example, <code>#board:sortColumns=attr:dueDate</code>.
+ Using the <code>#board:sortColumnsDescending</code> label will switch to
+ descending order.</p>
</aside>
<h3>Setting a limit</h3>
<p>For each column, you can limit the number of cards it contains (also known
@@ -253,7 +253,7 @@
be moved. It does not support a card limit. Otherwise, it operates like
a regular column: its title, icon, and color can be changed; it can be
sorted manually or automatically; and it can be collapsed.</p>
-<p>You can also show the inbox column by applying the <code>#enableInboxColumn</code> label
+<p>You can also show the inbox column by applying the <code>#board:showInbox</code> label
(read more about&nbsp;<a class="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>)
to the board note.</p>
<p>Optionally, the inbox column can also list nested notes from the board
@@ -264,7 +264,7 @@
medium, and wide. To change the width, open the <strong>Note menu</strong> → <strong>Board properties</strong> → <strong>Column width</strong> (under
the <strong>General</strong> section). This option applies to every column
on the board, except in the mobile version.</p>
-<p>The same option is also available through the <code>#boardCardWidth</code> label
+<p>The same option is also available through the <code>#board:columnWidth</code> label
(read more about&nbsp;<a class="reference-link" href="#root/_help_zEY4DaJG4YT5">Attributes</a>)
on the board note, which accepts “<code>narrow</code>”, “<code>medium</code>”,
or “<code>wide</code>” as its value.</p>
diff --git a/docs/User Guide/User Guide/Collections/Kanban Board.md b/docs/User Guide/User Guide/Collections/Kanban Board.md
index c673e7c364..c0544f8595 100644
--- a/docs/User Guide/User Guide/Collections/Kanban Board.md
+++ b/docs/User Guide/User Guide/Collections/Kanban Board.md
@@ -119,7 +119,7 @@ Once the default is changed, all columns set to the **Board's default** sorting
Columns using a sorting option other than **Board's default** will not be affected by the new default. To override all columns so that they use the default sorting options, use the **Reset sorting options to default for all columns** command in Board properties.
> [!WARNING]
-> Using the `#sorted` attribute on Kanban boards **is no longer recommended**, because it applies to every column and prevents manual sorting. Instead, use `#sortColumns`, which is designed exclusively for board collections and can take one of the following values: `title`, `creationDate`, or `attr:_<attribute name>_`, for example, `#sortColumns=attr:dueDate`. Using the `#sortColumnsDescending` label will switch to descending order.
+> Using the `#sorted` attribute on Kanban boards **is no longer recommended**, because it applies to every column and prevents manual sorting. Instead, use `#board:sortColumns`, which is designed exclusively for board collections and can take one of the following values: `title`, `creationDate`, or `attr:_<attribute name>_`, for example, `#board:sortColumns=attr:dueDate`. Using the `#board:sortColumnsDescending` label will switch to descending order.
### Setting a limit
@@ -151,7 +151,7 @@ The inbox column is a special column containing cards that are not assigned to a
The inbox column is hidden by default. To show it, go to <span class="tn-icon bx bx-cog"></span> **Collection options** and toggle **Show inbox column**. The inbox column is distinguishable by its transparent background. It is always the first column and cannot be moved. It does not support a card limit. Otherwise, it operates like a regular column: its title, icon, and color can be changed; it can be sorted manually or automatically; and it can be collapsed.
-You can also show the inbox column by applying the `#enableInboxColumn` label (read more about <a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a>) to the board note.
+You can also show the inbox column by applying the `#board:showInbox` label (read more about <a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a>) to the board note.
Optionally, the inbox column can also list nested notes from the board collection's subtree. To enable this, open the **column menu** and check <span class="tn-icon bx bx-subdirectory-right"></span> **Include nested notes**.
@@ -159,7 +159,7 @@ Optionally, the inbox column can also list nested notes from the board collectio
There are three predefined widths for board columns: narrow (default), medium, and wide. To change the width, open the **Note menu** → **Board properties** → **Column width** (under the **General** section). This option applies to every column on the board, except in the mobile version.
-The same option is also available through the `#boardCardWidth` label (read more about <a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a>) on the board note, which accepts “`narrow`”, “`medium`”, or “`wide`” as its value.
+The same option is also available through the `#board:columnWidth` label (read more about <a class="reference-link" href="../Advanced%20Usage/Attributes.md">Attributes</a>) on the board note, which accepts “`narrow`”, “`medium`”, or “`wide`” as its value.
You can also redefine these three widths by using custom app CSS (read more about <a class="reference-link" href="../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a>) and assigning the desired pixel values as follows:
diff --git a/packages/commons/src/lib/builtin_attributes.ts b/packages/commons/src/lib/builtin_attributes.ts
index b81b42c3a7..b0f03e482f 100644
--- a/packages/commons/src/lib/builtin_attributes.ts
+++ b/packages/commons/src/lib/builtin_attributes.ts
@@ -268,15 +268,17 @@ const BUILTIN_ATTRIBUTES = [
{ type: "label", name: "isHidden", valueType: "boolean" },
{ type: "label", name: "maxNestingDepth", valueType: "number", hasUserValue: true },
{ type: "label", name: "includeArchived", valueType: "boolean", hasUserValue: true },
- { type: "label", name: "enableInboxColumn", valueType: "boolean", hasUserValue: true },
+ { type: "label", name: "board:showInbox", valueType: "boolean", hasUserValue: true },
// Carried by a card that stands in for another note: opening it navigates there instead.
+ { type: "relation", name: "board:cardRedirectTo" },
+ // The name the relation above shipped under, still read so existing boards keep working.
{ type: "relation", name: "boardCardRedirectTo" },
// How wide the board draws its columns. Absent for the narrow default.
- { type: "label", name: "boardCardWidth", valueType: "select", hasUserValue: true,
+ { type: "label", name: "board:columnWidth", valueType: "select", hasUserValue: true,
selectOptions: [ "narrow", "medium", "wide" ] },
// The order a board offers for its columns, which its properties apply to every column at once.
- { type: "label", name: "sortColumns", valueType: "text", hasUserValue: true },
- { type: "label", name: "sortColumnsDescending", valueType: "boolean", hasUserValue: true },
+ { type: "label", name: "board:sortColumns", valueType: "text", hasUserValue: true },
+ { type: "label", name: "board:sortColumnsDescending", valueType: "boolean", hasUserValue: true },
// FullCalendar's own view names, which is what the calendar hands back when the view is switched.
{ type: "label", name: "calendar:view", valueType: "select", hasUserValue: true, selectOptions: [
"timeGridDay", "timeGridWeek", "dayGridMonth", "multiMonthYear", "listMonth"