-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Haz3l checkbox and slider livelits #955
Conversation
src/haz3lweb/view/LivelitView.re
Outdated
[ | ||
Attr.create("type", "checkbox"), | ||
livelit_style(font_metrics, float_of_int(1)), | ||
Attr.on_change((_evt, _str) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a particular reason you use on_change for the checkbox but on_input for the slider? I don't totally grasp the implications of using one versus the other; i ask mostly because i'm thinking about generic ways to automatically reconcile DOM and model state in more generic contexts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had changed the range to use on_input
so that the changes are reflected while you're sliding which is really convenient if you're trying to pick a value. I had tried it with the checkbox and had a bug, but now I think that's unrelated. I just tested both with on_input
and it seems to work.
Addressed in 58eb82b
closing in favor of newer efforts in this direction based on #1218 |
Open questions: