Skip to content
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

Closed
wants to merge 56 commits into from
Closed

Haz3l checkbox and slider livelits #955

wants to merge 56 commits into from

Conversation

7h3kk1d
Copy link
Contributor

@7h3kk1d 7h3kk1d commented Jan 14, 2023

Open questions:

  • Do we want to have parens after livelit applications in this pass that doesn't support livelit params?
  • Should the rendered livelits have a span or other bounding box that fixes the width/height?
    • Currently I'm just styling the input elements

@cyrus- cyrus- changed the base branch from haz3l-tests to dev January 19, 2023 19:47
src/haz3lcore/Measured.re Outdated Show resolved Hide resolved
src/haz3lcore/lang/Form.re Outdated Show resolved Hide resolved
src/haz3lweb/view/Code.re Outdated Show resolved Hide resolved
[
Attr.create("type", "checkbox"),
livelit_style(font_metrics, float_of_int(1)),
Attr.on_change((_evt, _str) => {
Copy link
Member

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

Copy link
Contributor Author

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

@7h3kk1d 7h3kk1d requested a review from disconcision April 24, 2023 02:10
@cyrus- cyrus- marked this pull request as draft June 10, 2023 02:50
@cyrus- cyrus- added the in-development for PRs that remain in development label Jun 10, 2023
@gensofubi gensofubi mentioned this pull request Sep 24, 2023
@cyrus-
Copy link
Member

cyrus- commented Jul 25, 2024

closing in favor of newer efforts in this direction based on #1218

@cyrus- cyrus- closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-development for PRs that remain in development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants