You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Style structs: move the no-preset looks into Defaults-layer sheets, and delete the look fields #482
From #446's Phase 2 audit. The epic's checklist says each migrated control "deletes its style struct". Phase 2 ships with only ButtonStyle deleted. Every other control's struct (SelectStyle, MenuStyle, SliderStyle, TableStyle, …) still holds:
(A) the control's own no-preset look, written as the Defaults layer by write_*_rules or passed through part_over;
(B) metrics and behaviour: sizes, transitions, delays, list heights, and the values the recorded exceptions read.
Proposal:
move (A) into Defaults-layer sheets (as code, or generated from a neutral base), so the look lives only in sheets;
shrink each struct to (B), or fold (B) into tokens and part metrics where that's natural;
the preset's redundant look writes are removed in Phase 2 itself.
After Phase 2 merges. Breaking: it removes the public look fields.
Scoped during Phase 2. This also absorbs removing the shadcn preset's dead look writes, which was planned for Phase 2 but moved here because it's the same analysis:
The writes: the preset writes look values for 17 families (about 800 lines of preset.rs). Under the preset, its own generated replace cuts most of them.
Not all are dead: some look fields are also metrics or sources. MenuStyle's row metrics feed virtual-list estimates and the disclosure, hover card, skeleton and command list (from_style); SelectStyle feeds the text field and the command palette.
Tests that assert struct values ("the preset gives the skeleton shadcn's look", slider style(theme).slider) must be rewritten to assert the drawn node before a write goes.
From #487: at a non-default density, a text field's height still comes from control_height (fed to egui's interact_size.y in map_input_as), not from the generated h-9/h-8 × spacing. #487 pins it at 36 as a known gap. #482 must resolve it, so the consumer's 28 pt controls apply to fields as well as buttons.
Plan approved by the user (2026-11-23). The full plan is in the coordinator's notes; in summary:
Field height, padding and radius come from the resolved InputPart::Root classes (h-9/h-8 × spacing), so fields follow the density. control_height, button_padding, input_padding, control_gap, toggle_padding_x, cell_padding, popup_padding and item_padding are deleted from the shadcn Tokens. The remaining metrics move to units.
The no-preset look stays in code: crate-private XDefaults built from egui's visuals in Style::from_egui, written as Defaults rules (the ButtonStyle precedent).
The public look setters are removed (set_tooltip, set_table, set_menu, set_input, set_select, set_label, set_checkbox, set_radio, set_switch, set_segmented). A setter stays only for behaviour, and Style::at_current_layer goes if nothing needs it. Apps restyle with App/Scope sheet rules.
Activity
samitbasu commentedon Nov 22, 2026
Scoped during Phase 2. This also absorbs removing the shadcn preset's dead look writes, which was planned for Phase 2 but moved here because it's the same analysis:
preset.rs). Under the preset, its own generatedreplacecuts most of them.MenuStyle's row metrics feed virtual-list estimates and the disclosure, hover card, skeleton and command list (from_style);SelectStylefeeds the text field and the command palette.style(theme).slider) must be rewritten to assert the drawn node before a write goes.The number field's look from shadcn's input group, on the sheet (#446)
samitbasu commentedon Nov 23, 2026
From #487: at a non-default density, a text field's height still comes from
control_height(fed to egui'sinteract_size.yinmap_input_as), not from the generatedh-9/h-8×spacing. #487 pins it at 36 as a known gap. #482 must resolve it, so the consumer's 28 pt controls apply to fields as well as buttons.samitbasu commentedon Nov 23, 2026
Plan approved by the user (2026-11-23). The full plan is in the coordinator's notes; in summary:
InputPart::Rootclasses (h-9/h-8× spacing), so fields follow the density.control_height,button_padding,input_padding,control_gap,toggle_padding_x,cell_padding,popup_paddinganditem_paddingare deleted from the shadcnTokens. The remaining metrics move to units.XDefaultsbuilt from egui's visuals inStyle::from_egui, written as Defaults rules (theButtonStyleprecedent).set_tooltip,set_table,set_menu,set_input,set_select,set_label,set_checkbox,set_radio,set_switch,set_segmented). A setter stays only for behaviour, andStyle::at_current_layergoes if nothing needs it. Apps restyle with App/Scope sheet rules.ToggleStyleis split out as Toggle: a generated look, and sizes that follow the spacing #490.Shape: one PR, one commit per family:
TokenscleanupThe guard: no golden moves at the default tokens. A moved golden stops the work.