Skip to content

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 11:41
· 12 commits to main since this release
95a1563

Changes since v0.3.0.

Theme and foundation

  • Expose Material 3 custom colors and harmonization behind dynamic-color (CustomColorGroup, harmonize_color, ColorScheme::custom_color, and ColorScheme::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}, and ThemeScope::density.
  • Support Home/End in move_roving_focus (unifying keyboard navigation across NavigationDrawer, Stepper, List, Menu, RadioGroup, ButtonGroup, Toolbar, and FabMenu) and Home/End/PageUp/PageDown in range_semantics for Slider.

Components

  • Add TextField::show_label(bool), density-aware default minimum height with TextField::min_height(Pixels), and TextField::indicator_width(unfocused, focused).
  • Add variant shorthand constructors (filled, tonal, elevated, outlined on ToggleButton; standard, filled, tonal, outlined on IconToggleButton) and controlled .loading(bool) busy state to ToggleButton and IconToggleButton.
  • Add .show_label(bool) and .label_content(...) to Checkbox, Radio, and Switch, and preserve caller-supplied Radio::track_focus(&FocusHandle) handles inside RadioGroup.
  • Add Slider::track_focus(RangeThumb, &FocusHandle) for caller-owned thumb focus handles.
  • Support Backspace/Delete keyboard removal on focused removable Chip actions, and add group-level .tonal(bool), .elevated(bool), and .disabled(bool) defaults to ChipGroup.
  • Add Feed::accessible_label with Role::List semantics and promote Feed to Verified (62/62 documented components verified in CI), alongside standalone SupportingPane::new narrow toggle coverage.
  • Fix NavigationDrawer font 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) and contextmenu key triggering for ListItem::on_long_press, caller .track_focus preservation in List and ListSection, .track_focus / .interaction_source across SwitchTile, CheckboxTile, RadioTile, SliderTile, and ChoiceTile, ChoiceTile accessible value description, and .trailing(...) on CheckboxTile and RadioTile.
  • Add Badge::{visible, offset} and scaled-font min_h fix, Card::{content_padding, gap, accessible_label} with rounded child clipping, Text::{align, max_lines, color_override}, public Icon::{inherit_color, color_override}, and DropTarget::{track_focus, interaction_source} with disabled Role::Button preservation, ThemeScope action binding, and dynamic corner radii.

Extras

  • Add SemanticTone support to ButtonGroup, ButtonGroupItem, and SplitButton; fix Toolbar and CaptionButtons focus ring tokens to ColorRole::Secondary; add ToolbarAction::with_icon and overflow menu icons; add SearchView Home/End and input-Down navigation plus SearchState::trigger_focus and SearchBar::track_focus; add TimePicker dialog options, DatePicker/TimePicker::disabled, and DatePickerState/TimePickerState::trigger_focus; add CaptionButtonLabels localization for CaptionButtons and TitleBar.

Overlays and menus

  • Enhance Menu::context() and MaterialElementExt::context_menu(...) to open at the secondary-click cursor position (viewport-clamped, repositioning on subsequent right-clicks), avoid hijacking trigger Enter/Space actions, and support Shift+F10 and ContextMenu keyboard triggers; add lazy builders Menu::new_with and MaterialElementExt::context_menu_with, plus Menu::disabled(bool).
  • Add Sheet::show_header(bool) and apply Sheet::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(), and DialogState::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) and Tooltip::hide_delay(Duration) overrides.

Gallery

  • Reorganize the Gallery around top-level Components, Styles, and Examples sections with a grouped Material 3 sidebar catalog, an interactive Overview landing page (hero shapes, live theme preset swatches, interactive controls, and grouped component cards), dedicated Color (with click-to-copy hex swatches), Typography, Shape (with interactive 35-shape inspector), and Motion style reference pages, and a status bar displaying the active theme and package version while keeping existing Story IDs compatible.
  • Redesign all 50 component pages around a Live preview | Specs layout with a local ThemeScope preview canvas, declarative Configuration card (scenarios, controls, and reset), live Rust Code snippet card with copy action, and lazy-loaded full Specs views, plus a live breakpoint badge on the Adaptive layout example page.

Performance

  • Guard no-op state updates against redundant cx.notify() and window.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 Release perf_bench suite.

Contributors

Full Changelog v0.3.0...v0.3.1