fix: size dashboard rails to viewport

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:07:07 +02:00
1 parent d3534dfcf8
commit 06aa5caf0b
4 files changed
+10 -7

No files matched your search

@@ -10,9 +10,9 @@ The board uses fixed logical units:
Items keep the same logical dimensions at every viewport. The viewport reserves
the painted size while the inner canvas remains at its logical dimensions, so a
widget's `clientWidth`, `clientHeight`, and `ResizeObserver` measurements stay
stable. The visual canvas always fits the available width, the main root keeps
at least one viewport of height, and edit-mode previews extend it downward as
needed.
stable. The visual canvas always fits the available width, every root lane
keeps at least one viewport of height, and edit-mode previews extend it downward
as needed.
The read-only renderer should:
@@ -147,10 +147,7 @@ export const SectionGrid = ({
);
const displayedItems = items.map((item) => withPlacement(item, placementById.get(item.id)));
const displayedInnerSections = innerSections.map((item) => withPlacement(item, placementById.get(item.id)));
const minimumViewportRowCount = useMinimumViewportRowCount(
section.kind === "empty" && railPlacement === "main",
canvasScale,
);
const minimumViewportRowCount = useMinimumViewportRowCount(section.kind === "empty", canvasScale);
const contentRowCount = Math.max(1, getLayoutRowCount(displayPlacements));
const rowCount = Math.max(contentRowCount, requestedRowCount, minimumViewportRowCount);
const logicalWidth = getLogicalTrackSize(columnCount);