Repository navigation
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-lucidestays at
1.47.3. - Struct literals of
FileDialogSelectionneedfolders(or
..Default::default()), and those ofActionTilePaintneed
text_overflow. - Building the browser package needs
wasm-bindgen-cli0.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 aLink'son_open_with_ctx; links still open nothing
on their own.LocalUrlOpenerBackendrecords the URLs a test opens. - A
UrlPolicydecides which URLs open. The default allows only absolute
http,https, andmailtoURLs, so untrusted Markdown cannot launch
local files or other protocol handlers. Install another with
App::url_policy, extend the default withUrlPolicy::allows_by_default,
or allow everything withUrlPolicy::allow_all. NativeFileDialogsworks on Android 8.0 and later through the system
document picker. Files chosen there have nopathand are read and written
through their document providers.- Folder dialogs return
PlatformFolderhandles in
FileDialogSelection::folders, which list, find, and create entries without
a filesystem path, on desktop, Android, and in browsers with
showDirectoryPicker. TextInput,PasswordInput, andDateTimeInputscroll text wider than the
field to keep the caret in view, instead of pinning the caret over hidden
text. Editable semantics report the offset asscroll_x, and read-only text
keeps the field'stext_style.- Sideways touch drags on a wide
RichDocumentViewcode 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 onButtonandIconButtonare judged by where the button was when
the finger went down. - Added
ElidedLineandpaint_text_line_elided, which end text too wide for
its line in "…".SegmentedControl,BrowserTabBar, andActionTilePaint
take atext_overflowoption:TextOverflow::Ellipsiselides labels
instead of clipping them, andSegmentedControlthen widens the segments
that need it. - Added
ActionTileGeometry, whichpaint_action_tilenow returns, with
ActionTileGeometry::heightfor 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'son_open
(onOpen), withset_url_policy(setUrlPolicy) and
url_allowed_by_default(urlAllowedByDefault) to choose which URLs open.