Metadata
Description
If the add or delete was selected before run, the user can add or delete during the run.
Steps to reproduce:
- Load the Coding Environment
- Click Connect to Dash and connect
- Create a program with a few commands
- Press delete or add
- Click the run button when delete or add is still pressed
- Click on the program to add or delete a step while the program is running
Expected: Program shouldn’t be modifiable when the program is running
Actual: You can delete or add steps to the program
Notes:
- We are currently disabling editor action buttons when program is running; however if editor action is already pressed before running the program, you can still modify the program
- We need to set selectedAction state to null when program is running
Comments
-
Daniel Cho commented
2020-02-18T09:28:07.137-0500 I gave a thought about ways to handle this, and there are two possible ways to handle this other than setting selectedAction to null:
- When interpreterIsRunning property in ProgramBlockEditor is set to true, pass an empty function to onClick property of the program steps
- When the interpreterIsRunning property is true, disable the program steps
-
Simon Bates commented
2020-02-18T09:49:37.430-0500 We can do a variation on your option 2:
- When the
editingDisabled
property is true, disable the program steps
See: https://github.com/codelearncreate/c2lc-coding-environment/pull/37#issuecomment-586445965
- When the