-
Notifications
You must be signed in to change notification settings - Fork 197
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
Show the Share button even when the code isn't running #1410
Comments
A couple of questions:
|
Thanks for the questions.
|
Visibility doesn't have to be toggled. We can always display the button (isn't that the ultimate goal?), just when the editor is empty we can disable it to prevent dispatching a click event while applying 'inactive' styling. |
Sure, that's fine. We haven't really used disabled styles in the UI today, except for in the editor toolbar. But if it looks okay, go for it. That's a minor tweak, and I can always adjust to taste after the major functionality is there. |
I'm not sure I understand what we are trying to achieve here. Why would we offer two versions to share? Wouldn't it be more straightforward to always share current code?
To avoid this kind of confusion, we can display a warning saying that the code contains errors and disable the option to share the project without code. |
My only thought was that in the first case, a student might have a working program, choose to share it, and end up sharing modified code that doesn't actually work. I think they should at least be reminded that the code they are sharing is different from what's running. (We already know that, and use it to show a warning at the top of the running program.) I agree with the second point. It does mean that you need to wait on at least a |
I went ahead and added a simple warning about detected errors (without actually showing those) to the message while keeping all sharing options available. Let me know if you'd like to handle the situation differently. |
Suggested by @jbash in #1409. There should still be a Share button to share code even when the code isn't running.
In terms of implementation, this means that the code will have to be sent to the server when Share is clicked, since it hasn't been sent yet. Currently the only way to do that is to invoke
/compile
on the server. That is wasteful, though, so I should probably add a new server-side endpoint to store code without trying to compile it.Open questions:
The text was updated successfully, but these errors were encountered: