From aa82d6acf32c54cbb554c95897877bf10a580a0a Mon Sep 17 00:00:00 2001 From: Patrick Erber Date: Mon, 2 Feb 2026 18:58:44 +0100 Subject: [PATCH 1/2] feat(ux): improve default section design --- .../viewer/EmptySectionChildrenList.tsx | 82 +++++++++++++------ 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx b/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx index f6924e71..497cf9d0 100644 --- a/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx +++ b/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx @@ -1,11 +1,11 @@ import { Button } from '@/components/ui/button' -import { NODE_KIND_SECTION, Page } from '@/lib/api/pages' +import { NODE_KIND_PAGE, NODE_KIND_SECTION, Page } from '@/lib/api/pages' import { formatRelativeTime } from '@/lib/formatDate' import { DIALOG_ADD_PAGE } from '@/lib/registries' import { useIsReadOnly } from '@/lib/useIsReadOnly' import { useDialogsStore } from '@/stores/dialogs' import { useTreeStore } from '@/stores/tree' -import { FilePlus } from 'lucide-react' +import { FilePlus, FolderPlus } from 'lucide-react' import { Link } from 'react-router-dom' type EmptySectionChildrenListProps = { @@ -51,9 +51,16 @@ export default function EmptySectionChildrenList({ aria-label={`Subpages of ${page.title}`} className="child-list__section" > -

- Pages and Sections in '{page.title}' +

+ Overview of the section '{page.title}'

+

+ This page is the default overview of the section and lists its pages + and sections. +
+ When editing this page, you can define a custom start page for the + section. +

{!isReadOnly && ( - +
+ +
)} )} @@ -96,20 +107,45 @@ export default function EmptySectionChildrenList({ aria-label={`Subpages of ${page.title}`} className="child-list__section" > -
-

- No Pages and Sections in '{page.title}' +
+

+ This section is empty.

+

+ The section {page.title} does not contain any pages or + sections yet. Start by adding a new page or create a new section. +

{!isReadOnly && ( - +
+ + +
)} )} From 781717425259fe1ef7c9ae71b15e788af9ccef7c Mon Sep 17 00:00:00 2001 From: perber Date: Mon, 2 Feb 2026 19:12:21 +0100 Subject: [PATCH 2/2] Update ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/features/viewer/EmptySectionChildrenList.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx b/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx index 497cf9d0..e593c77d 100644 --- a/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx +++ b/ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx @@ -89,7 +89,10 @@ export default function EmptySectionChildrenList({