script-lab icon indicating copy to clipboard operation
script-lab copied to clipboard

No undo/redo after reloading editor

Open gergzk opened this issue 7 years ago • 4 comments

Bug Report

  • Host: Excel Win32
  • OS: Win10
  • Browser: (fill out if relevant/applicable)
  • Environment: SLR-beta

Expected behavior:

After I write some new code, then click Run (to get the run experience), then run the code by clicking my button in the taskpane. The code doesn't do what I want, so I click Back into my editing experience. I want to undo what I just did - but can't. The undo stack is gone.

Actual behavior:

The editor has no memory of what I last did.

Steps to Reproduce:

Start the coding pane. Write some code. Ctrl-Z/Y works as expected. Click the Run button to compile and package the user's code. Optionally run the user's code, but navigate back from the run experience to the edit experience. Ctrl-Z/Y now does nothing.

Failure Logs:

Screenshot:

gergzk avatar Nov 19 '18 22:11 gergzk

In order to make the undo redo work, we would have to save the monaco models, which I don't know if they are serialize-able .

nico-bellante avatar Nov 19 '18 23:11 nico-bellante

also see #341

nico-bellante avatar Nov 19 '18 23:11 nico-bellante

The solution here is to avoid running in the edit taskpane. @gergzk Would you prefer we remove the run from the same pane?

wandyezj avatar Apr 16 '24 17:04 wandyezj

@wandyezj - we've streamlined the interaction to run in a separate pane and it's what we recommend, so I think removing run from the editor makes sense

gergzk avatar Apr 16 '24 17:04 gergzk