From 27ddb0d897d35360a8546b4ae69d17fc6b221488 Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Fri, 6 Nov 2026 18:39:38 +0900 Subject: [PATCH 1/3] Chore: Bump the version to 0.0.7 (draft, changelog to be kept current) --- CHANGELOG.md | 48 +++++++++++++++++++++++++++--- Cargo.lock | 4 +-- README.md | 2 +- compose-rust/Cargo.toml | 4 +-- compose-rust/macros/Cargo.toml | 2 +- docs/guide/en/getting-started.html | 6 ++-- docs/guide/ko/getting-started.html | 6 ++-- docs/locales/README_ko.md | 2 +- 8 files changed, 57 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea32d8236..5befd2e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## v0.0.7 + +### Host-driven focus and IME composition notifications + +The Host can move input focus to a node, or clear it, with `Batch::request_focus(node_id)` (a new `RequestFocus` command, tag 25), and a `TextField` reports when an IME composition starts and ends with `.on_composition_change(impl FnMut(bool))` ([#410](https://github.com/DarkPyonix/compose-rust/issues/410), [#423](https://github.com/DarkPyonix/compose-rust/pull/423)). + +### `Button` text alignment, label size and a content slot + +`Button::text_align` and `Button::font_size` use the existing `TextAlign` and `FontSize` attributes, and a `Button` can take children that are drawn as a vertically centred row, so a button can be a list row with a left aligned label ([#425](https://github.com/DarkPyonix/compose-rust/issues/425), [#453](https://github.com/DarkPyonix/compose-rust/pull/453)). No schema change. + +### A weighted `Row` or `Column` child keeps room for its longest word + +A child with a weight on the main axis gets the larger of its share and its minimum content width, so a label in a narrow weighted cell is no longer broken into one glyph per line. Lazy lists and other lazy layouts keep the stock weight ([#427](https://github.com/DarkPyonix/compose-rust/issues/427), [#448](https://github.com/DarkPyonix/compose-rust/pull/448)). + +### Accessibility modifier and `accessible_name` + +`Modifier` has `label`, `role`, `checked`, `selected` and `semantics(role, label, state)`, so any node can be given a role, a name and a checked or selected state for assistive technology ([#429](https://github.com/DarkPyonix/compose-rust/issues/429)). `Button`, `Switch`, `Checkbox`, `RadioButton` and `Slider` have `accessible_name`, which replaces a visible label and is read instead of an icon-only button's icon name. On the wire this is a new `Semantics` modifier (tag 34) and a new `AccessibleName` property (119). The schema hash changes, so a renderer and a crate from before this change no longer agree. `Modifier::label` keeps each distinct name for the life of the program, at most 4096 of them; a name past that limit is left off, and debug builds print a warning once. + +### Node accessibility: roles, states and a click action + +The accessibility modifier grows, add-only ([#473](https://github.com/DarkPyonix/compose-rust/issues/473), [#489](https://github.com/DarkPyonix/compose-rust/pull/489)). There are 11 more roles (`TabList`, `Tree`, `TreeItem`, `Menu`, `MenuItem`, `TextBox`, `Heading`, `Navigation`, `List`, `ListItem`, `Group`), the states `expanded`, `disabled`, `focused` and `hidden` (a hidden node leaves the accessibility tree), and a `click` action that calls the node's own click handler, so an assistive tool or an automated audit can press a control without touching the screen. A disabled node, or one whose `enabled` is false, cannot be pressed this way. Roles that Compose has no name for (everything except `Heading` and the ones it already had) are carried as a short role word in the node's state description for now. + +Known limits: the `focus` action has a wire bit but is not exposed by the renderer yet (the node's focus requester is created after the accessibility modifier and only when a focus request exists), expanded and collapsed are a description and not an action, and the platform's own roles (macOS tab group, outline, menu) need a change in the Compose fork and are not part of this release. [#473](https://github.com/DarkPyonix/compose-rust/issues/473) stays open for them. + +### Window size reports for every whole-dp change, and a first report for tall phone-sized windows + +A window that sets `report_size` also receives `WindowSizeChanged` whenever its width or height, each rounded to the nearest whole dp, changes inside a size class, so a host that lays out from the exact size (an HTML and CSS host, for example) can reflow. Use `Window(on_close).report_size(true)` for a `Window` node and `Window::new().with_report_size(true)` for the implicit single window; a window that does not opt in behaves exactly as before. Each whole-dp change while the user drags an edge costs one call into the Host, so only a host that needs the exact size should turn it on ([#467](https://github.com/DarkPyonix/compose-rust/issues/467), [#470](https://github.com/DarkPyonix/compose-rust/pull/470), [#479](https://github.com/DarkPyonix/compose-rust/issues/479), [#489](https://github.com/DarkPyonix/compose-rust/pull/489)). + +Separately, a window that is narrow but tall (390 by 844 dp: Compact wide, Medium high) never sent its first size, so `current_window_size()` kept 0 by 0. The renderer now sends it. This needs no opt-in. + +### macOS safe area measured again after the window is shown + +On macOS the window buttons' safe area (`WindowSafeArea`) could stay `{0, 0, 0}` for a window that never resizes, because the caption was measured once before the title bar was laid out. The Compose fork's macOS window now measures it again after it is shown, a few times at short intervals, and the window modules are pinned at that fork commit ([#468](https://github.com/DarkPyonix/compose-rust/issues/468), [#470](https://github.com/DarkPyonix/compose-rust/pull/470), fork [#182](https://github.com/thisisthepy/compose-multiplatform-core-extended/pull/182)). Known limit: this has not been confirmed at a 390 by 844 window yet. An application should keep a fallback for a zero safe area until it has been. + +### Schema hash and wire changes + +The schema hash changes in this release, so a renderer and a crate from before it no longer agree; upgrade both together. All changes are add-only: + +- `Modifier` tag 34 `Semantics { role, state }`; the property `AccessibleName` (119) carries the label. The `Semantics` role enum grows to 19 values and its state word to 13 bits (checked, selected, expanded, disabled, focused, hidden, and the click and focus action bits). +- Property `ReportSize` (127) on a `Window` node. +- `SetWindow` flags word, bit 1: `report_size` for the implicit window. The record length is unchanged and a window that does not set it writes the same bytes as before. +- Command `RequestFocus` (tag 25) and the `OnCompositionChange` property with its event. +- `WINDOW_REVISION` moves to the fork commit that holds the macOS caption re-measure. + ## v0.0.6 ### Focus ring only for keyboard focus @@ -10,10 +54,6 @@ A pressable container draws its focus ring only for keyboard focus, at the node' A `Row` with a weight in a `Column` (or a `Column` with a weight in a `Row`) is no longer clamped to its content size on the cross axis, so the content no longer collects at the start when the window grows ([#439](https://github.com/DarkPyonix/compose-rust/issues/439), [#440](https://github.com/DarkPyonix/compose-rust/pull/440)). -### Accessibility modifier and `accessible_name` - -`Modifier` has `label`, `role`, `checked`, `selected` and `semantics(role, label, state)`, so any node can be given a role, a name and a checked or selected state for assistive technology ([#429](https://github.com/DarkPyonix/compose-rust/issues/429)). `Button`, `Switch`, `Checkbox`, `RadioButton` and `Slider` have `accessible_name`, which replaces a visible label and is read instead of an icon-only button's icon name. On the wire this is a new `Semantics` modifier (tag 34) and a new `AccessibleName` property (119). The schema hash changes, so a renderer and a crate from before this change no longer agree. `Modifier::label` keeps each distinct name for the life of the program, at most 4096 of them; a name past that limit is left off, and debug builds print a warning once. - ### Modifier `match_parent_size` `Modifier` has a new `MatchParentSize` (wire tag 31) for a child of a `Box`: it fills exactly the parent's bounds without enlarging the parent, so an overlay such as a press tint needs no size or radius restated ([#431](https://github.com/DarkPyonix/compose-rust/issues/431)). The schema hash changes, so a renderer and a crate from before this change no longer agree. diff --git a/Cargo.lock b/Cargo.lock index 569dfe821..29c76639e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,7 +32,7 @@ dependencies = [ [[package]] name = "compose-rust" -version = "0.0.6" +version = "0.0.7" dependencies = [ "compose-rust-macros", "jni", @@ -40,7 +40,7 @@ dependencies = [ [[package]] name = "compose-rust-macros" -version = "0.0.6" +version = "0.0.7" dependencies = [ "proc-macro2", "quote", diff --git a/README.md b/README.md index ab5f8b5e4..308d75e50 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ default, and `org.thisisthepy.compose.designsystem` for the contract both layers ### Using the crate ```bash -cargo add compose-rust@0.0.6 +cargo add compose-rust@0.0.7 ``` `cargo build` works out which renderer the target needs, downloads the release artifact for the diff --git a/compose-rust/Cargo.toml b/compose-rust/Cargo.toml index 1fd534929..19e2b7c09 100644 --- a/compose-rust/Cargo.toml +++ b/compose-rust/Cargo.toml @@ -3,7 +3,7 @@ name = "compose-rust" # 0.0.x on purpose: the boundary works and so do the desktop and iOS renderers, but the # widget vocabulary is still being filled in and nothing here is stable yet. A number that # says so is more honest than one that implies a first usable release. -version = "0.0.6" +version = "0.0.7" edition.workspace = true license.workspace = true rust-version.workspace = true @@ -55,7 +55,7 @@ native-renderer = [] # crate and not the other way round. `scripts/tests/core-has-no-dioxus.test.sh` fails the # build if that changes. [dependencies] -compose-rust-macros = { path = "macros", version = "0.0.6" } +compose-rust-macros = { path = "macros", version = "0.0.7" } # The Android shims are generated against jni-rs. Nothing here is linked into a desktop, # iOS or web build, and the alternative bindings generators were rejected for their diff --git a/compose-rust/macros/Cargo.toml b/compose-rust/macros/Cargo.toml index 29892ba8b..2a6054113 100644 --- a/compose-rust/macros/Cargo.toml +++ b/compose-rust/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "compose-rust-macros" -version = "0.0.6" +version = "0.0.7" edition.workspace = true license.workspace = true rust-version.workspace = true diff --git a/docs/guide/en/getting-started.html b/docs/guide/en/getting-started.html index 20c564444..818c9d418 100644 --- a/docs/guide/en/getting-started.html +++ b/docs/guide/en/getting-started.html @@ -78,13 +78,13 @@
cargo add compose-rust@0.0.6
+cargo add compose-rust@0.0.7
[dependencies]
-compose-rust = "0.0.6"
+compose-rust = "0.0.7"
@@ -165,7 +165,7 @@
- With compose-rust = "0.0.6" this program builds as it is. cargo run
+ With compose-rust = "0.0.7" this program builds as it is. cargo run
downloads the renderer and opens the window.
cargo add compose-rust@0.0.6
+cargo add compose-rust@0.0.7
[dependencies]
-compose-rust = "0.0.6"
+compose-rust = "0.0.7"
@@ -163,7 +163,7 @@
- compose-rust = "0.0.6" 로는 이 프로그램이 그대로 빌드됩니다. cargo run
+ compose-rust = "0.0.7" 로는 이 프로그램이 그대로 빌드됩니다. cargo run
이 렌더러를 내려받고 창을 엽니다.