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
Feature Request: Pre-fill the code field in the playground on error #28
Comments
We should be able to do something like this. The module's AST has a One problem here is that I think the playground can only handle a source file of a certain size because we call |
Good point! I'll have to look into the subject, and will look into implementing this in the following week(s) |
I did a quick test doing this, and threw a 400 line component at this. Javascript atob and decodeURIComponent can easily handle these, at least in node, but the URL itself becomes just too big for the browser to handle. We could a) Ditch the idea |
An idea I was thinking about was a url shortening service, or a quick api (firebase or custom etc.) to save the hash to and load it from, but as the playground currently stands it's only a frontend, and I'd advice against hosting out own error handling site just for this niche |
Hm, yeah. Maybe we're overthinking things a bit 😅 We could do something like |
Yeah let's do that. It would be more of a confusion to the end user why sometimes it generates and sometimes it doesn't. Maybe if this pops up later, we can implement something around it :) |
Thanks for looking into this though, appreciate it! |
My pleasure! Let me know if there's something else I can help out with! |
It would be a nice user experience if, on error, as we get provided the playground link, it would have the parameters so that the code part is pre-filled with the contents of the file that caused the error.
This would make it easier and less cumbersome to submit bug reports.
It would mean that we need to add the source to the withErrorHandling function, and then parse the
text
property of the object.What might make this ticket harder is if all of the use cases can't access the file responsible. But in these cases we could maybe just not generate it?
The text was updated successfully, but these errors were encountered: