Skip to content

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 12:26
· 365 commits to main since this release
bbc93af

Added

Core

  • Rebindable edit shortcuts. Every widget tree registers edit.undo,
    edit.redo, edit.cut, edit.copy, edit.paste, edit.paste_plain and
    edit.select_all (StandardEdit) on their usual chords, in an edit
    category. ShortcutSettings lists them under Edit, named in the
    application's language, so a user can rebind them or give them a second
    chord. StandardEdit is in the prelude.

  • BuildContext::register_shortcut_shared and
    ShortcutRegistry::register_shared register a global shortcut that several
    widgets declare together. It stays registered while any of them lives.

  • clear_focus. EventContext::clear_focus and
    WidgetTree::clear_focus drop the keyboard focus, so nothing is focused.
    A click on space that takes no focus still keeps it, as in Qt and AppKit;
    on_tap(|_, ctx| ctx.clear_focus()) on a background gives the browser
    behaviour.

  • AccessibilityInfo, from WidgetTree::accessibility_node, carries a
    node's value, numeric value and range, and custom-action labels, after the
    application's access_* overrides.

  • OverlayPlacement::BelowSelection, the mirror of AboveSelection: below
    a rectangle, flipping above when there is no room.

  • AsyncCompletionHandle::drain_into runs the completions of
    spawn_local_with against a headless tree, each with an EventContext, so
    a handler that shows a toast or a modal after an await can be tested.
    spawn_local_with no longer panics in a context without a window.

  • WidgetTree::try_accessibility_node answers None for a destroyed
    widget, and AccessibilityInfo::published says whether assistive
    technology can reach the node: a dormant page, an excluded or merged
    subtree and a hidden node are not published.

  • BuildContext::attached_tap_buttons reads the buttons an on_tap
    attached to a node from outside answers to.

  • WidgetTree::declared_cursor(id) reads the cursor a widget declares, and
    tells a declared Default from none, so a test can check a .cursor(..)
    without hovering it. current_cursor is documented: the cursor shown now,
    which changes as the pointer enters or leaves a node.

Widgets

  • Rebindable editor shortcuts. RichTextEditor declares format.bold,
    format.italic, format.underline and format.insert_paragraph
    (FormatShortcut), and CodeEditor declares code.toggle_comment and
    code.duplicate (CodeShortcut), on their usual chords. They are listed in
    ShortcutSettings under Format and Code while an editable editor exists. A
    read-only viewer declares none. Toggle comment also answers Ctrl+Shift+/,
    for the layouts that type / with Shift.

  • localize_standard_shortcuts names the standard edit shortcuts of a
    registry in the active language. teksilo-app calls it for every window.

  • ShortcutSettings has a toolbar: a search field, "Find by keys" (press a
    chord to list the commands that use it), "Modified only" and "Reset all…".
    ShortcutSettings::toolbar(false) hides it; modified_only(signal) binds
    the "Modified only" state.

  • keystroke_parts returns the label of each key of a chord, one per key cap.

  • BuiltInIcons has reset and keyboard icons.

  • GridView::detail_row_when says which tiles have a detail band, from
    the same TileContext detail_row receives. A tile it refuses is no longer
    offered to a screen reader as expandable, and activating it opens nothing.
    Without it, every tile is still offered as one.

  • TextInput appearance. TextInput and TextInputField take a
    text_style (a typography role that follows the theme, or a fixed style),
    shaped at its size and in its family, with the placeholder matching and the
    field's height following the line; a text_alignment that places a text
    narrower than the field at its start, centre or end, the caret, clicks,
    selection and IME window following; and a text_color from a colour, a
    role or a signal, for instance one colour at rest and another while
    focused. TextInput::min_height replaces the field's minimum height, under
    the default, Fluent and macOS styles alike.

  • Slider::jump_on_press moves the value when a mouse button goes down
    on the slider, not when a drag starts or the button is released; touch and
    pen are unchanged. value_tooltip_placement puts the value readout above
    or below the thumb, or at the pointer while dragging
    (SliderValueTooltipPlacement), and value_tooltip_style gives it a
    tooltip style of its own.

  • GridView::min_columns and max_columns bound the column count of
    fixed-width and adaptive tiles; a minimum the width cannot afford narrows
    the tiles rather than overflowing. column_alignment places a block of
    columns narrower than the viewport at the leading edge, the centre or the
    trailing edge.

  • ScrollArea scrolls sideways on Shift+wheel when it can scroll
    horizontally, like TabBar and the table views;
    shift_wheel_scrolls_horizontally(false) turns it off.
    reveal_bars_on_hover(true) shows overlay scroll bars while the pointer is
    over the area.

  • SplitterModel::set_pane_visible_immediate hides or shows a pane without
    sliding it.

  • MenuList::inset sets the gap between a menu's surface and its rows
    (4 dp by default), and MenuList::surface_style gives one menu its own
    popover style, ahead of the theme's, without touching combo-box dropdowns.

  • A ButtonStyle can pick the label colour per interaction state with
    label_text_role_for, for example to brighten it on hover. Existing
    styles and the presets are unchanged.

  • MessageBox::title_alignment and button_alignment place the title and
    the buttons, for instance centred as in a macOS alert.

  • Checkbox and RadioButton take label_style, label_color,
    caption_style and caption_color.

  • Scroll handles on the data views. handle() on ListView,
    TreeView, TableView, TreeTableView and GridView returns a
    cloneable handle that scrolls the mounted view to an item
    (scroll_to_index / ensure_index_visible, scroll_to_row /
    ensure_row_visible, and GridViewHandle::reveal_band). It can be taken
    before mount, survives rebuilds, and is applied at the next layout, so it
    lands on the right item after a same-turn insert, expand or opened detail
    band, also with auto-measured row heights.

  • GridView::detail_visible_span_signal reports which part of the open
    detail band is on screen, so a band holding hundreds of rows can build
    only the rows in view.

  • PopoverWidget::on_close_with tells the callback why the popover closed
    (DismissReason).

  • The keyboard cursor of a data view. GridViewHandle, ListViewHandle
    and TreeViewHandle gain cursor(), set_cursor(..) and a read-only
    cursor_signal(). In a multiple selection the cursor moves apart from the
    selection; setting it moves the focus ring and the announced item without
    moving keyboard focus, the selection or the scroll position.

