Skip to content

frontend: fix elements left unstyled by the primitive rename - #21

Merged
valentinps merged 1 commit into
mainfrom
fix-list-row-classes
Aug 3, 2026
Merged

frontend: fix elements left unstyled by the primitive rename#21
valentinps merged 1 commit into
mainfrom
fix-list-row-classes

Conversation

@valentinps

Copy link
Copy Markdown
Owner

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.

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>
@valentinps
valentinps merged commit 38809ad into main Aug 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant