source-academy / js-slang

Implementations of sublanguages of JavaScript, TypeScript, Scheme and Python
https://source-academy.github.io/source/
Apache License 2.0
70 stars 104 forks source link

CSE Machine: Modify navigation arrows to jump to the previous or next change in environment diagram #1496

Closed wpinrui closed 7 months ago

wpinrui commented 1 year ago

Currently, the navigation arrows on the CSE machine allow the user to jump back and forth between control instructions. When the user is trying to visualize the program without the control and stash, this is not a good experience because it typically takes several clicks to move on to the next statement evaluation or change in environment diagram.

I propose a jump to next and jump to previous button as an enhancement that skips to the next or previous time that either the highlighted line in the program changed, or the environment diagram itself changed.

martin-henz commented 1 year ago

Good idea!

martin-henz commented 9 months ago

I don't think we need new buttons for this. When display of control and stash is turned off, the arrows > and < should just skip to the next or previous environment state.