-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing gist URLs appended to new Visualizer URL not working #21
Comments
Thanks to @mettjus for finding this: Potential source of the issue: The following is the same source code, uploaded in a different gist named |
Maybe this could be made overwritable via URL (i.e: I am thinking someone could be interested in using the same gist form many machines, maybe. |
Ah, so basically you're describing a scenario where somebody might want to upload a gist with multiple JS modules each exporting a default machine value, and have one machine import the rest and compose its' configuration with them, e.g. with So in that case we would want to instruct the Visualizer which module should be the entry point that should be visualized, which would be a harder to implement solution than letting the Visualizer figure out the entry point on its own. Seems interesting for sure, but it's a feature unrelated to this issue, feel free to open an issue / PR for it if you're interested in it. |
I wasn't so far ahead with my proposal, even if it could be certainly possible. I am just considering, as a next step, the opportunity to have multiple machines packed into a single gist, without requiring a gist for every machine. |
I made a PR: #22 |
It only addresses fetching from gist, not saving. |
Expected Behaviour:
When visiting the URL, the public gist at the appended URL should be loaded into the Visualizer and shown successfully.
Observed Behaviour:
Provided the following XState Visualizer URL:
https://xstate.js.org/viz/?gist=https://gist.github.com/amitnovick/7649b9c077e0946474712ac25d15b5b8
When visited, the console should print the following error:
And the Loading... animation is shown instead of the usual Visualizer UI.
The text was updated successfully, but these errors were encountered: