Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Visualizer side bar too big #412

Closed
pckilgore opened this issue Jun 23, 2023 · 3 comments
Closed

Visualizer side bar too big #412

pckilgore opened this issue Jun 23, 2023 · 3 comments

Comments

@pckilgore
Copy link

Description

The inspector side bar is unusably large and cannot be hidden.

Expected Result

Able to view state machines without nearly half the screen on a laptop being dead space.

Actual Result

Too much sidebar:
image

Reproduction

See above.

@pckilgore
Copy link
Author

#381

@pckilgore
Copy link
Author

The workaround in that issue doesn't seem to work.

@pckilgore pckilgore reopened this Jun 23, 2023
@pckilgore
Copy link
Author

Ahh, the url not the iframe src, oops.

function Test(){
  const frameRef = React.useRef<HTMLIFrameElement>(null);
  useMachine(testMachine, { devTools: true });

  React.useLayoutEffect(() => {
    const inspector = inspect({
      url: 'https://stately.ai/viz/embed?mode=viz&inspect',
      iframe: frameRef.current,
    });
    return () => inspector?.disconnect();
  }, []);

  return <iframe ref={frameRef} style={{ height: '100%', width: '100%' }} />;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant