Repository navigation
GPUI Kit v0.10.0
GPUI Kit 0.10.0 is a minor release. It moves the optional GPUI Fast backend to 0.1.16, adds global right-to-left layout, an explicit reduced-motion preference, roving keyboard navigation in Tabs, opt-in match highlighting in Select / Combobox / Command, and a long run of input, text, table and accessibility fixes. Two small breaking changes in the input API make this a minor release.
Breaking Changes
- Textarea:
TextareaMode::Extrasis nowTextareaExtrasinstead of(). Only code that names this associated type is affected. (#3970)- type Extras = (); + type Extras = TextareaExtras;
- Input:
EditorState::text_gutter_margin()is replaced bytext_origin_offset() -> Option<Pixels>. (#3765) - GPUI Fast 0.1.16: every
Elementnow getsIntoElementfrom GPUI Fast itself. Apps built on thegpui-fastfeature must drop their ownimpl IntoElement for X { type Element = Self; ... }on element types, or they will not compile. The default gpui-pre backend is unchanged.
New APIs
- Layout: global right-to-left layout direction. (#3886)
- Motion: an explicit reduced-motion preference. (#3881)
- Select, Combobox, Command: opt-in
highlight_matches, with a newlist.highlight.foregroundtheme color. (#3959, #3960) - Input:
set_tokensand text decorations onTextareaState,context_menu_offset, and the editor text origin offset. (#3971, #3970, #3920, #3765) - Table:
TableRow::id,TableRow::hover, andDataTable::scrollbar_mode. (#3907, #3912, #3945) - Text:
TextView::linkto replace or drop links, and an option to keep raw HTML in Markdown as text. (#3743, #3979) - Components:
Checkbox::indeterminate,SidebarGroup::suffix,NumberInputstepper option,Diff::split_ratio,MessageScroller::scroll_to_offset,SelectableTexthighlights, and tooltip anchor offsets. (#3980, #3982, #3748, #3883, #3922, #3929, #3874) - Locales: Japanese. (#3976)
Editor and text input
- Move the caret and delete by grapheme cluster; reveal the caret after a long single-line paste; report a preedit kept by
unmark_textas a change; keep IME candidates on the matching row. (#3887, #3967, #3965, #3939) - Hit-test past the gutter, open completion menus above the caret when they do not fit below, let Copy with no selection reach the window selection, keep the tab indicator inside its tab. (#3921, #3925, #3915, #3983)
- Textarea: no newline on secondary Enter, and no scrolling at fractional scales while auto-growing. (#3879, #3882)
Markdown and text rendering
- Fold white space as HTML does, parse
<pre>as a code block, lay out several images inline, and number list items correctly after a sub-list. (#3949, #3899, #3898, #3876) - Code spans: count oversized insets once per line, keep leading white space beside a fold. (#3972, #3962)
- Selection: triple click selects a line or wrapped paragraph, drag auto-scroll starts at an edge that hides text, a press on a control keeps the selection, a cursor set on
TextViewreplaces the I-beam. (#3930, #3942, #3928, #3951, #3966, #3927, #3964)
Components
- Table: no per-frame redraw of a striped table that does not fill its area, and no per-row cross-axis measure. (#3978, #3868)
- Tooltip: animate width between tooltips, wrap long text within
max_w, show one tooltip when nested in a native.tooltip(). (#3957, #3975, #3896, #3914) - Diff: keep split columns beside a long line, keep the header in view when switching modes, collapse many files in one rebuild. (#3958, #3884, #3935)
- Button: spinner on a loading button without icon, no focus on right/middle press, no hover style while disabled. (#3908, #3924, #3943)
- Select, Popover, Dialog, Dock, Settings, Slider, Attachment, Tabs, Title bar: keep menu height while searching; keep a popover open for clicks in its child popup; offset stacked dialogs by open dialogs only; let the skin size a closed dock; fold the settings page from its title; slider keyboard shortcuts; animated GIF previews; roving Tabs navigation; keep a title-bar click that moves a pixel. (#3944, #3909, #3897, #3931, #3947, #3919, #3903, #3900, #3918)
- Window, WebView, Theme, Native menu: end mouse gestures when the compositor eats MouseUp, redraw after releasing the composition surface, Windows scrollbar convention, reject bad hex digits instead of panicking, SVG sniffing across a split character. (#3643, #3986, #3895, #3936, #3890)
Accessibility
- Expose single- and multi-line input text, labels and disabled inputs to assistive technology; numeric
SetValueon Slider; a visible label on the copy button; Tab leaves selection controls that become disabled. (#3818, #3894, #3937, #3877, #3963, #3910, #3872, #3875)
Dependencies
- GPUI Fast 0.1.16; gpui-pre stays at 0.3.12.
Contributors
Thank you to everyone who contributed to this release
@huacnlee, @madcodelife, @shiz92, @JackLuciano, @wangdiandao, @jeonsu0609, @yuluod, @nxtvoid, @kevin9327, @Bombatomica64, @ylinwind, @vinevard, @ualtinok, @Tunglies, @taoqf, @sodekim, @since2006, @shreeve, @sassman, @PanicIsReal, @mycodecrafting, @m-gebhardt, @Map1en, @kossoy, @iam4x, @Elitelord, @davonium, @costajohnt, @bet4it, @aetoskevin.
What's Changed
- base: Turn on
test-supportfor gpui-base's own tests by @shreeve in #3869 - table: Skip per-row cross-axis measure and add a frame benchmark by @huacnlee in #3868
- base: Preserve Tab exit when focused selection controls become disabled by @wangdiandao in #3872
- number_input: Add stepper option by @taoqf in #3748
- base: Allow tooltip requests to set the anchor offset by @wangdiandao in #3874
- input: expose the editor text origin offset by @wangdiandao in #3765
- text: Number a list item once when a paragraph follows its sub-list by @m-gebhardt in #3876
- input: Report a disabled input as disabled to assistive technology by @Bombatomica64 in #3877
- number_input: Stop the frame from claiming the editor's focus by @huacnlee in #3875
- input: Don't insert newline on secondary Enter in Textarea by @huacnlee in #3879
- input: Keep auto-grow Textarea from scrolling at fractional scales by @huacnlee in #3882
- motion: Add an explicit reduced-motion preference by @wangdiandao in #3881
- diff: Keep the file header in view when switching modes at the top by @jeonsu0609 in #3884
- diff: Add
split_ratioto size the Split columns by @jeonsu0609 in #3883 - input: Move the caret and delete by grapheme cluster by @davonium in #3887
- chore: Enforce workspace redundant_clone lint by @Tunglies in #3838
- text: Add TextView::link to replace or drop links by @ualtinok in #3743
- base: Add global right-to-left layout direction by @huacnlee in #3886
- native_menu: Detect SVG data when the 256-byte sniff splits a character by @kevin9327 in #3890
- docs: Add FAQ on GPUI, gpui-pre and GPUI Fast by @huacnlee in #3892
- input: Expose a single-line input's text to screen readers by @PanicIsReal in #3818
- tag: Remove hover style that never shows by @huacnlee in #3893
- input: Expose a multi-line input's text to screen readers by @huacnlee in #3894
- theme: Follow Windows' scrollbar convention when syncing with the system by @madcodelife in #3895
- tooltip: Wrap long text within
max_winstead of overflowing the background by @madcodelife in #3896 - dialog: Offset a stacked dialog by open dialogs only by @madcodelife in #3897
- text: Lay out a paragraph of several images inline by @madcodelife in #3898
- text: Parse an HTML
<pre>as a code block by @madcodelife in #3899 - attachment: Animate a GIF preview instead of freezing on its first frame by @shiz92 in #3903
- docs: Use an explicit modifier in the Action guide's
KeyBinding::newexamples by @shiz92 in #3913 - website: Document that a custom Button variant fills with its color at 20% by @shiz92 in #3911
- tooltip: Show one tooltip when a component tooltip sits inside a native
.tooltip()by @shiz92 in #3914 - table: Add
TableRow::hoverso a row can take a style under the pointer by @shiz92 in #3912 - tabs: Add roving keyboard navigation to Tabs by @huacnlee in #3900
- popover: Keep a popover open on a press in a popup opened from inside it by @shiz92 in #3909
- input: Let Copy with nothing selected pass on to the window selection by @shiz92 in #3915
- docs: Stop the close click in the Tabs guide's closeable tabs example by @shiz92 in #3916
- table: Add
TableRow::idso a row keeps its identity when rows reorder by @shiz92 in #3907 - text_selection: Start a drag's auto-scroll at an edge that hides text by @shiz92 in #3928
- plot: Draw a label at the font weight it asks for by @shiz92 in #3917
- docs: Correct the Tabs guide where it names methods that do not exist by @shiz92 in #3905
- title_bar: Keep a control's click when the press moves a pixel by @shiz92 in #3918
- slider: Add the keyboard shortcuts the guide lists by @shiz92 in #3919
- selectable_text: Add highlights by @shiz92 in #3929
- button: Show a spinner on a loading button that has no icon by @shiz92 in #3908
- text_selection: Select the line on a triple click beside it by @shiz92 in #3930
- markdown: Look up MathJax in
website/node_modulesinstead of the removeddocs/directory by @madcodelife in #3923 - button: Keep a right or middle press from focusing a
Buttonby @madcodelife in #3924 - input: Open the completion and code action menus above the caret when they do not fit below by @madcodelife in #3925
- story: Let the
DescriptionList,MenuandTagdemos shrink to fit the docs embed by @madcodelife in #3926 - input: Add
context_menu_offsetso a custom menu knows the text under the pointer by @shiz92 in #3920 - message_scroller: Add
scroll_to_offsetto restore a saved reading position by @shiz92 in #3922 - skills: Use an icon the component
IconNamehas in the usage reference by @shiz92 in #3932 - dock: Let the skin decide a closed dock's extent by @huacnlee in #3931
- theme: Reject non-hex digits in parse_hex instead of panicking by @kevin9327 in #3936
- label: Expose a label's text to assistive technology by @Elitelord in #3937
- diff: Collapse or expand many files in one rebuild by @sassman in #3935
- input: restrict multiline IME candidate bounds to the matching row by @bet4it in #3939
- input: Hit-test
character_index_for_pointpast the gutter and on every line by @shiz92 in #3921 - button: Ignore hover and active styles while a base Button is disabled by @JackLuciano in #3943
- selectable_text: Redraw when a run's own selection changes by @shiz92 in #3927
- settings: Fold and unfold the shown page from its title by @since2006 in #3947
- text: Fold white space in Markdown the way HTML draws it by @yuluod in #3949
- text_view: Select the whole wrapped paragraph on a triple click over inline code by @huacnlee in #3942
- table: Add
scrollbar_modetoDataTableby @JackLuciano in #3945 - clipboard: Add a visible label to the copy button by @sodekim in #3910
- chore: Fix
redundant_clonelints reported by Rust 1.100 by @madcodelife in #3954 - text_selection: Keep the selection on a press on a control that acts on it by @jeonsu0609 in #3951
- select: Keep the menu height while searching by @JackLuciano in #3944
- select, combobox, command: Add opt-in highlight_matches for query matches by @JackLuciano in #3959
- text: Let a cursor set on
TextViewreplace the hover I-beam by @ylinwind in #3966 - text: Keep a code span's leading white space when a fold starts beside it by @yuluod in #3962
- slider: Handle numeric accessibility SetValue requests by @wangdiandao in #3963
- input: Report a preedit kept by unmark_text as a change by @Bombatomica64 in #3965
- text: Key the link tooltip target by rendering by @iam4x in #3964
- theme: Add a
list.highlight.foregroundcolor for search match highlights by @JackLuciano in #3960 - diff: Keep split columns on screen beside a long line by @JackLuciano in #3958
- input: Reveal the caret after a long single-line paste by @mycodecrafting in #3967
- input: add text decorations to
TextareaStateby @nxtvoid in #3970 - input: add
set_tokensto swap a textarea's tokens in place by @nxtvoid in #3971 - tooltip: Animate the width when switching between tooltips by @JackLuciano in #3957
- text: Count an oversized code span's insets once per line when wrapping by @costajohnt in #3972
- tooltip: Fix switching_tooltips_animates_the_width under GPUI Fast by @huacnlee in #3975
- locales: Add Japanese (ja) by @Map1en in #3976
- table: Don't redraw a striped table every frame when its rows don't fill it by @vinevard in #3978
- input: Keep the tab indicator inside its tab by @JackLuciano in #3983
- text: Add an option to keep raw HTML in Markdown as text by @aetoskevin in #3979
- docs: Use Label so Quick Start text reaches screen readers by @huacnlee in #3973
- sidebar: Add
suffixto SidebarGroup for header actions by @JackLuciano in #3982 - webview: Redraw after releasing the composition surface by @huacnlee in #3986
- checkbox: Add
indeterminateto show a mixed state by @JackLuciano in #3980 - window: End mouse gestures when the compositor consumes MouseUp by @kossoy in #3643
- chore: Bump v0.10.0 by @huacnlee in #3992
New Contributors
- @taoqf made their first contribution in #3748
- @m-gebhardt made their first contribution in #3876
- @jeonsu0609 made their first contribution in #3884
- @davonium made their first contribution in #3887
- @Tunglies made their first contribution in #3838
- @PanicIsReal made their first contribution in #3818
- @shiz92 made their first contribution in #3903
- @bet4it made their first contribution in #3939
- @JackLuciano made their first contribution in #3943
- @since2006 made their first contribution in #3947
- @sodekim made their first contribution in #3910
- @mycodecrafting made their first contribution in #3967
- @nxtvoid made their first contribution in #3970
- @Map1en made their first contribution in #3976
- @vinevard made their first contribution in #3978
- @aetoskevin made their first contribution in #3979
Full Changelog: v0.9.1...v0.10.0