Repository navigation
libdmview: dragging a scroll box scrolls it - #16
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>
As the format describes it: a contact moving past .scrollslop (8 px by default) is taken over by the scroll box around where it went down - the nearest one that scrolls that way - and the box pressed is released, not clicked; the content follows the contact, clamped to it. It was not done at all: a SCROLL box could only be scrolled by SCROLLTO. OPACITY 0's documentation says what a box not seen does now: it takes no contact. 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
Dragging a
SCROLLbox now scrolls it, asdocs/assembly.mdhas always described. Until now it wasn't implemented: a scroll box could only move throughSCROLLTO. The car HMI's song queue couldn't be scrolled because of this..scrollslop(8 px by default), the scroll box around the point where it went down takes the contact over. That's the topmost box there, or the nearest ancestor that scrolls along the direction of the movement (the other direction as a fallback).RELEASEwithoutCLICK, and stops looking pressed.scroll_to(), nowview_scroll_to()for input.c).The docs for
OPACITY 0now say what #15 does: the box takes no contact.Based on #15, which is based on #14. Merge them first.
Testing
test_libdmviewpasses 25/25 locally. The new steplibdmview_drags_scroll_boxesuses a 20 px box of 40 px content: a red row that is a button, then a green row.The fixture is assembled with the local todmv, because
run_tests.shuses the registry's, which doesn't haveAPPEND. The car HMI is flashed with this build, and the queue is aSCROLL 224, 314box (dmvs_html).🤖 Generated with Claude Code