Repository navigation
dmvs_html: script texts in every look; class changes put only what they change - #6
Merged
Merged
Conversation
Two things a list on a hidden screen (a page's screen not shown yet) got wrong, both seen in the car HMI's queue: - The text a script sets (innerText) was its variable only in the element as the page has it; in its other looks - laid out in another state, a class the script changes (the playing row's) - the text was the page's, as it was before the script: clicking a row showed the design's titles. A look's elements now keep the element they are a look of (`like`, set as the looks are matched), and a text is painted from its variable. - A class that hides the element (visibility) was not converted when the element was hidden anyway - by its screen, as the page is: hidden then and hidden after, nothing changed. The opacity a change compares, binds and fades to is now the element's own (its own visibility; what the boxes around it inherit stays theirs), and an element hidden by itself is revealed by a change that shows it - its inside by its own visibility, or as its parent then is. The rows a list had too many of stayed on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A change put every variable its element is bound to - its place and its opacity - as the change lays it out. An element's classes change independently, though: the car HMI's rows are faded by `invisible` (the list is shorter) and given `row-active` (the one playing); picking a track removed row-active from the hidden rows and put their opacity back, and they showed again. A change of a class now puts what adding or removing that class does to the element: its place if one of them moves it, its opacity if one of them fades it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
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
This fixes two bugs in a list on a screen that is hidden as the page loads (a page's screen not shown yet). Both showed up in carhmi-demo's queue.
1. The text a script sets now shows in every look of an element
innerTextbecame a variable only in the element as the page has it. Its other looks are the element laid out in another state, for example a class the script changes (the playing row'srow-active). Those looks were painted with the page's original text, as it was before the script ran. Clicking a row therefore brought back the design's titles ("Neonowe Noce", "Cyberpunk City", ...).Now a look's elements keep
like, the element they are a look of; it is set where the looks are matched to the page (seen_like). A text is painted from that element's variable, while the look's own style (for example the active colour) still applies.2. A class that hides an element is converted even when its screen hides it too
classList.add('invisible')on a row of a hidden screen compared "hidden before" with "hidden after". Visibility is inherited from the screen, so nothing seemed to change and the class was dropped silently. A list showed rows it had too many of.visibility(style_t::visibility: inherited / visible / hidden).own_opacity()). Whatever the boxes around it hide stays their concern: the screen still hides it through its own opacity.3. A change of a class sets only what that class changes
A change set every variable its element is bound to (its place and its opacity) to how the change lays it out. An element's classes change independently, though: rows are faded by
invisiblewhen the list is shorter, and givenrow-activefor the one playing. Picking a track removedrow-activefrom the hidden rows, which also set their opacity back, and they reappeared.Now a change of a class sets the element's position only if adding or removing that class moves it, and its opacity only if adding or removing it fades it.
Test plan
dmvs_html_converts_a_list_on_a_hidden_screen: no look shows the page's original text, and every row has an opacity variable starting at 255, and picking a row sets no row's opacity. The test fails without the fix (8 expectations) and passes with it; all tests pass.class_effectsthe picking check failsTEXT; rows 0–9 fade by$row_N_alpha(0–4 shown, 5–9 hidden)🤖 Generated with Claude Code