fix: prevent authoring evidence clipping
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useLayoutEffect, useReducer, useRef } from "react";
|
||||
import { useReducer } from "react";
|
||||
import { projectPreparedAuthoringPhase } from "./authoring-projection.js";
|
||||
import { AuthoringPhaseVisual } from "./AuthoringPhaseVisual.js";
|
||||
import { PresentationAssistantPane } from "./PresentationAssistantPane.js";
|
||||
@@ -41,16 +41,6 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
|
||||
// if a future beat reaches this scene before its authoring mapping is added.
|
||||
const beatId = phases.find((phase) => phase.id === beat.id)?.id ?? "discover";
|
||||
const projection = projectPreparedAuthoringPhase(beatId);
|
||||
const lifecycleRef = useRef<HTMLElement>(null);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
// The assistant owns its aside markup; decorate that existing boundary here
|
||||
// so the scene can expose hierarchy metadata without widening its API.
|
||||
lifecycleRef.current
|
||||
?.querySelector<HTMLElement>('[aria-label="prepared authoring assistant"]')
|
||||
?.setAttribute("data-visual-role", "support");
|
||||
}, [beatId]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<StageCaption eyebrow="Prepared workflow" title={scene.title}>
|
||||
@@ -58,7 +48,6 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
|
||||
</StageCaption>
|
||||
<section
|
||||
className="prepared-lifecycle-scene"
|
||||
ref={lifecycleRef}
|
||||
aria-label="prepared workflow authoring lifecycle"
|
||||
data-active-phase={beatId}
|
||||
data-primary-surface="authoring-phase"
|
||||
@@ -67,6 +56,7 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
|
||||
>
|
||||
<PresentationAssistantPane
|
||||
phase={beatId}
|
||||
visualRole="support"
|
||||
message={projectScene9Message(messageState, beatId)}
|
||||
submittedOverrides={projectScene9SubmittedOverrides(messageState)}
|
||||
runRequested={messageState.runRequested}
|
||||
|
||||
Reference in New Issue
Block a user