Skip to content

SUI 0.6.1

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 10:05
· 4 commits to main since this release

This release lets event handlers open URLs, adds file and folder dialogs on
Android, scrolls text that overflows text fields and code blocks, makes touch
taps more reliable, and can elide labels that don't fit.

Upgrading from 0.6.0

  • Update the SUI crates together to 0.6.1. sinomo-ui-lucide stays at
    1.47.3.
  • Struct literals of FileDialogSelection need folders (or
    ..Default::default()), and those of ActionTilePaint need
    text_overflow.
  • Building the browser package needs wasm-bindgen-cli 0.2.130.

Rust

  • Added EventCtx::open_url, which opens a URL in the default browser or the
    app registered for its scheme on desktop, Android, and the web. Call it from
    any handler, such as a Link's on_open_with_ctx; links still open nothing
    on their own. LocalUrlOpenerBackend records the URLs a test opens.
  • A UrlPolicy decides which URLs open. The default allows only absolute
    http, https, and mailto URLs, so untrusted Markdown cannot launch
    local files or other protocol handlers. Install another with
    App::url_policy, extend the default with UrlPolicy::allows_by_default,
    or allow everything with UrlPolicy::allow_all.
  • NativeFileDialogs works on Android 8.0 and later through the system
    document picker. Files chosen there have no path and are read and written
    through their document providers.
  • Folder dialogs return PlatformFolder handles in
    FileDialogSelection::folders, which list, find, and create entries without
    a filesystem path, on desktop, Android, and in browsers with
    showDirectoryPicker.
  • TextInput, PasswordInput, and DateTimeInput scroll text wider than the
    field to keep the caret in view, instead of pinning the caret over hidden
    text. Editable semantics report the offset as scroll_x, and read-only text
    keeps the field's text_style.
  • Sideways touch drags on a wide RichDocumentView code block pan the code
    instead of selecting text, and clicks in a code block scrolled by the wheel
    now land under the pointer.
  • A tap that moves focus off an editor keeps the soft keyboard up until the
    finger lifts, so the relayout no longer moves the tapped button away. Touch
    presses on Button and IconButton are judged by where the button was when
    the finger went down.
  • Added ElidedLine and paint_text_line_elided, which end text too wide for
    its line in "…". SegmentedControl, BrowserTabBar, and ActionTilePaint
    take a text_overflow option: TextOverflow::Ellipsis elides labels
    instead of clipping them, and SegmentedControl then widens the segments
    that need it.
  • Added ActionTileGeometry, which paint_action_tile now returns, with
    ActionTileGeometry::height for the height a tile needs.
  • Updated dependencies, including PyO3 0.30, napi 3.16, resvg 0.49, and
    wasm-bindgen 0.2.130.

Python and JavaScript

  • Added open_url(url) (openUrl), which can serve as a link's on_open
    (onOpen), with set_url_policy (setUrlPolicy) and
    url_allowed_by_default (urlAllowedByDefault) to choose which URLs open.