admin: only the content region scrolls on wide screens
the shell grid grew past the viewport and scrolled the document, carrying the sidebar with it. the shell is now viewport-height at the wide breakpoint with main as the sole scroll container; the nav list scrolls inside the pinned rail; router scroll restoration targets the inner scroller so navigation resets it and back/forward restores it.
This commit is contained in:
@@ -146,6 +146,15 @@ test("shell renders the overview route with all nav links", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("main carries the ids the router scrolls and restores", async () => {
|
||||
renderShell();
|
||||
await screen.findByRole("heading", { name: "Overview" });
|
||||
|
||||
const main = screen.getByRole("main");
|
||||
expect(main.id).toBe("main-content");
|
||||
expect(main.getAttribute("data-scroll-restoration-id")).toBe("main");
|
||||
});
|
||||
|
||||
test("the three configuration pages sit under a labelled group, after the rest", async () => {
|
||||
renderShell();
|
||||
await screen.findByRole("heading", { name: "Overview" });
|
||||
|
||||
Reference in New Issue
Block a user