-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PyEditor kill switch #2295
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
PyEditor kill switch #2295
Conversation
4273d4c
to
c571d19
Compare
97fbddc
to
012f7a8
Compare
To whom it might concern, this has been published on our npm dev channel as |
012f7a8
to
9d9372b
Compare
This looks great except for a single nit pick. When you run the code that you want to kill, the icon you need to click is still the green "play" button. Can this be flipped to a red "STOP" button that looks something like this: 🛑 ...? Just noticed it as I was about to update the docs. Once fixed happy for this to be merged. These small details are what make PyScript great. ;-) |
9d9372b
to
07a2ee5
Compare
@ntoll the red button is a square as in play / stop now ... I think I prefer this version and I'll demo it but most importantly, it took forever just to create those two minimalistic icons out of my already bad and surely rusty SVG and drawing skills |
@WebReflection ask 🤖 to do it?
😝 |
@ntoll fair enough ... in my defense, it was a classic case of "how long could it take to draw a triangle and a square" that failed miserably due document size, ratio, rounded border as outer stroke and stuff 🤦 I felt like that person that thinks "those stairs are not great, I could build better stairs in minutes myself" ... I hope at least it looks decent, I will demo that in today community call. edit and merge it once we all say "cool" or something that sounds like an OK ;-) |
Please update confirmation to: "Stop evaluating this code?" (no killing executions) ;-) |
07a2ee5
to
b206ba8
Compare
Description
This MR would like to provide a way to kill the currently running editor in case it's stuck in an infinite loop or any other problem is happening.
The current kill switch is orchestrated via an explicit confirm dialog that is shown only while the code is currently executing.
Once confirmed, the current editor and its sibling node will be removed and replaced in place with a new script that contains the latest code present in the editor, the code will stop executing and that's it, you can move on from where you left.
Changes
Checklist
make build
works locally.