Comments (2)
@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.
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)
- Can you target multiple elements? HOT 3
- Allow multiple triggers to modify a single toggle-able node HOT 5
- Multiple targets with different classes? HOT 6
- Programmatic Toggling HOT 5
- Toggling inputs HOT 10
- data-toggle-target-parent="" doesnt work with data-toggle-group=""? HOT 2
- Codepen example for simple tabs doesn't work HOT 1
- Add a default state attribute for target elements HOT 2
- Triggers don't work when loaded via XHR HOT 1
- data-toggle-trigger-off elements do not unbind HOT 1
- Toggles that target elements with data-toggle-trigger-off in them hijack focus on data-toggle-escape/data-toggle-outside
- Sample in Blazor ?
- `data-toggle-is-active` does not update `aria-hidden` attribute
- Toggle tabs from a select box HOT 1
- Bug with data-toggle-class-on-target HOT 3
- Using data-toggle-outside with a trigger containing another tag HOT 3
- Possible to work on hover? HOT 1
- Data-Toggle-Trigger-Off Not Working With CSS Selectors HOT 5
- Browser support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy-toggle-state.