From 97fbf1e4cac0e7dd4dc96f6453bf1e673ce19a79 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 16 Apr 2026 22:57:45 +0200 Subject: [PATCH] feat(#248): replace flat TagsListPanel with collapsible ARIA tree (TagTreeNode) Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/admin/tags/+layout.svelte | 2 +- .../src/routes/admin/tags/TagTreeNode.svelte | 84 +++++++++ .../routes/admin/tags/TagsListPanel.svelte | 91 ++++----- .../routes/admin/tags/layout.svelte.spec.ts | 176 ++++++++++++------ 4 files changed, 237 insertions(+), 116 deletions(-) create mode 100644 frontend/src/routes/admin/tags/TagTreeNode.svelte diff --git a/frontend/src/routes/admin/tags/+layout.svelte b/frontend/src/routes/admin/tags/+layout.svelte index 190f5e29..9409e20f 100644 --- a/frontend/src/routes/admin/tags/+layout.svelte +++ b/frontend/src/routes/admin/tags/+layout.svelte @@ -8,7 +8,7 @@ const isAtListRoot = $derived(page.url.pathname === '/admin/tags');
- +
diff --git a/frontend/src/routes/admin/tags/TagTreeNode.svelte b/frontend/src/routes/admin/tags/TagTreeNode.svelte new file mode 100644 index 00000000..e6e9c28d --- /dev/null +++ b/frontend/src/routes/admin/tags/TagTreeNode.svelte @@ -0,0 +1,84 @@ + + +
  • +
    + {#if hasChildren} + + {:else} + + {/if} + + {#if depth === 0 && node.color} + + {/if} + + + {node.name} + {#if (node.documentCount ?? 0) > 0} + ({node.documentCount}) + {/if} + +
    + + {#if hasChildren && !isCollapsed} +
      + {#each node.children! as child (child.id)} + + {/each} +
    + {/if} +
  • diff --git a/frontend/src/routes/admin/tags/TagsListPanel.svelte b/frontend/src/routes/admin/tags/TagsListPanel.svelte index a8bd95bc..c7dcc164 100644 --- a/frontend/src/routes/admin/tags/TagsListPanel.svelte +++ b/frontend/src/routes/admin/tags/TagsListPanel.svelte @@ -1,48 +1,42 @@