Code Monkey home page Code Monkey logo

Comments (2)

aazuspan avatar aazuspan commented on August 18, 2024

I ran some tests and generating the HTML is a significant chunk of the total time for large collections and can actually take longer than getInfo, so disabling caching on the HTML generation is a no go.

Another alternative I'm looking into is bypassing UUIDs altogether. Currently, UUIDs are used to tie the header <label> to the hidden <input> checkbox, but that can also be done by just making the <input> a child of the <label> instead of a sibling (see). This would remove any possible interaction between duplicated reprs, save some processing in generating UUIDs, and make the reprs a little lighter.

The challenge is that making the <input> a child of the <label> breaks the CSS selector I'm currently using, and I'm not sure there's any well-supported workaround for that. Basically I need to be able to select eerepr-list elements that are siblings of eerepr-header elements that contain eerepr-collapser:checked inputs. The has:() selector works, but isn't supported by Firefox yet. Instead of relying on pure CSS, I could fix that by injecting some JS into the repr, but I'd like to avoid that if possible to keep things simple.

from eerepr.

aazuspan avatar aazuspan commented on August 18, 2024

This is fixed by scrapping UUIDs and connecting label and input elements implicitly. I don't think a pure CSS solution is possible without using has:() which would break Firefox support, so until that changes I'm using JS to handle collapsing behavior.

from eerepr.

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.