Giter VIP home page Giter VIP logo

Comments (10)

domoritz avatar domoritz commented on May 10, 2024 1

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.

from editor.

domoritz avatar domoritz commented on May 10, 2024

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.

from editor.

domoritz avatar domoritz commented on May 10, 2024

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.

from editor.

algomaster99 avatar algomaster99 commented on May 10, 2024

@domoritz On switching from vega to vega-lite, we can just change the editorString right? This is how this issue can be solved right?

from editor.

algomaster99 avatar algomaster99 commented on May 10, 2024

Oh okay. You mean undo can be done even if we switch editors?

from editor.

domoritz avatar domoritz commented on May 10, 2024

It can't right now because we create a new Monaco instance.

from editor.

algomaster99 avatar algomaster99 commented on May 10, 2024

Yeah right. I'll try to fix this issue.
What I am thinking is that we just change editorStrings. This will prevent from creating a new instance and also undoing will be possible. I'll look into it and let you know the progress soon

from editor.

domoritz avatar domoritz commented on May 10, 2024

Great. It's a bit tricky to do but shouldn't be impossible.

from editor.

algomaster99 avatar algomaster99 commented on May 10, 2024

I have unassigned this issue to myself so others can also take a look.

from editor.

domoritz avatar domoritz commented on May 10, 2024

We support undo/redo across modes now.

from editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.