mattpocock / xstate-catalogue

Professionally designed, interactive state machines
https://xstate-catalogue.com
MIT License
811 stars 62 forks source link

Button not working on infinite scroll #45

Closed arturcarvalho closed 3 years ago

arturcarvalho commented 3 years ago

Hi there,

@mattpocock as we spoke yesterday on twitter, I can't click on the received_data. I can only trigger the error.

I've tried on chrome on a windows and mac os machine. image

And thank you very much for this project! :)

mattpocock commented 3 years ago

Gotcha! Yes, this is actually a bug with @xstate/inspect - you can't specify event payloads when you pass your machine across. I'll leave this issue open because someone may have a creative solution.

The way to get the interaction you're looking for is to click in the interactive descriptions, not in the inspector - only some of the events work in the inspector.

arturcarvalho commented 3 years ago

Oh, didn't know the states under were clickable. Nice touch!

I see what you mean. I've made it work by removing the ...event.data from the assignDataContext.
https://xstate.js.org/viz/?gist=417f16e87b4ce6e7e83d729eefdf06dd

If I may suggest:

In any case this is already working well enough. Zooming to 90% makes the event RECEIVED_DATA visible.

Thank you very much for the reply!

mattpocock commented 3 years ago

You can also change the layout of the page to show the diagram on the left/50/50 vertical by clicking the toggle in the top right. Does that help?

arturcarvalho commented 3 years ago

Oh yeah... I thought the icon was a menu. This is much better no doubt, thank you!

mattpocock commented 3 years ago

Closing this