From 150d69e5aca96a5d39ef81a3b6d87234d956a47a Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Tue, 9 Jun 2026 10:29:18 -0400 Subject: [PATCH] Public tree view: full-width canvas like the member view The public layout forced max-w-5xl on every /p page, so the tree chart was cramped. Mirror the member shell: the public layout now drops the max-width for the tree page (/p/) only, giving the chart the full canvas (74vh to match the member view), while the page keeps its heading and people list in a centered max-w-5xl column. Person detail (/p//persons/) and /explore stay narrow. tsc clean; next build passes. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Justin Paul --- frontend/app/p/[treeId]/page.tsx | 7 ++++--- frontend/app/p/layout.tsx | 14 ++++++++++++-- frontend/components/public-tree-chart.tsx | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/frontend/app/p/[treeId]/page.tsx b/frontend/app/p/[treeId]/page.tsx index aa95744..6373be7 100644 --- a/frontend/app/p/[treeId]/page.tsx +++ b/frontend/app/p/[treeId]/page.tsx @@ -102,7 +102,7 @@ export default function PublicTreePage() { return (
-
+

{tree?.name}

{tree?.description &&

{tree.description}

}

@@ -110,6 +110,7 @@ export default function PublicTreePage() {

+ {/* Chart spans the full canvas (the layout removes max-width for /p/). */} {focusId && people.length > 0 && ( )} -
+

All people

- + {shown.length === 0 ? (
No matches.
diff --git a/frontend/app/p/layout.tsx b/frontend/app/p/layout.tsx index e03a460..0db3017 100644 --- a/frontend/app/p/layout.tsx +++ b/frontend/app/p/layout.tsx @@ -1,11 +1,21 @@ +"use client"; + +import { usePathname } from "next/navigation"; + import { PublicHeader } from "@/components/public-header"; -// Public viewing surface — no auth, no app sidebar. A slim header only. +// Public viewing surface — no auth, no app sidebar. The tree page (/p/) +// wants the whole canvas like the member tree view; the person detail page +// reads better in a centered column. export default function PublicLayout({ children }: { children: React.ReactNode }) { + const pathname = usePathname(); + const fullWidth = /^\/p\/[^/]+$/.test(pathname); return (
-
{children}
+
+ {children} +
); } diff --git a/frontend/components/public-tree-chart.tsx b/frontend/components/public-tree-chart.tsx index 26c380f..3ee121d 100644 --- a/frontend/components/public-tree-chart.tsx +++ b/frontend/components/public-tree-chart.tsx @@ -160,7 +160,7 @@ export function PublicTreeChart({