feat: add operational timeline workspace
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
type ArtifactRequestedView
|
||||
} from "./workspace-model";
|
||||
|
||||
export function useArtifactWorkspace(viewportWidth: number) {
|
||||
export function useArtifactWorkspace(businessWorkspaceWidth: number) {
|
||||
const [state, setState] = useState(createInitialArtifactWorkspaceState);
|
||||
const fixtureIndexRef = useRef(0);
|
||||
const fixtureInstanceRef = useRef(0);
|
||||
@@ -49,14 +49,14 @@ export function useArtifactWorkspace(viewportWidth: number) {
|
||||
}, []);
|
||||
|
||||
const surfaceMode = useMemo(
|
||||
() => resolveWorkbenchSurfaceMode(state, viewportWidth),
|
||||
[state, viewportWidth]
|
||||
() => resolveWorkbenchSurfaceMode(state, businessWorkspaceWidth),
|
||||
[businessWorkspaceWidth, state]
|
||||
);
|
||||
|
||||
return {
|
||||
...state,
|
||||
surfaceMode,
|
||||
mapSplitAvailable: viewportWidth >= ARTIFACT_MAP_SPLIT_MIN_WIDTH,
|
||||
mapSplitAvailable: businessWorkspaceWidth >= ARTIFACT_MAP_SPLIT_MIN_WIDTH,
|
||||
createTestArtifactPreview,
|
||||
openPreview,
|
||||
collapseArtifact,
|
||||
|
||||
Reference in New Issue
Block a user