Skip to content

feat(components): chip + content_card + inspector_row + list_section_label + empty_state#7

Merged
kakarot-dev merged 1 commit into
masterfrom
feat/chip-card-row-section-empty
Jun 12, 2026
Merged

feat(components): chip + content_card + inspector_row + list_section_label + empty_state#7
kakarot-dev merged 1 commit into
masterfrom
feat/chip-card-row-section-empty

Conversation

@kakarot-dev

Copy link
Copy Markdown
Contributor

Round 2 of the Tokito editor migration foundation (VtronTokito/tokito#26).

The editor's chrome files (`place_panel`, `inspector`, `bom`, `research`, …) lean on a handful of `crate::ui::layout::*` primitives that the desktop crate currently owns. Moves them to `tokito_ui` so the editor port slices can land cleanly.

What's added

Component Replaces legacy Sites
`chip` `crate::ui::layout::filter_chip` 9
`content_card` `crate::ui::layout::content_card` 14
`inspector_row` `crate::ui::layout::inspector_row` 7
`list_section_label` `crate::ui::layout::list_section_label` 3
`empty_state` `crate::ui::layout::empty_state` 1

All free-fn style (per AGENTS.md). Match the existing primitive conventions (`&Tokens` for colour, `rounding_*()` helpers, animated where applicable).

CI gates locally clean

  • `cargo fmt --all -- --check`
  • `cargo clippy --all-targets -- -D warnings`
  • `cargo build`
  • `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps`

Next

After this merges, the in-flight tokito PR (tokito#52) bumps the rev once more and ports `place_panel`, `inspector`, `bom`, `research`, `build`, `agent`, `command_palette`, `console`, `messages`, `layout`, `chrome`, `design_manager`, `editor/`, and `app/` off the legacy modules. `mcad_viewer` + `viewer3d.rs` (the 3D mesh stack) are explicitly left alone for now.

…label + empty_state

Round 2 of the Tokito editor migration foundation. Adds the legacy
crate::ui::layout primitives that the editor's chrome files (place_panel,
inspector, bom, research, …) lean on heavily.

## chip
`pub fn chip(ui, t, label, selected) -> bool` — toggleable pill, like
`badge` but clickable and with a selected state. 28 px high, rounded_sm.
Replaces legacy `filter_chip` (9 call sites in the editor).

## content_card
`pub fn content_card(ui, t, |ui| …)` — bordered, padded panel for grouping
content. Grows to fit; not clickable. Distinct from `card` which is fixed-
size + clickable. Replaces legacy `content_card` (14 call sites).

## inspector_row
`pub fn inspector_row(ui, t, label, value)` — label-on-left + value-on-
right key/value row for inspector / property panels. Replaces legacy
`inspector_row` (7 call sites).

## list_section_label
`pub fn list_section_label(ui, t, label, count)` — small "Symbols (24)"
style group label. Smaller than `section_header`, meant for dense
scrollable lists. Replaces legacy `list_section_label` (3 call sites).

## empty_state
`pub fn empty_state(ui, t, message)` — centred "nothing here" placeholder
card. Replaces legacy `empty_state` (1 call site).

## Docs
- README component table — 5 new rows
- AGENTS.md component list updated

## CI gates locally clean
- `cargo fmt --all -- --check`
- `cargo clippy --all-targets -- -D warnings`
- `cargo build`
- `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps`

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kakarot-dev kakarot-dev merged commit cd4ffa8 into master Jun 12, 2026
1 check passed
@kakarot-dev kakarot-dev deleted the feat/chip-card-row-section-empty branch June 12, 2026 10:33
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