Coder Social home page Coder Social logo

Control.float about elm-debug-controls HOT 3 OPEN

ianmackenzie avatar ianmackenzie commented on July 20, 2024
Control.float

from elm-debug-controls.

Comments (3)

avh4 avatar avh4 commented on July 20, 2024

Yeah, I'd be happy to accept a PR for this 👍

from elm-debug-controls.

ianmackenzie avatar ianmackenzie commented on July 20, 2024

Cool! I do remember running into some "huh..." moments when I wrote my custom implementation of Control.float for my own use case - I vaguely seem to remember concluding that it was inherently different from some of the other controls, in ways that made it non-obvious how to match existing patterns.

I'll try to take another look at the code again and see if I can refresh my mind on what these issues were - are there any particular principles you've been trying to follow with the existing controls, or gotchas to be aware of to make sure that layout works out in a reasonable way in all cases?

from elm-debug-controls.

avh4 avatar avh4 commented on July 20, 2024

I haven't worked on this in quite a while, but just to dump out the context I recall:

  • the current way things are done is a bad practice in Elm because it is storing a bunch of functions in the model, and it's also bad practice in that the msg the views produce is basically a new model value rather than an actual message. But for the moment, I've decided to stick with both those bad practices given this is a package for "debug"ing, and it reduce the boilerplate needed to use it.
  • the layout of the views is definitely not well thought out. so atm, whatever gets added is fine, I think, so long as the packaged examples still work okay.

in a future major version, both those things are up for reconsideration, but in the meantime, I've just been living with the current mess, and trying to keep notes of the cases that don't work right to inform the later potential redesign.

from elm-debug-controls.

Related Issues (5)

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.