Giter Site home page Giter Site logo

Feedback about easy-toggle-state HOT 2 OPEN

twikito avatar twikito commented on May 22, 2024
Feedback

from easy-toggle-state.

Comments (2)

Twikito avatar Twikito commented on May 22, 2024

@LeaVerou Thanks so much for your feedback! πŸ™

This library was initially thought for me to avoid writing always the same thing, and an excellent sandbox to improve my JS skills, and for my students for a first approach on writing interactible web pages without writing JavaScript.

Since your feedback, I've been focusing on improving the documentation, and I hope I've succeeded on this.
Please, tell me what you think of this new version of the documentation, hoping it will help you understand more easily what this library is about and how to use it.

About the API improvements, I think you're right on most of the suggestion. I will surely take care of more improvements and features.

Still, I have some questions:

Why do I need to run JS for a purely HTML API? This excludes a bunch of designers who aren't comfortable with JS. Just make the attributes work, automatically, at least for the bundle version. Use Mutation Observers to pick up new ones too. Provide manual control for people with demanding use cases.

What did you have in mind mentioning Mutation Observers?

All of these demos are very component-y. It would be nice to provide some declarative HTML syntax to turn them into a web component without writing JS!

Did you mean give the user the possibility to automatically create a reusable named component?

It would be nice if there was a way to make data-toggle-target relative to the current element, to avoid having to generate ids for repeated elements. Perhaps by the selector using & or :scope to represent the current element?

Yes, it could be great to give the parent or ancestor selector missing in CSS, but I don't really know how to do that the right way. Although, it will be probably possible in the next few months… hopefully.

Again, thanks very much for your feedback!

from easy-toggle-state.

LeaVerou avatar LeaVerou commented on May 22, 2024

What did you have in mind mentioning Mutation Observers?

Mutation observers can help you observe changes to the HTML, so your syntax can be reactive to changes, without user code needing to be tightly coupled to it. E.g. they change the value of an ETS attribute and you just pick up the change with no further action required

Did you mean give the user the possibility to automatically create a reusable named component?

Yes, an actual custom element. E.g. <my-fancy-switch>.

from easy-toggle-state.

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.