A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix(board): keep widget UI density consistent (#7192)
Thomas798e0310bc48
diff --git a/apps/nextjs/src/components/board/layout/scaled-board-canvas.module.css b/apps/nextjs/src/components/board/layout/scaled-board-canvas.module.cssindex 49f71bf7b..dd4cbab46 100644--- a/apps/nextjs/src/components/board/layout/scaled-board-canvas.module.css+++ b/apps/nextjs/src/components/board/layout/scaled-board-canvas.module.css@@ -20,8 +20,7 @@/** Keep dashboard UI at its normal readable density while the fixed canvas- * is fitted below 100%. Above 100%, the canvas still behaves like browser- * zoom and enlarges everything together.+ * is fitted to the available width.*/--mantine-scale: var(--board-canvas-ui-scale, 1);/* Keep a subtle boundary inset without widening the visual gap too much. */diff --git a/apps/nextjs/src/components/board/layout/test/scaled-board-canvas.spec.ts b/apps/nextjs/src/components/board/layout/test/scaled-board-canvas.spec.tsindex 50fae3420..7555e97fa 100644--- a/apps/nextjs/src/components/board/layout/test/scaled-board-canvas.spec.ts+++ b/apps/nextjs/src/components/board/layout/test/scaled-board-canvas.spec.ts@@ -44,11 +44,11 @@ describe("board canvas scale policy", () => {expect(calculateBoardCanvasScale(availableWidth, logicalWidth)).toBe(1);});- test("keeps UI typography and density at 100% while fitting the canvas down", () => {+ test("keeps UI typography and density at 100% while fitting the canvas", () => {expect(calculateBoardUiScale(0.75)).toBeCloseTo(4 / 3);expect(calculateBoardUiScale(0.84)).toBeCloseTo(1 / 0.84);expect(calculateBoardUiScale(1)).toBe(1);- expect(calculateBoardUiScale(1.5)).toBe(1);+ expect(calculateBoardUiScale(1.5)).toBeCloseTo(2 / 3);});test.each([0, -1, Number.NaN, Number.POSITIVE_INFINITY])(diff --git a/packages/boards/src/scale.ts b/packages/boards/src/scale.tsindex 95ba4d0eb..f31917530 100644--- a/packages/boards/src/scale.ts+++ b/packages/boards/src/scale.ts@@ -1,6 +1,5 @@export const calculateBoardUiScale = (canvasScale: number) => {if (!Number.isFinite(canvasScale) || canvasScale <= 0) return 1;- if (canvasScale < 1) return 1 / canvasScale;- return 1;+ return 1 / canvasScale;};