Repository navigation
v0.3.1
Changes since v0.3.0.
Theme and foundation
- Expose Material 3 custom colors and harmonization behind
dynamic-color(CustomColorGroup,harmonize_color,ColorScheme::custom_color, andColorScheme::custom_color_with_contrast). - Add ergonomic M3 helpers:
Argb::{from_rgba, with_alpha, alpha, red, green, blue},ColorRole::on_role,ColorScheme::with_color,MaterialTheme::{with_colors, with_typography, with_motion, with_layout, with_density, with_direction},CornerShape::{uniform, top, bottom, start, end}, andThemeScope::density. - Support
Home/Endinmove_roving_focus(unifying keyboard navigation acrossNavigationDrawer,Stepper,List,Menu,RadioGroup,ButtonGroup,Toolbar, andFabMenu) andHome/End/PageUp/PageDowninrange_semanticsforSlider.
Components
- Add
TextField::show_label(bool), density-aware default minimum height withTextField::min_height(Pixels), andTextField::indicator_width(unfocused, focused). - Add variant shorthand constructors (
filled,tonal,elevated,outlinedonToggleButton;standard,filled,tonal,outlinedonIconToggleButton) and controlled.loading(bool)busy state toToggleButtonandIconToggleButton. - Add
.show_label(bool)and.label_content(...)toCheckbox,Radio, andSwitch, and preserve caller-suppliedRadio::track_focus(&FocusHandle)handles insideRadioGroup. - Add
Slider::track_focus(RangeThumb, &FocusHandle)for caller-owned thumb focus handles. - Support
Backspace/Deletekeyboard removal on focused removableChipactions, and add group-level.tonal(bool),.elevated(bool), and.disabled(bool)defaults toChipGroup. - Add
Feed::accessible_labelwithRole::Listsemantics and promoteFeedtoVerified(62/62 documented components verified in CI), alongside standaloneSupportingPane::newnarrow toggle coverage. - Fix
NavigationDrawerfont scaling (NavigationItems::font_scale), RTL section header/headline alignment,.divider_before(...)across.entries/.section/.push_section, and icon tint inheritance (.inherit_color()). - Add
List::{accessible_label, item},ListItem::tone(SemanticTone), desktop secondary click (MouseButton::Right) andcontextmenukey triggering forListItem::on_long_press, caller.track_focuspreservation inListandListSection,.track_focus/.interaction_sourceacrossSwitchTile,CheckboxTile,RadioTile,SliderTile, andChoiceTile,ChoiceTileaccessible value description, and.trailing(...)onCheckboxTileandRadioTile. - Add
Badge::{visible, offset}and scaled-fontmin_hfix,Card::{content_padding, gap, accessible_label}with rounded child clipping,Text::{align, max_lines, color_override}, publicIcon::{inherit_color, color_override}, andDropTarget::{track_focus, interaction_source}with disabledRole::Buttonpreservation,ThemeScopeaction binding, and dynamic corner radii.
Extras
- Add
SemanticTonesupport toButtonGroup,ButtonGroupItem, andSplitButton; fixToolbarandCaptionButtonsfocus ring tokens toColorRole::Secondary; addToolbarAction::with_iconand overflow menu icons; addSearchViewHome/Endand input-Downnavigation plusSearchState::trigger_focusandSearchBar::track_focus; addTimePickerdialog options,DatePicker/TimePicker::disabled, andDatePickerState/TimePickerState::trigger_focus; addCaptionButtonLabelslocalization forCaptionButtonsandTitleBar.
Overlays and menus
- Enhance
Menu::context()andMaterialElementExt::context_menu(...)to open at the secondary-click cursor position (viewport-clamped, repositioning on subsequent right-clicks), avoid hijacking triggerEnter/Spaceactions, and supportShift+F10andContextMenukeyboard triggers; add lazy buildersMenu::new_withandMaterialElementExt::context_menu_with, plusMenu::disabled(bool). - Add
Sheet::show_header(bool)and applySheet::max_width(Pixels)to side sheets as well as bottom sheets (keeping the 400 dp side-sheet default). - Add
Dialog::confirm_disabled(bool),Dialog::confirm_loading(bool),DialogState::focus_handle(), andDialogState::scroll_handle(). - Add
Snackbar::dismiss_label(...),SnackbarHost::pending_len(),SnackbarHost::clear_queue(cx), and pause timed snackbar auto-dismiss while hovered or focused. - Add
Tooltip::show_delay(Duration)andTooltip::hide_delay(Duration)overrides.
Gallery
- Reorganize the Gallery around top-level
Components,Styles, andExamplessections with a grouped Material 3 sidebar catalog, an interactive Overview landing page (hero shapes, live theme preset swatches, interactive controls, and grouped component cards), dedicatedColor(with click-to-copy hex swatches),Typography,Shape(with interactive 35-shape inspector), andMotionstyle reference pages, and a status bar displaying the active theme and package version while keeping existingStoryIDs compatible. - Redesign all 50 component pages around a
Live preview | Specslayout with a localThemeScopepreview canvas, declarativeConfigurationcard (scenarios, controls, and reset), live RustCodesnippet card with copy action, and lazy-loaded fullSpecsviews, plus a live breakpoint badge on theAdaptive layoutexample page.
Performance
- Guard no-op state updates against redundant
cx.notify()andwindow.refresh()calls across Foundation theme updates (set_material_theme,set_window_material_theme), Components (PullToRefreshState,SwipeToDismissState,BottomSheetState,Tooltip,ExposedDropdownState,AppBarScrollState), and Extras (SearchScrollState,ToolbarScrollState,ScrollFieldState,DatePickerState,TimePickerState). - Virtualize the Gallery component catalog with
gpui::list, cache filtered catalog indices on search input changes, and skip no-op navigation and window-move notifications, cutting Gallery shell frame overhead by 58%–75% in the Releaseperf_benchsuite.
Contributors
Full Changelog v0.3.0...v0.3.1