From 70aa115933a6c669da2ba6fea4bab0347c8e572d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 15 Feb 2026 18:03:36 +0200 Subject: [PATCH] fix(collections): collection properties not shown if there are no children --- .../note_bars/CollectionProperties.css | 2 +- apps/client/src/widgets/type_widgets/Book.tsx | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.css b/apps/client/src/widgets/note_bars/CollectionProperties.css index 99700f77a7..c8802a42a0 100644 --- a/apps/client/src/widgets/note_bars/CollectionProperties.css +++ b/apps/client/src/widgets/note_bars/CollectionProperties.css @@ -5,7 +5,7 @@ align-items: center; width: 100%; max-width: unset; - font-size: 0.8em; + font-size: 0.8rem; .dropdown-menu { input.form-control { diff --git a/apps/client/src/widgets/type_widgets/Book.tsx b/apps/client/src/widgets/type_widgets/Book.tsx index 8dd1030c5d..6d07f5fbe3 100644 --- a/apps/client/src/widgets/type_widgets/Book.tsx +++ b/apps/client/src/widgets/type_widgets/Book.tsx @@ -1,11 +1,14 @@ +import "./Book.css"; + +import { useEffect, useState } from "preact/hooks"; + import { t } from "../../services/i18n"; +import { ViewTypeOptions } from "../collections/interface"; +import CollectionProperties from "../note_bars/CollectionProperties"; import Alert from "../react/Alert"; import { useNoteLabelWithDefault, useTriliumEvent } from "../react/hooks"; import RawHtml from "../react/RawHtml"; import { TypeWidgetProps } from "./type_widget"; -import "./Book.css"; -import { useEffect, useState } from "preact/hooks"; -import { ViewTypeOptions } from "../collections/interface"; const VIEW_TYPES: ViewTypeOptions[] = [ "list", "grid", "presentation" ]; @@ -27,10 +30,14 @@ export default function Book({ note }: TypeWidgetProps) { return ( <> {shouldDisplayNoChildrenWarning && ( - - - + <> + + + + + + )} - ) + ); }