fix(boards): disable mobile sidebars (#6565)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-14 11:32:09 +02:00
1 parent 3943741838
commit 4a4b04d471
3 files changed
+38 -2

No files matched your search

+9 -2
View File
@@ -1,3 +1,5 @@
import type { LayoutRole } from "./board";
export const sectionKinds = ["empty", "container"] as const;
export type SectionKind = (typeof sectionKinds)[number];
@@ -21,12 +23,17 @@ export const getBoardLaneColumnCount = (
columnCount: number;
leftGutterColumnCount?: number | null;
rightGutterColumnCount?: number | null;
role?: LayoutRole;
},
lane: BoardLane,
) => {
const total = Math.max(1, Math.floor(layout.columnCount));
const left = Math.min(Math.max(0, Math.floor(layout.leftGutterColumnCount ?? 0)), total - 1);
const right = Math.min(Math.max(0, Math.floor(layout.rightGutterColumnCount ?? 0)), total - left - 1);
const left =
layout.role === "mobile" ? 0 : Math.min(Math.max(0, Math.floor(layout.leftGutterColumnCount ?? 0)), total - 1);
const right =
layout.role === "mobile"
? 0
: Math.min(Math.max(0, Math.floor(layout.rightGutterColumnCount ?? 0)), total - left - 1);
if (lane === "left") return left;
if (lane === "right") return right;
return total - left - right;