frontend: fix elements left unstyled by the primitive rename - #21
Merged
Conversation
The selection dialogs rendered their rows as raw text -- "Concrete51,836"
with no column, hairline or hover -- because selection.js still built them
from .itemLocationRow/.itemLocationLabel/.itemLocationCount, which were
replaced by the .row/.row-label/.row-count primitives. Both the "List
objects" and "Total inventory" views go through that one renderList, so
both were affected.
Auditing every class the JS emits against the classes the stylesheets
actually define turned up two more of the same mistake:
- finditem.js built the vehicle modal's "Fuel loaded" label with
.buildingModalSectionLabel; every other call site had become
UI.kicker() when that class was removed.
- panels.js toggles .is-active on the hamburger to mark "the layers dock
is collapsed", but the rule was never renamed from .panelHidden, so
the accent that says "click here to get the panel back" was gone.
tools/ui_classes.py is that audit, kept. It flags any element built with
no styled class at all, which is exactly this failure mode, and ignores
the normal case of a feature hook sitting next to a primitive
(`el("div", "row row-hover networkRow")`). No browser and no save needed,
so it is cheap to run after any rename. Verified it reports the bug above
when reintroduced, and is clean otherwise.
Co-Authored-By: Claude Opus 5 (1M context) <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.
The selection dialogs rendered their rows as raw text -- "Concrete51,836" with no column, hairline or hover -- because selection.js still built them from .itemLocationRow/.itemLocationLabel/.itemLocationCount, which were replaced by the .row/.row-label/.row-count primitives. Both the "List objects" and "Total inventory" views go through that one renderList, so both were affected.
Auditing every class the JS emits against the classes the stylesheets actually define turned up two more of the same mistake:
tools/ui_classes.py is that audit, kept. It flags any element built with no styled class at all, which is exactly this failure mode, and ignores the normal case of a feature hook sitting next to a primitive (
el("div", "row row-hover networkRow")). No browser and no save needed, so it is cheap to run after any rename. Verified it reports the bug above when reintroduced, and is clean otherwise.