-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine the editor instances #12
Comments
Just to explain this a bit more. The problem is that react recreates components when a subtree of the dom changes. This means we recreate the monaco editor instance in some case and erase the (undo) history. |
We have fixed the issue when the Vega editor instance is opened side by side with Vega-Lite. However, switching from Vega to Vega-Lite and vice versa or opening examples still creates a new editor. |
@domoritz On switching from vega to vega-lite, we can just change the editorString right? This is how this issue can be solved right? |
Yeah, maybe. The issue is that react will re-create the component instead of reusing the editor we already have. This is one of the most important issues we have right now. I would love to support undo across different modes for example. |
Oh okay. You mean undo can be done even if we switch editors? |
It can't right now because we create a new Monaco instance. |
Yeah right. I'll try to fix this issue. |
Great. It's a bit tricky to do but shouldn't be impossible. |
I have unassigned this issue to myself so others can also take a look. |
We support undo/redo across modes now. |
Right now we create new monaco instances when we open the vega spec in vl mode. This prevents undo/redo.
The text was updated successfully, but these errors were encountered: