Repository navigation
libdmview: a box not seen takes no contact - #15
Merged
Merged
Conversation
APPEND $d, str appends a string - a literal or a string variable - to a
string variable, as much of it as the variable's size takes (in place,
without a buffer of that size). FORMAT formats one number; a number and
its unit, a name and its value need several pieces - what the JavaScript
compiler (dmvs_js) makes of innerText = `${speed} km/h`.
Views using it are version 0.5 (todmv marks them); the operand layout
has its entry (the offsets test checks it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A page's screens are boxes one on another, the hidden ones with an OPACITY of 0 (visibility: hidden) - the last one on top. The topmost box under a contact was taken even when not seen, and as it handles nothing its parents were asked: the screen hidden on top took every touch of the one shown beneath it (the car HMI's playlist and climate buttons did nothing). A box remembers its opacity times the boxes' around it as last drawn; one of 0 is passed over. 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.
Summary
A box that isn't seen no longer takes touches.
A page's screens are boxes stacked on top of each other. dmvs_html converts the hidden ones (
visibility: hidden,opacity: 0) to anOPACITYof 0, and the last screen in the page is on top. The hit test picked the topmost visible box under the contact even when it wasn't seen. Since that box handles nothing, the touch went to its parents, which also handle nothing, so the hidden screen on top swallowed every touch meant for the screen shown beneath it. On the board this broke the car HMI's playlist rows and climate buttons, while the sidebar outside the screens worked.Each box now remembers the opacity it was last drawn with (its own
OPACITYtimes its ancestors'). The hit test skips a box at 0, so the touch reaches what is visible beneath it, as withvisibility: hiddenin a browser. Boxes count as seen until they are first drawn.Based on #14 (
APPEND), which the board build includes. Merge that first.Testing
test_libdmviewpasses 24/24 locally. The new steplibdmview_hidden_boxes_take_no_contactuses a fixture with two screens:The fixtures were assembled with the local todmv (#7), because
run_tests.shuses the registry's, which doesn't haveAPPENDyet. The car HMI is flashed with this build.🤖 Generated with Claude Code