Skip to main content

Module card

Module card 

Source
Expand description

Component group โ€” one collapsible section per component on the entity.

Deliberately flat: a chevron, an icon, a name, a category tag, and a hairline. It used to be a bordered, filled card per component, which turned a five-component entity into boxes inside boxes inside a panel โ€” the structure stopped being readable exactly when there was enough of it to need reading. Hierarchy now comes from type and spacing.

The row actions (enable toggle, remove) appear on hover. They are rare and destructive-adjacent; the resting state should read as data, not as a toolbar.

Constantsยง

HEADER_H ๐Ÿ”’

Functionsยง

category_for ๐Ÿ”’
The domain a component belongs to, shown as a small right-aligned tag.
render_card
Renders one component as a flat collapsible group and calls body for its content. Open/closed state persists in EditorState::inspector_card_open, keyed by entity index + component title.