feat(components): chip + content_card + inspector_row + list_section_label + empty_state#7
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
All free-fn style (per AGENTS.md). Match the existing primitive conventions (`&Tokens` for colour, `rounding_*()` helpers, animated where applicable).
CI gates locally clean
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.