# API map of the "Display and status" family: old path to new path and setter renames. # Filled in by the family track; the codemods and the app scan read it. family = "Display and status" new_module = "craft_ui::display" # One entry per public type: `old` is the path an app calls today, `new` the path after migration. # `status` is "pending", "same" (path unchanged), "moved", "replaced" (use `note`) or "removed". [[type]] name = "Badge" old = "craft_ui::controls::badge::Badge" new = "craft_ui::display::Badge" status = "moved" note = "A `Component` shown with `Show::show`: `ui.add(Badge::new(..))` becomes `Badge::new(..).show(ui)`. The tone and the fill style are one `Variant`: `Variant::look(Emphasis::Soft, Tone::Good)` or `Emphasis::Solid`; Neutral soft is the default." [[type]] name = "BadgeTone" old = "craft_theme::BadgeTone" new = "" status = "replaced" note = "Neutral, Accent, Good, Warn, Bad and Info are the `Tone`s of the same names in `Variant::look(emphasis, tone)`." [[type]] name = "BadgeStyle" old = "craft_theme::BadgeStyle" new = "craft_ui::display::BadgeStyle" status = "moved" note = "The enum Soft and Solid is `Emphasis::Soft` and `Emphasis::Solid` in `Variant::look(emphasis, tone)`; `craft_ui::display::BadgeStyle` is the read-only style struct of a badge." [[type]] name = "Kbd" old = "craft_ui::controls::kbd::Kbd" new = "craft_ui::display::Kbd" status = "moved" note = "A `Component` shown with `Show::show`. The chord is text written by `craft_keymap::Chord::display(platform)`, or the chord of a bound command: `Kbd::command(command)`. There is no `KeyboardShortcut` or `OperatingSystem` input, no `Kbd::parts`, `text`, `text_in` or `spoken`." [[type]] name = "Progress" old = "craft_ui::controls::progress::Progress" new = "craft_ui::display::Progress" status = "moved" note = "A `Component` shown with `Show::show`. The accessible name is `.label(..)`; the percentage AccessKit announces is written from the scope's number format. The bar's length is the control height times five; no `width` setter." [[type]] name = "Spinner" old = "craft_ui::controls::spinner::Spinner" new = "craft_ui::display::Spinner" status = "moved" note = "A `Component` shown with `Show::show`, or as the face of a part with `ui.face(part, Spinner::new())`. The size is the control size (`.size(ControlSize)`), the colour the variant's text colour; `Content` and `IconSize` are gone." [[type]] name = "SectionLabel" old = "craft_ui::composites::section_label::SectionLabel" new = "" status = "replaced" note = "`SectionLabel::new(text).show(ui)` is `Section::fixed(text).strength(HeaderStrength::Caption)`: a caption title in the faint shade." [[type]] name = "Text" old = "craft_ui::primitives::text::Text" new = "craft_ui::display::Text" status = "moved" note = "A `Component` shown with `Show::show`. Text is not selectable and takes no focus; `craft_ui::text::SelectableText` is the focusable form. `Text::spans(&[DocRun])` takes the styled spans of `DocText` (font, size, colour, bold, italic, underline, strikethrough, indent) in place of a label's text." [[type]] name = "Icon" old = "craft_ui::primitives::icon::Icon" new = "craft_ui::display::Icon" status = "moved" note = "`Icon::new(IconSpec::svg(IconId::new(name)))` in place of `Icon::new(icons::Icon::Name)`. The size is the control size; the ink is `IconSpec::ink`. Decorative unless `.label(..)` names it." [[type]] name = "Divider" old = "craft_ui::primitives::divider::Divider" new = "craft_ui::display::Divider" status = "moved" note = "A `Component` shown with `Show::show`; `horizontal()` and `vertical()` are unchanged. Content paint draws a rule with `Draw::rule(RuleKind::Divider, from, to)`." # One entry per renamed, removed or reshaped setter or constructor. [[setter]] type = "Badge" old = "tone(BadgeTone)" new = "variant(Variant::look(Emphasis, Tone))" [[setter]] type = "Badge" old = "style(BadgeStyle)" new = "variant(Variant::look(Emphasis, Tone))" note = "Soft and Solid are the emphasis of the variant, set with the tone." [[setter]] type = "Badge" old = "new(text: impl Into)" new = "new(label: impl Into