inspect icon indicating copy to clipboard operation
inspect copied to clipboard

Zoom is being reset when trying to move around the canvas

Open Mheaus opened this issue 1 year ago • 13 comments
trafficstars

Hello 👋

I've been using the new version of inspect with the last release of xstate and react for a few months now. I've noticed slow performance and issues when trying to move the view accross the canvas.

When I'm moving the view with a trackpad or by zooming, it'll lag and reset the zoom to fit the window.

It seems to refresh too much?

I hope this little video will help you identify the issue and if I can help in any way please let me know 🙏 .

https://github.com/statelyai/inspect/assets/29288173/43289306-f4eb-4c5c-8936-6bf6e5a93971

Mheaus avatar Apr 30 '24 11:04 Mheaus

Thanks for the report and the video - it definitely helps. Is there a way to share the machine (either a link or the exported code)?

davidkpiano avatar Apr 30 '24 12:04 davidkpiano

Sadly it's on a private project, but I can work on a repro ! I'll let you know.

Mheaus avatar Apr 30 '24 17:04 Mheaus

This happens for us as well. It seems to reset the zoom whenever the inspector receives an event. In our case, it receives dozens of events per second, so the zoom resetting makes the inspector almost unusable.

cpetzel avatar May 01 '24 17:05 cpetzel

This happens for us as well. It seems to reset the zoom whenever the inspector receives an event. In our case, it receives dozens of events per second, so the zoom resetting makes the inspector almost unusable.

Understood. We will have a fix for this soon.

davidkpiano avatar May 01 '24 17:05 davidkpiano

Sorry for the delay here; still working on this. We are overhauling the canvas layer which will introduce many performance improvements and features.

davidkpiano avatar May 31 '24 07:05 davidkpiano

Sorry for the delay here; still working on this. We are overhauling the canvas layer which will introduce many performance improvements and features.

No problem, take your time. 👍
Can I help in any way?

Mheaus avatar May 31 '24 10:05 Mheaus

Any updates on this issue? My machine is quite big, I cannot read anything without zooming in. The frequent resetting of the zoom makes the inspector almost impossible to use.

I am starting to regret upgrading to v5. Is there a way to use the old viszalizer with v5 until the issues with the new inspector are resolved?

WIStudent avatar Aug 01 '24 11:08 WIStudent

I am experiencing the same issue: my machine isn't that big (photo below) Zrzut ekranu 2024-12-5 o 13 59 29

but when I try to zoom and move around the canvas, it resets to default. + it's very slow. It's much slower than xstate visualizer for xstate 4. Previous inspector was really fast

okowalow avatar Dec 05 '24 13:12 okowalow

I want to rebuild the inspector in React Flow, and open-source it. If anyone wants to help contribute in this effort, please let me know.

davidkpiano avatar Dec 05 '24 14:12 davidkpiano

I'd be very much interested in helping

Mheaus avatar Dec 05 '24 15:12 Mheaus

I want to rebuild the inspector in React Flow, and open-source it. If anyone wants to help contribute in this effort, please let me know. The inspector is a very useful tool but it is unusable. I would be happy to contribute. Let me known the link to the new project. Thanks

aldotms70 avatar Dec 11 '24 10:12 aldotms70

Exact same issue. Glad I'm not the only one aware of it.

Brief video demo-ing bug attached (actual UXUI of my App is offscreen), but you clearly see the inspector reseting the zoom position.

Love the inspector, love xState's visual tools -- IMO a hotfix for this issue (indepentant of a wider react-flow refactor) would make the inspector much more useful to a lot of users.

Fingers crossed for a fix soon 🤞

https://github.com/user-attachments/assets/8fabc39c-29de-4f15-9860-c9bd6787f0f3

Dylansc22 avatar Feb 20 '25 17:02 Dylansc22

where can I contribute the rebuild?

GZLiew avatar Apr 03 '25 00:04 GZLiew