statecharts / xstate-viz

MIT License
313 stars 63 forks source link

Various problems with the visualizer #98

Open richtera opened 3 years ago

richtera commented 3 years ago

The current app is not very resilient to states which are too complex and throw an error during JSON serialize. The safe JSON does return a value, but it removes repeated values and ends up removing things the state needs like _event. So once the state has a JSON problem it won't be sent to the visualizer correctly. The old visualizer has problems with not allowing scrolling inside of the state pane. This can be temporarily fixed by executing.

document.querySelector('[data-xviz=service-sidebar]>[data-reach-tabs] [data-reach-tab-panels]').style.overflow = "auto"

i.e. removing this css.

[data-xviz=service-sidebar]>[data-reach-tabs] [data-reach-tab-panels] {
    overflow: hidden;
}

With the new version I am having the following problem which I am still trying to trace. After changing Actors, the graphical UI is not correctly initialized. The opacity is set to 0.01 or something and removing the opacity reveals a graph that's not quite right and all elements are at the top left position. I initially posted this for reference: https://github.com/statelyai/xstate/issues/2629

richtera commented 3 years ago

Hmmm, should defects be here or in statelyai/xstate-viz?