fix: keep scaled board rails sticky
This commit is contained in:
1 parent
3b0633f6a8
commit
cdbba92f31
3 files changed
+4
-9
No files matched your search
@@ -16,8 +16,6 @@
|
|||||||
.canvas {
|
.canvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0 auto auto 0;
|
inset: 0 auto auto 0;
|
||||||
transform-origin: top left;
|
|
||||||
will-change: transform;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Keep dashboard UI at its normal readable density while the fixed canvas
|
* 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-h5-font-size: calc(1rem * var(--board-canvas-ui-scale, 1));
|
||||||
--mantine-h6-font-size: calc(0.875rem * 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={{
|
style={{
|
||||||
"--board-canvas-inverse-scale": inverseScale,
|
"--board-canvas-inverse-scale": inverseScale,
|
||||||
"--board-canvas-ui-scale": uiScale,
|
"--board-canvas-ui-scale": uiScale,
|
||||||
transform: `scale(${scale})`,
|
zoom: scale,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<BoardCanvasScaleContext.Provider value={scale}>{children}</BoardCanvasScaleContext.Provider>
|
<BoardCanvasScaleContext.Provider value={scale}>{children}</BoardCanvasScaleContext.Provider>
|
||||||
|
|||||||
@@ -861,6 +861,9 @@ describe("Board grid", () => {
|
|||||||
return y >= 0 && y <= stickyRailY + 0.5;
|
return y >= 0 && y <= stickyRailY + 0.5;
|
||||||
})
|
})
|
||||||
.toBe(true);
|
.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 page.evaluate(() => window.scrollTo({ top: 0, behavior: "auto" }));
|
||||||
|
|
||||||
await setDocumentZoomAsync(page, 1.25);
|
await setDocumentZoomAsync(page, 1.25);
|
||||||
|
|||||||
Reference in new issue
Block a user