fix: stabilize presentation side layout
This commit is contained in:
@@ -134,4 +134,13 @@ describe("PresentationRoute", () => {
|
||||
expect(screen.queryByRole("dialog", { name: /evidence inspector/i })).not.toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: /inspect evidence/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("opens Scene 10 approval from the canonical hash", async () => {
|
||||
window.location.hash = "#scene/interrupt-evidence/approval";
|
||||
const { PresentationRoute } = await import("./PresentationRoute.js");
|
||||
render(<PresentationRoute />);
|
||||
|
||||
expect(await screen.findByRole("heading", { name: /Interrupt, Resume, Evidence/i })).toBeInTheDocument();
|
||||
expect(screen.getByLabelText("demo workflow stage")).toHaveAttribute("data-demo-layout", "approval");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -290,4 +290,26 @@ describe("SceneBody", () => {
|
||||
expect(screen.getByText("Repair")).toBeInTheDocument();
|
||||
expect(screen.getByText("Compile or save")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders evidence before discussion links so the chip lane cannot cover evidence text", () => {
|
||||
const location: PresentationLocation = { kind: "main", sceneId: "positioning", beatId: "landscape", focusPath: [] };
|
||||
const { container } = render(
|
||||
<SceneBody
|
||||
location={location}
|
||||
demo={demo}
|
||||
selectedNodeId={null}
|
||||
selectNode={noop}
|
||||
openEvidence={noop}
|
||||
openDiscussion={noop}
|
||||
onFocusPathChange={noop}
|
||||
motionDisabled={false}
|
||||
/>,
|
||||
);
|
||||
|
||||
const evidence = container.querySelector(".scene-body__evidence");
|
||||
const links = container.querySelector(".scene-body__discussion-links");
|
||||
expect(evidence).toBeInTheDocument();
|
||||
expect(links).toBeInTheDocument();
|
||||
expect(evidence?.compareDocumentPosition(links!)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -99,18 +99,19 @@
|
||||
}
|
||||
|
||||
.scene-body__evidence {
|
||||
flex-shrink: 0;
|
||||
margin: 0.55rem 0 0;
|
||||
color: oklch(0.62 0.05 250);
|
||||
font-size: 0.8rem;
|
||||
color: oklch(0.72 0.03 250);
|
||||
}
|
||||
|
||||
.scene-body__discussion-links {
|
||||
position: absolute;
|
||||
left: 2rem;
|
||||
bottom: 1.4rem;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.45rem;
|
||||
max-width: min(52rem, calc(100% - 4rem));
|
||||
gap: 0.35rem;
|
||||
margin-top: 0.45rem;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
.scene-body__discussion-links button {
|
||||
@@ -516,11 +517,18 @@
|
||||
|
||||
.presentation-stage__chat {
|
||||
position: absolute;
|
||||
inset: 0 auto var(--presentation-footer-height, 2.5rem) 0;
|
||||
width: min(18rem, 44%);
|
||||
left: 0.75rem;
|
||||
bottom: calc(var(--presentation-footer-height, 2.5rem) + 0.5rem);
|
||||
width: min(22rem, calc(100% - 1.5rem));
|
||||
max-height: 11rem;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.presentation-stage__chat .operator-chat {
|
||||
max-height: 11rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.presentation-stage[data-evidence-presentation="inspector"] .presentation-stage__chat {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
|
||||
Reference in New Issue
Block a user