Giter Club home page Giter Club logo

Comments (7)

dmonad avatar dmonad commented on July 18, 2024

This would be a breaking change. I also don't agree that an empty list should catch everything.

There could be an option to catch everything. However, I'd like to understand the use case first and if there are alternative solutions (there probably are)

from yjs.

davidbrochart avatar davidbrochart commented on July 18, 2024

I also don't agree that an empty list should catch everything.

Why? The documentation says that "the changes can be optionally scoped to transaction origins". Doesn't it mean that by not specifying a transaction origin, the scope should include all origins?

My use case is simple: I want to revert a document to a previous state in time (say t0). So at t0 I create an undo manager for a shared type of this document. Somewhere, changes are made to the document with a specified origin (that I'm not aware of). Then I decide to revert the document to the state at t0. But currently the undo manager says that there is nothing to undo.

from yjs.

dmonad avatar dmonad commented on July 18, 2024

The thing is that there are currently users of Yjs who specify an empty list and add origins dynamically. If I changed the behavior so that "empty" catches everything, then this would be a breaking change.

There is still the option to have a special flag to catch everything or to set the list to null. An empty list for catching everything is out of the question as it would be a breaking change.

from yjs.

davidbrochart avatar davidbrochart commented on July 18, 2024

There is still the option to have a special flag to catch everything or to set the list to null.

Sure, that would be an option.

from yjs.

davidbrochart avatar davidbrochart commented on July 18, 2024

Hi @dmonad, do you think this could be implemented?

from yjs.

davidbrochart avatar davidbrochart commented on July 18, 2024

Friendly ping @dmonad 😄

from yjs.

dmonad avatar dmonad commented on July 18, 2024

Hey David, sorry I can't give an estimate on when I have time to implement this feature.
I'm currently flooded with other things. This ticket takes a low priority for me because it is not relevant for the majority of users.

from yjs.

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.