google / google/codeworld

Show the Share button even when the code isn't running

Open
#1,410 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

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:

1. What if the current code has been modified since the program was run? Currently, we show a warning, and offer to re-run the program (which will then cause Share to share the latest code as well). Instead, if users shouldn't think of sharing as connected to running, maybe we should just ask them which they intended to share.
2. If this might cause more shares of incomplete code, should we stop users from accidentally sharing code that hasn't been run without source access? My sense is probably no... but it's worth considering if this would be confusing. The risk is that students will share something that they think works without testing, and then the person they are sharing with only sees a white box, and the student is frustrated because they never saw the error message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.