cargo-teksilo

  • symbol lists a struct's public fields, with their types and docs,
    and says when the struct also has fields that are not public. The theme
    token structs (ColorTokens, TypographyTokens, TextStyle, …), whose
    whole API is their fields, can now be read from the tool. -f json gains
    fields and restricted_fields on each struct.

  • symbol shows what each enum variant carries: KeyDown { key: Key, modifiers: Modifiers, text: Option<String> }, Fraction (f32). The JSON
    variants gain the same shape.

  • symbol finds methods and free functions. A name that is not a type
    answers with its owner instead of "unknown type": symbol subscribe_frame_tick shows the method on BuildContext and says to look
    up BuildContext for the rest; symbol spawn_blocking shows the free
    function in teksilo-async. A trait's method comes first (on_tap is
    WidgetBuilder's). Type::method narrows to one owner, and a name with
    many owners (new) lists the Type::name forms to pick from.

  • symbol finds macros: the procedural macros (res!, tr!,
    teksu!, #[derive(IntentKind)]) with their crate's usage doc, and every
    #[macro_export] macro (compile_in_locales!, lit!) with the forms it
    accepts. They answered "unknown type" before.

  • symbol says where to import each item from: an Import: line
    under every type, function, constant and macro gives the shortest use
    path through teksilo (teksilo::core::ObserverHandle,
    teksilo::prelude::Theme), the umbrella feature it needs when a default
    build lacks it (WebView: web-view-headless or web-view), the crate to
    add when teksilo does not re-export it (teksilo_scene::SceneView), or
    that nothing outside its crate can reach it. -f json gains imports,
    every path, best first. rustc suggests none of these paths.

  • symbol prints methods under the doc of the impl block they are
    written in
    : WidgetTree's test API now reads as "Simulated input" and
    "Test inspection", each introduced by what it is for.

  • status reports the teksilo-automation-mcp on PATH, and whether
    its version matches the app's teksilo; when it does not, it prints the
    cargo install teksilo-automation-mcp --version <x> line. --json gains
    automation_server.

  • symbol prints a setter's default when the type's constructor sets
    the field to a literal: HStack::spacing defaults to 0.0.

  • symbol resolves an enum variant to its enum: symbol FixedColumnCount shows GridSizing.

Automation

  • inspect_node and layout_tree report each widget's declared cursor,
    and query_pointers gives the hovering pointer the cursor the window
    shows.

Documentation

  • The generated catalog pages list the same fields and variant payloads,
    and each item's import path.
  • The layout guide and the skill say that a widget added as a tree's root
    is laid out at the whole viewport, and how to test one at its own size.

Changed

Core

  • Behaviour change: a shortcut whose intent no Action handles no longer
    consumes its key: the focused widget receives it as a plain KeyDown. An
    intent every action passed on with Propagated counts as not handled.

  • Behaviour change: an application shortcut on Ctrl+Z, Ctrl+Y,
    Ctrl+X, Ctrl+C, Ctrl+V, Ctrl+A, Ctrl+Shift+Z or Ctrl+Shift+V
    now shares its chord with a standard edit shortcut. Handle the edit.*
    intent with an Action instead. The same holds for Ctrl+B, Ctrl+I,
    Ctrl+U and Ctrl+Enter while a RichTextEditor exists, and Ctrl+/ and
    Ctrl+D while a CodeEditor does.

  • Behaviour change: under a touch or a pen, a widget with no width or
    height no longer catches a press that misses near it.

  • Breaking. OverlayPlacement has a new variant, so an exhaustive
    match on it needs a BelowSelection arm. TextInputStyleConfig has a
    new min_height field.

  • The Debug text of a mounted widget built with handler methods says the
    handlers moved to the tree, instead of showing an empty set with
    cursor: None.

Widgets

  • Behaviour change: undo, redo, the clipboard and select-all in
    TextInput and the fields built on it, RichTextEditor, CodeEditor and
    LogView, and select-all in ListView, TreeView, TableView,
    TreeTableView and GridView, follow the edit.* bindings instead of
    fixed chords. A command a widget declines (Cut or Paste in a read-only
    field, a command its filter refuses) reaches an application's Action for
    the same intent.
  • Behaviour change: bold, italic, underline and the forced paragraph
    insert in RichTextEditor, and comment and duplicate in CodeEditor,
    follow the format.* and code.* bindings instead of fixed chords.
  • The context menus of those editors show the bound chord.
  • A TableView or TreeTableView without a multi selection mode no longer
    takes Ctrl+A.
  • CommandPalette does not list the standard edit commands, nor the
    format.* and code.* ones.
  • Behaviour change: ShortcutSettings is redesigned. Chords are drawn as
    key caps and are the controls: clicking one, or Enter on it, records a new
    chord in place, and the + beside it adds an alternative. The Rebind,
    Rebind 2nd and Reset buttons are gone; a changed row is marked with a dot
    and gets its own reset button.
  • Behaviour change: ShortcutSettings asks before it takes a chord from
    another command (confirm_conflicts is on by default).
  • ShortcutSettings refuses a chord without Ctrl, Alt or ⌘ (except function
    keys), and the chords the system or the framework keeps (Ctrl+Tab, Alt+F4,
    Alt+Tab, ⌘Tab, ⌘Space and others), and says why.
  • ShortcutSettings is one Tab stop; the arrow keys, Home and End move
    between its rows and columns. Each control's accessible name says the
    command and its chord, and the group titles are headings.
  • ShortcutSettings sorts commands by name and groups by title, in the
    interface language, translates all its text, and searches the text of the
    chords instead of the internal ids. A shortcut that is currently disabled
    can still be rebound.
  • Behaviour change: Shift+wheel scrolls a ScrollArea that can scroll
    sideways horizontally (see Added).
  • Behaviour change: in a right-to-left layout, a GridView of
    fixed-width tiles that leaves width over now puts its columns at the right
    edge, its leading edge.
  • child_opt on VStack, HStack, ZStack, Grid, ColumnFlow,
    MasonryLayout and Wrap takes a widget id, as child does.
  • GridView::ensure_index_visible leaves a tile that is already fully
    visible alone, whatever the anchor.

Fixed

Core

  • A focus request into a control that the same handler reveals was
    lost.
    Showing a Switcher page or a visible_when branch and asking for
    focus on a control in it moved the focus, at the next layout, to the page's
    first control, or dropped it. The request now waits for that layout and
    focuses the control it named.

  • accept_tap_buttons retargeted a widget's own click. Widening an
    application's on_tap on a Slider to the secondary button made a right
    click jump the value and a left click do nothing. A tap mask (and the
    double-tap, triple-tap and long-press masks) now applies to the handlers
    set beside it; a widget's own keep their buttons.

  • A popover that opens on a right click closed and reopened on a second
    right click on its trigger. A press on the trigger now toggles it whenever
    the trigger accepts that button.

Widgets

  • set_column_pinning(id, PinnedSide::None) could not unpin a column
    declared pinned
    on a TableView or a TreeTableView: it put the column
    back on its declared side. It now unpins it, as dragging the column out of
    its pane does. Giving the column's declared side removes its override.

  • Removing a row from a large keyed selection in a ListView or a
    TableView cost the row count times the selection.
    The selection now
    drops the removed keys after reading each of the view's keys once, as a
    GridView's does.

  • An OverlayTrigger around a composite control did not open on a pointer
    click
    when the control's focus stop handled taps itself: only Enter,
    Space and a screen reader's click opened it. It now opens on the click,
    with the button mask the application set.

  • ComboBox announced a value its trigger did not show when the bound
    selection was not among the items. It now announces the placeholder it
    shows.

  • A cursor-only move in a ListView or TreeView was not announced.
    With a multiple selection, Ctrl+arrows moved the cursor but a screen
    reader kept hearing the old row as current.

cargo-teksilo

  • symbol dropped the enum variant after each plain // comment inside
    an enum: the comment and the variant were read as one unnamed variant.
    Key lost A, F1 and CapsLock this way, and AutomationOp,
    CodeCommand and EditCommandKind lost variants too. A comment after the
    last variant showed as an unnamed variant (AnimatedQuadKind).

  • status reported an older release's Claude skill as missing once
    every one of its files differed from this release's, which is the usual
    case two releases on. It now lists the copy as differing and prints the
    agent install claude --force line, at project and at user scope.

  • symbol Widget described the code editor's widget.rs, and symbol Paint the rich text editor's paint.rs: a module of the same name in the
    searched crate hid the type the umbrella re-exports. Both, and Path,
    Rect, Theme and Color under --crate, now resolve to that type.

  • symbol and the catalog pages left out the methods a type defines in
    other files.
    WidgetTree showed 134 of its 322: none of the test API
    (click, tap_with, touch_down, advance_time, tab_stops_within)
    or of dispatch_pointer. TreeView showed 1 of 37, SceneView 2 of 93
    and OverlayManager 48 of 49. A type now lists every inherent method its
    crate writes for it.

Documentation

  • The icons guide said no image texture is ever freed, and advised
    ImageWidget::new(&icon) for runtime images such as album covers. Since
    0.16.0 an ImageWidget::from_raw texture goes with the first frame that
    does not draw the widget. The guide now separates the shared textures a
    window keeps (res!(), ImageWidget::new, IconWidget::from_raster)
    from the ones that follow what is on screen, and recommends from_raw
    for images that come and go.
  • The documented change order of ListModel::reconcile_by_key is what it
    emits: the removals, then one pass in target order in which moves, updates
    and inserts interleave, each index valid after the previous change.
  • About thirty doc comments that an old edit had duplicated, or spliced into
    the neighbouring item (RadioButton::on_change, MenuItem::for_shortcut,
    TreeView::scroll_bar_style and others), document their own item again.
  • The Below, Above and BelowPreferred placements say that they widen
    an overlay to at least its anchor's width, and the overlay guide shows how
    to open a popover on a right click.
  • Shrinkable, LayoutResponse::shrink and the layout guide say that a
    child at its floor hands the rest of its share on, so a much larger weight
    shrinks one child fully before another starts.
  • The scroll-to methods of the data views' builders say that they act at
    call time against the last layout; ListView::scroll_to_index claimed a
    call before the first layout was applied later.
  • The testing notes say how to read what a screen reader is told
    (announcements_since after one sync_accessibility), how to deliver
    subscribe_event callbacks in a headless tree (a poster that records,
    replayed through dispatch_subscription_event), and that a press and a
    release sent through dispatch_pointer form a tap, as click and
    tap_with do in one call.
  • WidgetTree's documentation sets apart its simulated input (taps, keys,
    touch, pen, gestures and the simulated clock, for headless tests and the
    automation bridge) and its test inspection methods from the rest, under a
    heading each on docs.rs.
  • sync_accessibility says that it returns the whole tree on every call,
    that adapters receive deliver_accessibility's update, and that
    at_version tells a test that something changed.

Full Changelog: v0.16.0...v0.17.0