Skip to content

v0.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 13:54
· 13 commits to main since this release
7591a35

GPUI Kit v0.9.0

GPUI Kit 0.9.0 adds editor and Diff decorations, an application-level icon resolver, theme-configurable cursor blinking and an input edits event, along with many accessibility, menu, table and text-rendering fixes. The default backend moves to gpui-pre 0.3.11 and the optional GPUI Fast backend to 0.1.13.

This is a minor release because public theme structs are now #[non_exhaustive], which breaks struct literals outside the crate. See Breaking changes below for migration.

Editor and text input

  • Gutter and overview ruler decorations: GutterDecorationCollection marks lines in a strip before the line numbers, and OverviewRulerDecorationCollection marks them on the vertical scrollbar track, e.g. for lines added, modified or deleted by version control. Highlight themes now read the created, modified and deleted status colors. (#3704)
  • Edit events: InputEditsEvent is emitted with each InputEvent::Change and carries the batch of InputEdits, each with the document after it, for Input, Textarea and Editor. (#3751)
  • Cursor blinking: Theme::cursor_blink with CursorBlink::steady(), CursorBlink::blinking(interval) and with_idle_timeout configures the caret for every input. The default stays at 500 ms with no idle timeout. (#3713)
  • Native touch selection: set_native_touch_selection leaves selection handles and the edit menu to the platform; set_selected_text_range is now implemented so the platform or IME can move the selection. (#3723)
  • Restore backward selections through set_selected_range, reuse measured wraps during live resize, keep hover working across the whole visible editor after scrolling, and paint editor popups above dialogs. (#3756, #3691, #3734, #3700)

Diff

  • Line decorations and gutter markers: Diff::decorations paints backgrounds on line ranges with DiffDecoration, and Diff::gutter_markers with render_gutter_marker places interactive markers beside lines without changing the selection. (#3703)
  • Keep the vertical scrollbar at the viewport edge when soft_wrap is off. (#3739)

Markdown and text rendering

  • Render reference-style Markdown images, continue alphabetic ordered-list numbering after Z, and preserve list body width in fitted containers. (#3683, #3722, #3759)
  • Draw marked text in a color that reads on its background. (#3746)
  • Fix an application shutdown deadlock during layout cleanup, and avoid resolving the window selection during paint in selectable text. (#3697, #3699)

Components

  • Icon: set_icon_resolver lets the application choose the path every icon is drawn from, including icons drawn inside components, for runtime icon themes. resolve_icon_path serves custom components that draw with svg(). (#3633)
  • Menu: submenu rows are activatable, and a submenu opens on the left only when the right side has no room. (#3714, #3736)
  • Table: column resize follows the point where the drag started. (#3732)
  • Combobox: correct filtered selection events and confirmation. (#3449)
  • VirtualList: rebuild cached geometry when the axis or gap changes, and use the height constraint when a horizontal list infers its height. (#3719, #3720)
  • MessageScroller: the scrollbar reaches the end of padded content. Popover clears focus on close when nothing had focus at open. Toolbar ends its wrap search at the first repeated stop. (#3615, #3718, #3716)
  • Settings: show an empty state for unmatched searches; the sidebar follows scrolling. (#3701)
  • Motion: directly built easing curves with nothing to sample behave as linear. (#3721)
  • Speech: SpeechWaveform gains a liquid appearance, SpeechButton shows the voice while capturing, and macOS privacy access no longer falls on the terminal. (#3725, #3726, #3730)

Accessibility

  • Tables give the focused element the grid role and move assistive-technology focus with the selected row or cell. (#3727, #3758)
  • Menus report checked and unchecked items correctly; command palette rows are named after their item; icon-only close buttons have names. (#3729, #3761, #3728, #3741)

Localization and testing

  • Add Russian (ru) translations. (#3745)
  • Test support can observe painted text and alternative text, and Toolbar is registered for snapshot queries. (#3724, #3717)

Breaking changes

Theme structs are #[non_exhaustive] (#3713, #3704). Struct literals, including ..Default::default(), no longer compile outside the defining crate. Later field additions will not break callers again.

  • gpui-base: Theme, SemanticThemeTokens, ColorTokens, RadiusTokens, SpacingTokens, TypographyTokens, TextStyleToken, ShadowTokens, ResizableTheme, ListSettings
  • gpui-component: Theme, ThemeColor, ThemeToken, ThemeSet, ThemeConfig, ThemeConfigColors, Semantic*Config, MotionTokens, HighlightTheme, HighlightThemeStyle, SyntaxColors, SheetSettings, NotificationSettings

Start from Default::default() or the existing constructor (ColorTokens::light, ShadowTokens::elevations, …) and assign fields:

-let theme = Theme { radius: px(4.), ..Default::default() };
+let mut theme = Theme::default();
+theme.radius = px(4.);

DisplayMap is no longer UnwindSafe / RefUnwindSafe.

Upstream GPUI compatibility

gpui-pre 0.3.11 / gpui-fast 0.1.13 (#3766):

  • Window::text_system() returns &Rc<WindowTextSystem> instead of &Arc, and WindowTextSystem is no longer Send/Sync.
  • Animation reads the executor clock instead of Instant::now(), so it follows the test clock. Tests that slept on the wall clock should use advance_clock.

Thank you to everyone who contributed code, documentation, testing, and feedback!

What's Changed

  • input: Reuse measured wraps during live resize by @T-miracle in #3691
  • setting: Show an empty state for unmatched searches and follow scrolling in the sidebar by @huacnlee in #3701
  • diff: Add line decorations and interactive gutter markers by @huacnlee in #3703
  • text: Render reference-style Markdown images by @huacnlee in #3683
  • text: Fix application shutdown deadlock during layout cleanup by @T-miracle in #3697
  • selectable_text: Avoid resolving window selection during paint by @costajohnt in #3699
  • input: give editor popups POPUP_PRIORITY so they paint above dialogs by @sola-ryu in #3700
  • message_scroller: Let the scrollbar reach the end of padded content by @lab1207 in #3615
  • input: Configure cursor blinking through the theme by @huacnlee in #3713
  • icon: Let the application resolve the path every icon is drawn from by @iamngoni in #3633
  • menu: Make submenu rows activatable by @luan in #3714
  • virtual_list: Use the height constraint when a horizontal list infers its height by @boboshan in #3720
  • popover: Clear focus on close when nothing had it at open by @boboshan in #3718
  • test: Register Toolbar for snapshot queries by @boboshan in #3717
  • toolbar: End the wrap search at the first repeated stop by @boboshan in #3716
  • virtual_list: Rebuild cached geometry when the axis or gap changes by @boboshan in #3719
  • text: Continue alphabetic ordered-list numbering after Z by @Reuben006 in #3722
  • motion: Sample directly built easing curves with nothing to sample as linear by @boboshan in #3721
  • command: Name each palette row after its item by @transilluminate in #3728
  • input: Add a native touch selection opt-out by @Ziinc in #3723
  • editor: Add gutter and overview ruler decorations by @bcl-dev in #3704
  • speech: Show the voice in SpeechButton while capturing by @ylinwind in #3726
  • speech: Add a liquid appearance to SpeechWaveform by @ylinwind in #3725
  • test: Observe painted text and alternative text by @Ziinc in #3724
  • speech: Disclaim the terminal's responsibility for privacy access on macOS by @ylinwind in #3730
  • table: Give the focused element the grid's role by @transilluminate in #3727
  • menu: Report a checked item's check to assistive technology by @transilluminate in #3729
  • input: Hover the whole visible editor after scrolling by @PieWhite in #3734
  • menu: Open a submenu on the left only without room on the right by @transilluminate in #3736
  • table: Resize a column from where the drag started by @transilluminate in #3732
  • a11y: Name the icon-only close buttons by @ualtinok in #3741
  • locales: Add Russian (ru) by @beshkenadze in #3745
  • text: Draw a mark's text in a color that reads on its background by @ganeshmshetty in #3746
  • diff: keep the vertical scrollbar at the viewport edge when soft_wrap is off by @romakuchukov in #3739
  • input: Expose edits from the latest change by @dedalqq in #3751
  • input: Restore backward selections through set_selected_range by @wangdiandao in #3756
  • combobox: Correct filtered selection events and confirmation by @ruiyangke in #3449
  • table: Move assistive technology focus with the selected row or cell by @Elitelord in #3758
  • menu: Report an unchecked option as unchecked to assistive technology by @madcodelife in #3761
  • text: Preserve list body width in fitted containers by @ttizze in #3759
  • gpui: Upgrade to gpui-pre 0.3.11 and gpui-fast 0.1.13 by @huacnlee in #3766
  • chore: Bump v0.9.0 by @huacnlee in #3769

New Contributors

Full Changelog: v0.8.1...v0.9.0