Repository navigation
Backlog
Description
Decided by the user (2026-11-24, on #496): eggshell is shadcn-only. The generated shadcn sheets plus the recorded exceptions are the base look. Code that only exists to keep a second, design-neutral look, or to leave room for another design system, goes.
#496 sizes it at about 2.4–2.8k library lines, ~35–40 tests, 130–220 public items, and no goldens. The rule for every stage below: no golden moves. Goldens are all drawn with the preset or are layout-only, so a moved golden means a live rule was deleted, not a dead one.
Target
- One
Tokenstype, shadcn's: palette, theme colours, light and dark, the shadcn style (Vega, Lyra; The remaining six shadcn styles (nova, maia, mira, luma, rhea, sera) #26 adds Nova and Mira), the density tokens (spacing,radius,text,control_units), fonts and tones. Core's 32-fieldcontract::Tokensand its egui-only fields (control_height,button_padding,text_size,switch_thumb) go, along with thecore_tokensbridge. Style::default()is shadcn Vega, neutral, light. A layout with no style of its own gets that, not a look derived from egui's visuals (Global style changes only through &mut LayoutState (unrepresentable mid-build) #435 Q4 already dropped the implicit fallback).egui_lookstays, so raw egui widgets inside eggshell match.- One look per widget: its generated sheet and its recorded exceptions. There's no Defaults-layer look under it.
- Extensions keep
Extension::derivefor behaviour and metrics. Their look is sheet rules from the generated sheets and exceptions, read from shadcn tokens. No install hook (Extras: write their look as Defaults-layer sheet rules through an extension hook #494 closed).
Stages
Each stage is one PR, cut from main, with cargo xtask integrate green and no golden moved.
- One
Tokens.- Move shadcn's
Tokens,Palette,ThemeColor,ShadcnStyle,TextScale/spacing/radius, fonts and the contrast check into core. The shadcn crate re-exports them until the crate split. - Delete core
contract::Tokens,Tokens::from_eguiandShadcn::core_tokens. - Rule bodies keep
Fn(Tw, &Tokens) -> Tw, now over the one type.
- Move shadcn's
- The base style from the tokens.
- Section filling moves from
Shadcn::style()into core:Style::new(&Tokens), withStyle::default()= Vega light. - Delete:
Style::from_eguiandStyle::derived's egui path;- the
from_eguiofScrollStyle,SplitterStyle,TableStyleandTones; - the restyle setters,
restyleand the publicrewrite_rules.
- The tests that pin the egui-derived look go (listed in Analysis: cost of staying theme-neutral vs. a shadcn-only eggshell #496 §1).
- Section filling moves from
- No Defaults layer.
- Delete:
Layer::Defaults,sheet::Defaults,Sheet::defaults/as_preset/has_rules_atandBuilder::part_over;- the
XDefaultsstructs and writers insrc/owned(button, menu, select, input, tabs, table, tooltip, choice); - the Defaults-layer rule writers (
write_rules,write_select_rules,write_field/checkbox/radio/switch_rules,write_text_roles).
- Audit first: any Defaults rule for a part the generated sheets don't
replaceis live under the preset. Move it into the recorded exceptions rather than lose it. Layer::Presetbecomes the base layer (renamedBase). With nothing under it,replaceis only needed for App rules.
- Delete:
- The extras on the sheet.
- Delete each extra's
from_stylelook and itspart_over(.., Defaults(..), ..)sites. Badge, command, dialog, alert dialog, sheet, hover card, accordion, sonner, skeleton and spinner draw from their generated sheets; markdown, form and notify's own parts get recorded exceptions. - The style structs keep behaviour and layout fields only.
- The shadcn crate's extras mappings (
notify,badge,command,disclosure,form,hover_card,markdown,dialog,typeset_ink) go. So does the rest ofpreset_dumpand the xtask compare step that checked hand-mapped values.
- Delete each extra's
- The crate split, as revised on One crate: merge eggshell-ui-extras and eggshell-ui-shadcn into eggshell-ui (features for opt-in widgets) #366: one move PR.
Out of scope
- The look of any widget. If an audit finds drift between the two looks, the shadcn look wins and the golden diff goes to the user.
- Design note: sheet rules as values (Value<T> token references; Sheet/Style PartialEq, serde) #488 (rule bodies as values): still wanted. It gets simpler on one
Tokenstype.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
samitbasu commentedon Nov 24, 2026
Stage 1 is #498, stage 2 is #499 (stacked on #498). This is the stage 3 worklist that came out of stage 2. In
src/contract.rs, each item is marked// #497 stage 3:.Delete:
src/legacy_defaults.rs, with the XDefaults writers it feeds;StepperStyle::groupandStepperMetrics::height, which nothing reads.Move out of the sections (into the writers as constants, onto
Tokens, or into App-rule features on the part):Style::labelwrite_field_rules, plus the form and markdown extras (onlyrest.textanddisabled.text)CheckboxMetricssize, radius, glyphRadioMetricssize, dotSwitchMetricstrack.x, thumb_off, thumb_onSegmentedStyleSelectStylesizes (height, gap, radius, text)SelectStylechevronMenuStylepadding, item_padding, item_gap, text, shortcut_text, indicatorInputMetricsicon_size, icon_gap;InputStyle::iconicon)TableStylefirst_column_inset, rule_below_last, stripeTableStylerule, rule_widthStepperMetrics::padding_xToggleStyle::sizes' textStays as draw-time fields:
Caveat: slider, progress and stepper read some colours at draw through
Defaults(..)under the sheet. Those go withpart_over.samitbasu commentedon Nov 24, 2026
Plan change (user, 2026-11-24): one crate (#366, reversed). The stages after stage 3:
eggshell-ui-extrasandeggshell-ui-shadcnmove intoeggshell-uias modules.src/sheets, and the importer goes back to one output root.from_stylelook becomes generated sheet rules or recorded exceptions.part_over,Layer::Defaultsandsheet::Defaults;preset_dumpand the compare step;Extensiontype map: each widget's style becomes a plain, feature-gatedStylefield;Tokens::disabled, if nothing outside shadcn's own fading needs it.Shadcnfolds intoStyle/Tokensconstruction.Doing the merge before stage 5 means the extras' looks never need cross-crate plumbing.
samitbasu commentedon Nov 24, 2026
Decided (user, 2026-11-24): stage 5 removes the
Extensiontype map entirely. There is no public hook for third parties.A third-party widget:
Partenum;Tokens(installed by the app throughsheet.as_base());A typed map can come back later without breaking anything, if it's needed.
samitbasu commentedon Nov 24, 2026
Stage 3 is #500 (stacked on #499 ← #498). Below are the worklists for stages 4 and 5, from worker-bee.
Stage 4: one crate (mechanical; the harness and goldens must be identical)
crates/eggshell-ui-extras/src/*into core as modules. Also movecrates/eggshell-ui-shadcn/src/{preset.rs, drag_chip.rs, sheets/*}.eggshell-ui:fonts;extrasand the shadcn crate's features are dropped.src/sheets), one index andcrate::paths. Each extension widget's sheet is gated by that widget's own feature.cfg(feature = "extras")split in preset.rs;eggshell_ui_shadcnre-exports;pubonFontSet::declared/install/inserts,Elevation::shadowandtheme::warn_low_contrast, which go back topub(crate).tests/it, and the shadcn crate's examples intoexamples/.LIBRARY_SOURCES, the clock and spacing-units checks, thefeaturesstep and the compare paths.Stage 5: the extras' looks on the sheet
part_over,sheet::DefaultsandLayer::Defaults, with the extras' ~60part_oversites.Extensiontype map and every extra'sfrom_style/derive. Widget styles become feature-gatedStylefields, holding behaviour and layout only.layout_style's extension block, soShadcn::styleisStyle::new.preset_dumpand the xtask compare step go too.Tokens::disabledandDisabled::{Faded, Colors}. Their remaining users follow shadcn'sopacity-50.Tokens::focus()stays, for the generic node ring.samitbasu commentedon Nov 24, 2026
Decided (user, 2026-11-24): the cargo features for the one crate.
samitbasu commentedon Nov 25, 2026
Decided (user, 2026-11-24): the layout is the one source of the look.
LayoutState::new(theme)requires the light+dark style. The layout gives egui its visuals and fonts from it.Shadcn::apply, the context's token store (theme::tokens(ctx),Shadcn::applied/of),with_styleandStyle::fallback.set_stylestays for switching.kaolin_*,chrome_stacked_by_z) re-render in Geist, for the user to review.This is its own PR after stage 5a (stage 6).
samitbasu commentedon Nov 25, 2026
Decided (user, 2026-11-24): every widget is nested. Core widgets move into submodules too (
owned::button::ButtonChain,owned::menu::…), matching the former extras (owned::badge::…). The flatpub usere-exports inownedgo.This is its own mechanical PR (stage 7). Anything that has to move between modules (e.g.
AccordionPart, from disclosure to accordion) is listed in it.samitbasu commentedon Nov 25, 2026
Decided (user, 2026-11-24), for stage 7 (#505):
button::Chain,table::Part,badge::Style,badge::Ext, and so on. Callers that use two widgets in one file qualify them (button::Part).owned::text_field, the tooltip widget toowned::tooltip, and eachb.<widget>()builder method moves beside its widget.use eggshell_ui::prelude::*brings in every compiled-in widget trait anonymously (as _, feature-gated), plus the common types (Builder,Tw,tw,Style).All three land in #505.
Merge pull request #504 from samitbasu/extras-sheet-497
samitbasu commentedon Nov 25, 2026
Short names, decided (user, 2026-11-24), for #505:
<widget>::Styleand<widget>::Partas the rule gives. Inside a widget's own files, the core types are writtencrate::Style/sheet::Part.DialogKey→dialog::Node,DialogContent→dialog::Content.radio::Chain/Part;toggle::ItemChain;menu::Chain(wasDropdownChain), withmenu::ItemChainkept;segmented::Rows;splitter::Start;input::Part/GroupPart;form::SectionChain;hover_card::Trigger;command::List.Combobox*andAutosuggestChainkeep their names.drag_chip::Chipandtoggle_group::Group.dialog::Dialog,menu::Menu,markdown::Markdown,hover_card::HoverCardandchoice::Choicestay.Merge pull request #505 from samitbasu/nest-widgets-497
samitbasu commentedon Nov 25, 2026
Decided (user, 2026-11-24), stage 6: one shared style. A new
SharedStylehandle (SharedStyle::new(themed)) is the single source. EveryLayoutState::new(&shared)/named(name, &shared)shares it, andshared.set(..)switches every layout at once.LayoutState::set_stylegoes.The clash report remains only as a guard against two different
SharedStyles on one context; its name is still open.samitbasu commentedon Nov 25, 2026
Decided (user, 2026-11-24), stage 6:
SharedStyleis deliberate.Merge pull request #506 from samitbasu/short-names-497
Merge pull request #507 from samitbasu/layout-style-497