Code Monkey home page Code Monkey logo

Comments (3)

hexus avatar hexus commented on June 15, 2024

These were helpful so far

Getting Ace Editor to import was a pain, very antiquated. If only it properly supported ES modules! And brace was last published in 2018! 😩 Either way, it's working nicely.

from pragma.

hexus avatar hexus commented on June 15, 2024

Here's where to continue:

// TODO: Build dictionary from given fields, compare with current fields,
// add/update/remove fields and clear caches accordingly
//this.dictionary = this.buildDictionary(this.fields);
this.dictionary = this.updateDictionary(this.fields);

Adding and updating fields in the playground works nicely, but they don't get removed because of this optimisation from a while back. Time to do some proper dictionary diffing in updateDictionary().

The main reasons we want to update the dictionary rather than rebuilding from scratch every time:

  • Data retention
    • We don't store data in a dedicated property by design, it's stored in field value properties each time new data is given
    • We don't want editing a form to clear all of its data every time we tweak it!
  • #7 Performance
    • For simple forms, it isn't a problem, but for complex forms, rebuilding like this can get really slow

from pragma.

hexus avatar hexus commented on June 15, 2024

Looks like all this needed was field diffing and removal to work! 🎉

Things to do before closing:

  • Test with templated fields
  • Fix whichever editor isn't visible not updating properly (seems to be the data editor most of the time 🤔)

from pragma.

Related Issues (13)

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.