Repository navigation
gpuicn v0.9.0
gpuicn v0.9.0
The consistency release. Every component now reads every color, size, radius,
shadow and duration from the theme through one set of primitives, a lint keeps
it that way, and setting up a themed app is one command. The runtime pins are
unchanged: GPUI Kit 0.9.0 on gpui-pre 0.3.11 and gpui-icons 0.6.0.
One-command setup
cargo install gpuicn-cli --version 0.9.0 --locked
gpuicn new my-app --base-color zinc --appearance dark
cd my-app && cargo runui::app::run: the startermain.rsis a window title, a theme pair and
a root view.app::run(AppConfig::new("My App").themes(light, dark), |_, _| Root)
opens the platform with the Lucide assets, loads the bundled Geist fonts,
installs the pair, follows the operating system's appearance and opens the
window.AppConfig::installdoes the same without a window.- Theme pairs:
UiTheme::set_pair,UiTheme::set_appearancewith
Appearance::{Light, Dark, System}, andtheme::follow_system. - shadcn's base colors:
gpuicn initwritesassets/theme.cssfrom
neutral, stone, zinc, mauve, olive, mist or taupe and generates
src/ui/app_theme.rs.gpuicn theme set --base-color stone --radius 0.5rem --appearance darkchanges it;gpuicn theme import theme.csstakes a theme
from the shadcn theme editor or tweakcn;gpuicn theme previewprints every
token. gpuicn updatemoves an app to a release (config, Cargo pins, fonts,
theme files, thenstatus);gpuicn doctorchecks everything against
the CLI's release and prints a fix per finding;gpuicn remove --unused
deletes components your code never names.gpuicn.tomlis version 2 with a[theme]table. Version 1 files still load.
Consistent by construction
- Primitives in
theme::primitives:text,icon,focus,disabled,
surface,control,clipped_image,dismiss,hover_reveal_in_group.
Every component uses them; the registry lint incrates/ui/testsfails a
change that reintroduces a raw color, text size, opacity, mode branch,
popover background, hover state, key glyph orpub(crate)item. - Focus is one 3px outer ring in
ringat 50%, shown through
focus_visible, on every control. - Tokens: status colors (
success,warning,info, with foregrounds),
destructive_foreground,typography(xs to xl with line heights),
breakpoints, and derivedcontrol()colors per mode. Every GPUI Kit
component color follows a token (a test enumerates them). - Motion:
transition_withandpresence_withover the theme durations,
UiEasing::Emphasized; dialogs fade in and no longer scroll themselves. - Input and Textarea share one
InputCore; Message hover actions use a group
instead of state.
Reliability
- MessageList has a position-based scrollbar (
MessageListScrollbar)
that estimates unmeasured rows from the measured average, so the thumb
tracks position in long histories instead of jumping as rows are measured
(#83). Passscrollbar_handleto share one across re-renders. - Toast schedules on deadlines instead of polling every 50ms.
- Tooltip installs one Escape interceptor for the application.
- Every component is drawn in both themes by a test; interactive ones have
behavior tests incrates/ui/tests/catalog.rs.
Message
density(MessageDensity::Compact): one line per post, the time always in
the gutter, the name inline, half the row padding (#88).
For contributors
- One preview file per component under
site/src/previews/;
cargo xtask new-component <name>scaffolds a component everywhere the
catalog expects one.docs/design.mdstates the rules. - Releases ship
catalog-screenshots-<tag>.zip, the light and dark sheet of
every preview, anddocs/screenshots/v0.9.0holds this release's.
Breaking changes
UiTheme::shadowsentries areArc<[BoxShadow]>; call.to_vec()where a
Vecis needed.sidebar_is_mobile(window, cx)takes the window.UiColors::slotis public but#[doc(hidden)].
Upgrading
cargo install gpuicn-cli --version 0.9.0 --locked --force
gpuicn update --to 0.9.0 # config, pins, fonts, theme files; then `gpuicn diff`
gpuicn update --overwrite # replace installed files once your edits are reviewed
gpuicn doctorApps that keep their own main.rs can switch to ui::app::run or keep
calling ui::theme::init(cx); doctor accepts both.