avh4 / elm-debug-controls Goto Github PK
View Code? Open in Web Editor NEWEasily build interactive UIs for complex data structures
Home Page: https://avh4.github.io/elm-debug-controls/
License: BSD 3-Clause "New" or "Revised" License
Easily build interactive UIs for complex data structures
Home Page: https://avh4.github.io/elm-debug-controls/
License: BSD 3-Clause "New" or "Revised" License
It would be great to have something like
Control.float : { min : Float, max : Float } -> Float -> Control Float
implemented as a slider (in my case, I'd like to make some debug UIs for experimenting with different elm-3d-scene
parameter values). Control.int
could be implemented similarly (with a step size of 1 set on the underlying HTML slider). Happy to submit a PR if that would be helpful!
In the documentation for Debug.Control.choice it says
This will crash if you provide an empty list.
Why not change the type signature to ( String, Control a ) -> List ( String, Control a ) -> Control a
so that can never happen?
values : List a -> Control a
values = List.map (\x -> (toString x, value x)) >> choice
For accessibility reasons, it would be nice to have labels for the inputs.
Great project!
https://avh4.github.io/elm-debug-controls/
demonstrates how to create, view, and interact with (click on and change) a UploadRequest
, but how would one create and view a List UploadRequest
? It would be great to be able to have a list of N UploadRequest
s all of which are interactive. That's what I am trying to do with my own model. I have a record like:
type alias Record = {
name: String,
notes: List String,
things: List Thing
}
type alias Thing = {
one: String,
two: Int
}
It's not clear to me from the documentation and code how do to this. I saw that there is a "list" Control, but that doesn't do what I am trying to do, and I haven't been able to figure out exactly how to do it. I'm having a bit of a hard time wrapping my head around exactly how all of this works -- I'm a good developer with functional experience so a lot of it makes sense, but the overall approach is translucent to me currently (though, I can see that it is very cool).
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.