Repository navigation
dmvs_html: scripts - click handlers worked out at conversion, CSS tra… - #2
Merged
Merged
Conversation
…nsitions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…), view-sized boxes square Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dmvs_html: scripts - screens that switch, as the page's JavaScript does
The page's JavaScript is not run on the device. What its click handlers do is worked out at conversion and becomes the view's variables, bound boxes and handlers.
Understood:
document.getElementById()/querySelector('#id');const/let(a global that the handlers assign becomes a view variable holding an element, with the set of elements it may hold);onclick, inlined with their constant arguments, andthis(the clicked element);classList.add/remove/toggle/contains, andstyle.<property> = …;ifon such variables (x,!x,a === b,contains) andreturn.How changes become motion:
transition: duration and timing function, in the state after the change, as browsers do. Transition parsing covers the longhands, the shorthand and Tailwind'stransition-*/duration-*/ease-*.Reported and left out: what the page does when it loads (timers,
Date, written text), loops, events other than clicks, and changes that show or hide an element or lay its inside out anew.Hit areas: the clickable element's group is its border box, with its outer shadow painted outside it, so the hit area is the element and not its shadow.
Result on the dmodOS design (
tests/fixtures/dmodos, the unmodified page):Tests: a small page with a window that slides in (
transition: top 0.3s ease-out), a screen that dims (style.opacity) and a toggle (this.classList.toggle); the dmodOS page's six windows bound to their positions.Based on
feature/html. Requiresdmvsi@>=0.2.🤖 Generated with Claude Code