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

all: Add on input handler #80

Merged
merged 3 commits into from
Feb 16, 2023
Merged

all: Add on input handler #80

merged 3 commits into from
Feb 16, 2023

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Feb 16, 2023

Add on input id:string val:string handler, so that evy can react to any
kind of input event, depending on how the frontend has wired it. By default
we have added and hidden to sliders in the index.html / DOM.

An example can be explored at
https://evy-lang--80-k6pkxs0k.web.app#show=.slider&source=samples/sliders.evy

In preparation change visibility of evy-widgets in dom via URL fragment.

Use querySelector instead of getElementById to unify usage for with the
follow-up commit where we would need getElementByClassName, which is
less recommended than use of querySelect. For a more detailed discussion
see https://stackoverflow.com/a/26848360
@github-actions
Copy link

github-actions bot commented Feb 16, 2023

firebase-deployment: https://evy-lang--80-k6pkxs0k.web.app (2109d91)

Hide and show evy widgets via URL fragment so that we can hide sliders
by default but demonstrate their use in the follow up commits, e.g.:

	http://evy.dev/#show=.read,.slider&hide=.canvas,.output

Note that the value of `show` and `hide` is directly used as
querySelector. If elements are to be selected by className a leading
dot is required.
Add `on input id:string val:string` handler, so that evy can react to
any kind of input event, depending on how the frontend has wired it.
By default we have added and hidden to sliders in the index.html / DOM.

An example can be explored at
https://evy.dev#show=.slider&source=samples/slider.evy
Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 LGTM

@juliaogris juliaogris merged commit 37a7de4 into master Feb 16, 2023
@juliaogris juliaogris deleted the on-input branch February 16, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants