Code Monkey home page Code Monkey logo

Comments (2)

saulpw avatar saulpw commented on May 17, 2024 2

Implemented as of v0.59.

from visidata.

saulpw avatar saulpw commented on May 17, 2024

What I'm planning for this, is to have an editlog that tracks all edits and transforms in such a way that they can be replayed on top of the source sheet (the same one or a similarly structured one with different data). Then you could jump to the editlog sheet (M for modifications, or T for transformations? E is currently 'errorlog' but maybe that should move to ^E) and:

  • change or delete any edits manually
  • push a new sheet with current/selected/all edits applied to the same or different source sheet
  • ^Save the editlog for later reuse.
  • ^Reload on the source sheet re-applies the editlog

So undo would be a simple command:

command('u', 'editlog.rows.pop(); reload()', 'undo last edit')

or Mgjdq^R

if done manually.

This would also allow for a tight test framework, with source + editlog + golden output being a complete functional test.

A possible problem is that undo might take a long time with a lot of edits or a large dataset. But I feel like that should be dealt with in a different way.

What do you think about this approach?

from visidata.

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.