C2LC-113: Adding and deleting are possible while program is running

Metadata

Source
C2LC-113
Type
Bug
Priority
N/A
Status
Done
Resolution
N/A
Assignee
N/A
Reporter
Created
2019-12-19T14:09:01.666-0500
Updated
2020-02-26T10:13:13.780-0500
Versions
N/A
Fixed Versions
  1. Coding Env 0.2.1
Component
N/A

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:

    1. When interpreterIsRunning property in ProgramBlockEditor is set to true, pass an empty function to onClick property of the program steps
    2. 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