From 52d861bbc7988cb39c8838bd26462df6ef22075a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Fri, 13 Nov 2026 22:52:53 +0500 Subject: [PATCH 1/3] =?UTF-8?q?UI:=20board=20in=20one=20row,=20project=20p?= =?UTF-8?q?anel=20moved=20into=20a=20=E2=8B=AF=20settings=20dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(app)/p/[key]/page.tsx | 4 +++- apps/web/components/Board.tsx | 2 +- apps/web/components/SettingsDialog.tsx | 33 ++++++++++++++++++++++++++ apps/web/components/Workspace.tsx | 7 +++--- 4 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 apps/web/components/SettingsDialog.tsx diff --git a/apps/web/app/(app)/p/[key]/page.tsx b/apps/web/app/(app)/p/[key]/page.tsx index f2351ba8..1f808ac7 100644 --- a/apps/web/app/(app)/p/[key]/page.tsx +++ b/apps/web/app/(app)/p/[key]/page.tsx @@ -11,6 +11,7 @@ import { IncidentsSection } from "@/components/Incidents"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Input, Textarea } from "@/components/ui/input"; +import { SettingsDialog } from "@/components/SettingsDialog"; import { Workspace } from "@/components/Workspace"; import { requireUser } from "@/lib/auth"; import { db } from "@/lib/db"; @@ -162,7 +163,7 @@ export default async function ProjectPage({ params, searchParams }: { params: Pr ); return ( - + {created && !error && ( @@ -174,6 +175,7 @@ export default async function ProjectPage({ params, searchParams }: { params: Pr )} {aside}} crumbs={Проекты} title={ <> diff --git a/apps/web/components/Board.tsx b/apps/web/components/Board.tsx index 32b17faa..3db65ab7 100644 --- a/apps/web/components/Board.tsx +++ b/apps/web/components/Board.tsx @@ -45,7 +45,7 @@ export function Board({ cards, back }: { cards: Card[]; back: string }) { start(() => moveTaskCard(f)); }; return ( -
+
{COLUMNS.map((c) => { const list = cards.filter((x) => x.column === c.id); return ( diff --git a/apps/web/components/SettingsDialog.tsx b/apps/web/components/SettingsDialog.tsx new file mode 100644 index 00000000..132f3e95 --- /dev/null +++ b/apps/web/components/SettingsDialog.tsx @@ -0,0 +1,33 @@ +"use client"; + +import { useRef, type ReactNode } from "react"; +import { Ellipsis, X } from "lucide-react"; +import { Button } from "@/components/ui/button"; + +/** "⋯" button that opens a side dialog (native ) with page settings rendered on the server. */ +export function SettingsDialog({ title, children }: { title: string; children: ReactNode }) { + const ref = useRef(null); + return ( + <> + + e.target === ref.current && ref.current.close()} + className="m-0 ml-auto h-dvh max-h-dvh w-[400px] max-w-full border-l bg-sidebar p-0 text-foreground backdrop:bg-black/50" + > +
+
+

{title}

+ +
+ {children} +
+
+ + ); +} diff --git a/apps/web/components/Workspace.tsx b/apps/web/components/Workspace.tsx index 30bb2a48..2cfb6220 100644 --- a/apps/web/components/Workspace.tsx +++ b/apps/web/components/Workspace.tsx @@ -6,14 +6,15 @@ import { cn } from "@/lib/utils"; /** * Centre + right panel of the console (PEP-38). The page decides what the right panel shows; * without `aside` it gets the default activity panel, `aside={null}` hides it. + * `wide` lets the centre grow past the reading width (the board page, with its panel moved into a dialog). * Below xl the panel goes under the page content (`asideWideOnly`: shown on xl only), the footer is always last. */ -export function Workspace({ children, aside, asideWideOnly = false }: { children: ReactNode; aside?: ReactNode; asideWideOnly?: boolean }) { +export function Workspace({ children, aside, asideWideOnly = false, wide = false }: { children: ReactNode; aside?: ReactNode; asideWideOnly?: boolean; wide?: boolean }) { const panel = aside === undefined ? : aside; return ( -
+
-
{children}
+
{children}
{panel && (