Repository navigation
v0.3.0
Changes since v0.2.0.
API and migration
- Breaking: Rename the optional
windows-chromeCargo feature andgpui_material::windows_chromemodule towindow-chromeandgpui_material::window_chromeacrossgpui-material-extras,gpui-material, andgpui-material-gallery, and remove the Windows-only compilation gate. - Breaking:
IconNameaddsIconName::VisibilityandIconName::VisibilityOff. Update exhaustiveIconNamematches to cover the new variants, or add a fallback arm.
Window chrome and cross-platform defaults
- Add cross-platform
window_chromesupport covering Windows native hit testing and Snap Layouts, macOS native traffic-light centering (title_bar_window_options_with_height) and leading inset spacing, and LinuxDecorations::Client/Decorations::Server+WindowControlsintegration. - Expand
TitleBarandCaptionButtonswith customizable.height(...),.title(...),.title_role(...),.title_font(...),.title_font_family(...),.title_font_size(...),.leading(...),.trailing(...),.traffic_light_padding(...),.colors(TitleBarColors),.caption_colors(CaptionButtonColors),.caption_button_width(...),.show_caption_buttons(...),.on_close(...), and.platform(ChromePlatform), replacing hardcoded"Segoe UI"and"Segoe Fluent Icons"with Material theme typography and vector caption icons. - Update
FontFamilies::default()ingpui-material-themewith cross-platform Latin and CJK fallbacks (SF Pro Text,Segoe UI,Noto Sans,PingFang SC,Microsoft YaHei UI,Noto Sans CJK SC) and enablecargo gallery --window-chromeon all desktop targets.
Components
- Add
ButtonTone(Default,Danger,Success,Warning,Info) semantic shortcuts toButton,ToggleButton,IconButton, andIconToggleButtonwhile preserving per-instanceButtonColorsandButtonBorderprecedence. - Promote
SemanticToneto core (retainingpub type ButtonTone = SemanticTone;) and propagate.tone(SemanticTone)acrossBadge,Chip,Dialog(.confirm_tone),MenuItem(plus.destructive()),Snackbar,LinearProgress, andCircularProgress; addBadge::{standalone_label, standalone_count, color_role},Dialog::{alert, on_confirm},MenuItem::{shortcut, divider},SnackbarHost::{push_message, replace},Tooltip::shortcut, variant/typography shorthands onButton,IconButton,Card,Chip,TextField, andText(including.muted()), and the fluent postfixMaterialElementExttrait (.badge_dot(),.badge_label(...),.badge_count(...), and withfeedback:.tooltip(...),.context_menu(...)). - Add
.track_focus(&FocusHandle)toChip,Checkbox,Radio,Switch, andCard, preserveThemeScopein toggle and selection/list/card action callbacks, match disabled label opacity and single-line truncation acrossCheckbox,Radio, andSwitch, clip splitChipprimary and removal action feedback along the interior seam, and keep overlapping rangeSliderthumb selection responsive after zero-delta drag moves. - Add core
Avatardisplay component (initials,icon,imagewith.fallback,custom,AvatarSize,AvatarShape,AvatarColors) and overlappingAvatarGroupstack with uniform sizing, surface-matched cutout rings,+Noverflow truncation, RTL mirroring, and summary accessibility labels. - Add core presentational
EmptyStatelayout shell with an optional decorative icon container (MaterialShapepolygon orCornerShapebackdrop) or custom.visual, title, supporting copy/content, centered RTL-aware primary/secondary action slots, and configurable.max_width/.title_role. - Add four M3E convenience components without new feature-group dependency edges: in-flow
Banner(feedback, withSemanticTone, actions, dismiss, andRole::Status/Role::Alert), controlledChipGroup(selection, withSingle/SingleRequired/Multipleselection,.single_select, wrapping/scrollable layout, and roving focus), coreSkeleton(rect/text_line/circle/shapeplaceholders onLoopClock+is_bounds_visiblewith zero offscreen/reduced-motion frames), and width-responsiveBreadcrumbs(navigation, collapsing middle segments into an anchored MaterialMenu). - Add
ButtonGroup::connected,.single_select, and.single_optional_selectergonomics shortcuts togpui-material-extras(expressive-groups). - Add
DropTarget(surfacesfeature) for external OS file drops (ExternalPaths) and typed in-app GPUI drag payloads with validation feedback and optional click/keyboard activation. - Add
Stepper(navigationfeature) with horizontal and vertical orientations,StepStatus,.active_step,.non_linear, RTL mirroring, and roving keyboard navigation. - Add standalone
NavigationDrawer(navigationfeature) with Standard and Modal (side-sheet) modes, sections, headers, dividers, 56 dp pill indicators, and roving vertical navigation. - Add
BottomAppBar(navigationfeature) with 80 dp Material styling, action and trailing FAB slots,Scaffold::bottom_barcompatibility, andAppBarScrollBehavior/AppBarScrollStatehide-on-scroll support. - Add settings convenience tiles
SwitchTile,CheckboxTile,RadioTile,SliderTile(surfaces+selection),ChoiceTile/ChoiceOption(surfaces+feedback), andListSection/ListSectionItem(surfaces) with optionalLabelMediumsection headings, true M3E Segmented grouped corner geometry (16/4, 2 dp gap), and unified vertical roving focus. - Add
Button::loading(bool)andIconButton::loading(bool)(actionsfeature, no dependency onfeedback) with busy accessibility semantics, activation suppression, resting-width preservation, and an inline Material circular spinner respectingis_bounds_visibleandreduced_motion. - Bundle official Material Symbols Outlined
IconName::VisibilityandIconName::VisibilityOff(both fill variants) from the pinned upstream revision. - Fix
Sheet::expandabledrag handle creating an unlabeled keyboard tab stop, delayTooltipmotion sampling until its trigger anchor is measured, preventSnackbarHostfirst-frame zero-width layout and bound exiting queue growth under reduced motion, and defer render-time transition notifications acrossNavigationRail,AdaptiveNavigation, andAdaptivePaneState.
Inputs
- Add
TextFieldObfuscationMode(Hidden,Visible) andTextField::obfuscation_mode(...)forTextField::securevisibility toggles, re-exportTextFieldMaskPatternthrough theinputsfeature facade, and add Gallery examples and tests covering password visibility toggling, structured mask patterns, and pre-commit validation. - Add
TextField::clearable(bool)(.clear_label(...)) andTextField::visibility_toggle(visible, on_toggle)(.visibility_labels(show, hide)) inside theinputsfeature without adding a dependency onactions, automatically syncing secure obfuscation mode and preserving focus. - Add
ExposedDropdown::with_shared_optionsforO(1)Rc<[DropdownOption]>option sharing, accelerate dropdown filtering with zero-allocation ASCII case-insensitive matching and cached active indices, reserve trailing inset forTextFieldresting labels when.trailing(...)is present, and cache per-frame character counts.
Performance, theme, foundation, and symbols
- Store all 61 Material color roles inline in
ColorSchemefor allocation-freeO(1)lookups and blending, exposeColorScheme::baseline,appearance, andcolorasconst fn, and preserve the compact{ appearance, overrides }serdeformat. - Cache resolved system and custom
Fontfamily descriptors and letter-spacedLineLayoutruns ingpui-material-foundation, cache tessellatedShapestroke paths and transparentSurfacerounded feedback geometry, prune finished ripples beforeEscapecancel checks, and exposeelevation_shadow_pairfor allocation-free canvas shadow painting. - Accelerate
clipped_ripplewith precomputed 64-gon unit-circle normals and inscribed-disk / triangle-AABB fast paths. - Add
const fnconstructors and accessorsSymbolAxes::new,SymbolAxes::is_filled, andSymbolAxes::get_weightingpui-material-design-symbols, and cache outlined SVG bytes by(codepoint, axes)inSymbolFont::svg_dataso repeated lookups and alias symbols share a singleArc<[u8]>. - Snapshot
Menuexit rows lazily, short-circuitAdaptivePaneStatehistory resolution once all three pane roles are assigned, replace per-frame multi-pane geometryVecallocations with stack arrays, and avoid redundant root layout passes and focus map clones inAdaptiveNavigation,AppBar,Scaffold, andNavigationItems. - Binary-search single-line ellipsis truncation in
Text, deduplicateExtendedFablabel shaping, reuse cached rounded feedback geometry and stack-allocatedelevation_shadow_pairshadows acrossButton,Chip,Card,ListItem, and selection ripples, add static corner and line-count fast paths inListItem, reuse activeDisplayScrollbarfade wake timers across intermediate scroll frames, predefineconstProgresseasing curves, and skip redundantSwipeToDismisswidth notifications when settled at rest. - Optimize
gpui-material-extrasruntime hot paths: releaseSearchStateresult focus handles when returning to idle, replaceO(N)search result focus scans withO(1)scope checks, skip redundantSearchViewandDatePickerstate updates when idle, cache monthly calendar day IDs and accessible labels alongside static day, two-digit, and dial-mark tables, reuse activeScrollFieldsettle timers across rapid scroll events, precompute containedCarouselkeylines once per layout and share measured layouts without extra next-frame re-renders, skip zero-radiusCarouselParallaxcorner paths, preserveButtonGroupfocus handles and cached label widths across unchanged renders, and gateToolbarfootprint animation frame requests onexit_direction.is_some().
Gallery
- Lazily instantiate Gallery story views on first visit while retaining visited story state, scope
ModalExamplesentity creation to the active story (DialogvsSheets), exclude the desktopGalleryshell fromwasm32builds, and consolidate Gallery tests into a single test binary.
Contributors
Full Changelog v0.2.0...v0.3.0