fix: contain ticket operation rail layout
This commit is contained in:
@@ -260,6 +260,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.ticket-detail-page {
|
.ticket-detail-page {
|
||||||
|
container: ticket-detail / inline-size;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
max-width: 88rem;
|
max-width: 88rem;
|
||||||
}
|
}
|
||||||
@@ -296,9 +297,14 @@
|
|||||||
}
|
}
|
||||||
.ticket-detail-main, .ticket-control-rail {
|
.ticket-detail-main, .ticket-control-rail {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
min-width: 0;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
}
|
}
|
||||||
|
.ticket-detail-main {
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
.ticket-detail-section, .ticket-control-card, .ticket-editor {
|
.ticket-detail-section, .ticket-control-card, .ticket-editor {
|
||||||
|
min-width: 0;
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 0.8rem;
|
border-radius: 0.8rem;
|
||||||
background: var(--bg-raised);
|
background: var(--bg-raised);
|
||||||
@@ -434,6 +440,15 @@
|
|||||||
.ticket-event-author {
|
.ticket-event-author {
|
||||||
margin: 0.2rem 0;
|
margin: 0.2rem 0;
|
||||||
}
|
}
|
||||||
|
@container ticket-detail (max-width: 48rem) {
|
||||||
|
.ticket-detail-grid {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
.ticket-control-rail {
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 64rem) {
|
@media (max-width: 64rem) {
|
||||||
.ticket-detail-grid {
|
.ticket-detail-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ import type {
|
|||||||
} from "../../generated/ticket-api.ts";
|
} from "../../generated/ticket-api.ts";
|
||||||
|
|
||||||
declare const Deno: {
|
declare const Deno: {
|
||||||
test(name: string, fn: () => void): void;
|
test(name: string, fn: () => void | Promise<void>): void;
|
||||||
|
readTextFile(path: URL): Promise<string>;
|
||||||
};
|
};
|
||||||
|
|
||||||
function assertEquals<T>(actual: T, expected: T): void {
|
function assertEquals<T>(actual: T, expected: T): void {
|
||||||
@@ -108,3 +109,20 @@ Deno.test("ticket worker launch uses the common Worker route and bounded Ticket
|
|||||||
"Work on Ticket 00001KYRRDVH9 as its reviewer.",
|
"Work on Ticket 00001KYRRDVH9 as its reviewer.",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test("ticket detail keeps the operation rail outside main content", async () => {
|
||||||
|
const css = await Deno.readTextFile(
|
||||||
|
new URL("../styles/tickets.css", import.meta.url),
|
||||||
|
);
|
||||||
|
|
||||||
|
assertEquals(css.includes("container: ticket-detail / inline-size;"), true);
|
||||||
|
assertEquals(
|
||||||
|
css.includes(".ticket-detail-main {\n overflow-wrap: anywhere;"),
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
assertEquals(
|
||||||
|
css.includes("@container ticket-detail (max-width: 48rem)"),
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
assertEquals(css.includes("min-width: 0;"), true);
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user