fix: keep scaled board rails sticky

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-14 11:07:07 +02:00
1 parent 3b0633f6a8
commit cdbba92f31
3 files changed
+4 -9

No files matched your search

@@ -16,8 +16,6 @@
.canvas {
position: absolute;
inset: 0 auto auto 0;
transform-origin: top left;
will-change: transform;
/*
* Keep dashboard UI at its normal readable density while the fixed canvas
@@ -42,9 +40,3 @@
--mantine-h5-font-size: calc(1rem * var(--board-canvas-ui-scale, 1));
--mantine-h6-font-size: calc(0.875rem * var(--board-canvas-ui-scale, 1));
}
@media (prefers-reduced-motion: reduce) {
.canvas {
will-change: auto;
}
}
@@ -83,7 +83,7 @@ export const ScaledBoardCanvas = ({
style={{
"--board-canvas-inverse-scale": inverseScale,
"--board-canvas-ui-scale": uiScale,
transform: `scale(${scale})`,
zoom: scale,
}}
>
<BoardCanvasScaleContext.Provider value={scale}>{children}</BoardCanvasScaleContext.Provider>
+3
View File
@@ -861,6 +861,9 @@ describe("Board grid", () => {
return y >= 0 && y <= stickyRailY + 0.5;
})
.toBe(true);
const scrolledRailY = (await expectBoundingBoxAsync(rail)).y;
await page.evaluate(() => window.scrollTo({ top: 600, behavior: "auto" }));
await expect.poll(async () => (await expectBoundingBoxAsync(rail)).y).toBeCloseTo(scrolledRailY, 1);
await page.evaluate(() => window.scrollTo({ top: 0, behavior: "auto" }));
await setDocumentZoomAsync(page, 1.25);