fix: contain board canvas overflow
This commit is contained in:
1 parent
c6c96c4870
commit
d5dbf6fc17
4 files changed
+7
-3
No files matched your search
@@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.gutter {
|
.gutter {
|
||||||
position: sticky;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
overflow-x: auto;
|
||||||
overscroll-behavior-inline: contain;
|
overscroll-behavior-inline: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ interface Props {
|
|||||||
|
|
||||||
export const MainHeader = ({ logo, actions, hasNavigation = true }: Props) => {
|
export const MainHeader = ({ logo, actions, hasNavigation = true }: Props) => {
|
||||||
return (
|
return (
|
||||||
<AppShellHeader maw="100vw" zIndex={201} style={{ overflowX: "hidden" }}>
|
<AppShellHeader maw="100vw" zIndex={201} style={{ overflowX: "hidden" }} data-app-shell-header>
|
||||||
<Group h="100%" gap="xl" px="md" justify="apart" wrap="nowrap">
|
<Group h="100%" gap="xl" px="md" justify="apart" wrap="nowrap">
|
||||||
<Group h="100%" align="center" style={{ flex: 1 }} wrap="nowrap">
|
<Group h="100%" align="center" style={{ flex: 1 }} wrap="nowrap">
|
||||||
{hasNavigation && <ClientBurger />}
|
{hasNavigation && <ClientBurger />}
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ describe("Board grid", () => {
|
|||||||
const zoomedTileBox = await expectBoundingBoxAsync(logicalTile);
|
const zoomedTileBox = await expectBoundingBoxAsync(logicalTile);
|
||||||
expect(zoomedTileBox.width).toBeGreaterThan(normalZoomTileBox.width * 1.25);
|
expect(zoomedTileBox.width).toBeGreaterThan(normalZoomTileBox.width * 1.25);
|
||||||
await expectHorizontalOverflowAsync(canvas);
|
await expectHorizontalOverflowAsync(canvas);
|
||||||
|
await expectDocumentNotHorizontallyScrollableAsync(page);
|
||||||
const overflowRailY = (await expectBoundingBoxAsync(rail)).y;
|
const overflowRailY = (await expectBoundingBoxAsync(rail)).y;
|
||||||
await page.evaluate(() => window.scrollTo({ top: 300, behavior: "auto" }));
|
await page.evaluate(() => window.scrollTo({ top: 300, behavior: "auto" }));
|
||||||
await expect.poll(async () => (await expectBoundingBoxAsync(rail)).y).toBeGreaterThanOrEqual(0);
|
await expect.poll(async () => (await expectBoundingBoxAsync(rail)).y).toBeGreaterThanOrEqual(0);
|
||||||
@@ -348,6 +349,8 @@ describe("Board grid", () => {
|
|||||||
|
|
||||||
await page.setViewportSize({ width: 600, height: 1200 });
|
await page.setViewportSize({ width: 600, height: 1200 });
|
||||||
await expect(canvas).toHaveAttribute("data-canvas-scale", String(minimumCanvasScale));
|
await expect(canvas).toHaveAttribute("data-canvas-scale", String(minimumCanvasScale));
|
||||||
|
await expectHorizontalOverflowAsync(canvas);
|
||||||
|
await expectDocumentNotHorizontallyScrollableAsync(page);
|
||||||
for (const direction of ["n", "ne", "e", "se", "s", "sw", "w", "nw"] as const) {
|
for (const direction of ["n", "ne", "e", "se", "s", "sw", "w", "nw"] as const) {
|
||||||
await expectTargetSizeAsync(firstItem.locator(`:scope > [data-grid-resize-handle="${direction}"]`));
|
await expectTargetSizeAsync(firstItem.locator(`:scope > [data-grid-resize-handle="${direction}"]`));
|
||||||
}
|
}
|
||||||
@@ -823,8 +826,8 @@ describe("Board grid", () => {
|
|||||||
|
|
||||||
const stickyRailY = (await expectBoundingBoxAsync(rail)).y;
|
const stickyRailY = (await expectBoundingBoxAsync(rail)).y;
|
||||||
await page.evaluate(() => window.scrollTo({ top: 500, behavior: "auto" }));
|
await page.evaluate(() => window.scrollTo({ top: 500, behavior: "auto" }));
|
||||||
|
await expect.poll(async () => (await expectBoundingBoxAsync(rail)).y).toBeGreaterThanOrEqual(0);
|
||||||
const scrolledRailY = (await expectBoundingBoxAsync(rail)).y;
|
const scrolledRailY = (await expectBoundingBoxAsync(rail)).y;
|
||||||
expect(scrolledRailY).toBeGreaterThanOrEqual(0);
|
|
||||||
expect(scrolledRailY).toBeLessThanOrEqual(stickyRailY + 0.5);
|
expect(scrolledRailY).toBeLessThanOrEqual(stickyRailY + 0.5);
|
||||||
await page.evaluate(() => window.scrollTo({ top: 0, behavior: "auto" }));
|
await page.evaluate(() => window.scrollTo({ top: 0, behavior: "auto" }));
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user