frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Unexpected behaviour about the interaction between the stepper tool and the frontend

Open FYL2003 opened this issue 1 year ago • 3 comments

Unexpected flashing of the stepper tool icon. Expected behaviour: no flashing occurs (The CSE machine does not have this issue; it might be a useful source for referencing).

Order of execution to trigger the problem:

  1. Run the program in stepper tool.
  2. Change to Introduction setup.
  3. Run the program in the setup.

Figures related to the issue: IMG_7712 IMG_7713 IMG_7714 IMG_7715 (The figures are in the order in which the problem was triggered.)

For detailed behaviour, please check out the video clips attached.

https://github.com/source-academy/frontend/assets/97390773/f57a3ae2-5bc9-462e-9503-52d8e8afb51b

FYL2003 avatar Mar 05 '24 03:03 FYL2003

Thanks for posting this. Same behavior for all §1 and §2 languages: Source and Source Typed.

martin-henz avatar Mar 18 '24 05:03 martin-henz

@leeyi45 could you look into this if you're free? Might/not be related to your refactor recently.

RichDom2185 avatar Mar 18 '24 05:03 RichDom2185

Yes this definitely looks like a result of the refactor.

The main issue is that specifically in the case of the subst-visualizer, it sends BEGIN_ALERT_SIDE_CONTENT before the SPAWN_SIDE_CONTENT event is sent. So the END_ALERT_SIDE_CONTENT event doesn't trigger until the next evaluation of any program.

Wrote up a quick fix for this issue, but we definitely need to refactor how the frontend evaluates code.

leeyi45 avatar Mar 20 '24 04:03 leeyi45