cplayground icon indicating copy to clipboard operation
cplayground copied to clipboard

Add "stop" button for running programs

Open reberhardt7 opened this issue 4 years ago • 0 comments

Right now, you can stop a running program by refreshing the page, or by clicking in the terminal and pressing ctrl+c. However, there should be a more obvious way to do it.

We'll need to think about UI -- should the "run" button become a "stop" button when the program is running, or should there be a separate "stop" button that appears once it starts running? I like the minimalism of having fewer buttons, but I think it's cool how the "run" button goes from outline to solid when the program starts running, and it may be clearer to users that it's possible to stop the program if there's an obvious "stop" button showing.

The implementation of this is quite easy. To stop a program, just close the websocket. No backend changes needed for this.

reberhardt7 avatar Mar 25 '20 04:03 reberhardt7