Skip to content

windows-reactor add properties for pane length/footer and text box appearance#4676

Open
kennykerr wants to merge 4 commits into
masterfrom
reactor-pane-textbox
Open

windows-reactor add properties for pane length/footer and text box appearance#4676
kennykerr wants to merge 4 commits into
masterfrom
reactor-pane-textbox

Conversation

@kennykerr

@kennykerr kennykerr commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Adds the missing WinUI properties requested in #4669 and #4671.

NavigationView gains open_pane_length(f64) (declarative, via winui.toml) and pane_footer(impl Into<Element>), which mounts arbitrary content in the pane's footer slot (reusing the existing pane_element reconciler path — distinct from the built-in settings_visible gear).

TextBox gains border_brush/border_thickness builders, mirroring Border (direct Color or theme-ref).

To support this, the backend's BorderBrush/BorderThickness dispatch is generalized from Border-only to any Control via a single IControl cast — matching the existing set_background/set_foreground pattern — plus a Color::transparent() helper for borderless inputs. Covered by two new automated tests and two runnable samples (navigation_view_pane, text_box_border); fmt/clippy/test_reactor clean and tool_reactor regen is idempotent.

Two new samples to validate:

cargo run -p reactor_samples --example navigation_view_pane   # open_pane_length + pane_footer
cargo run -p reactor_samples --example text_box_border        # border brush/thickness + transparent input

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing WinUI 3 surface area to windows-reactor (notably NavigationView pane configuration and TextBox border styling) by extending the generated WinUI property set and generalizing border prop dispatch through IControl, with accompanying tests and samples.

Changes:

  • Add NavigationView::open_pane_length(f64) (via winui.toml/generated bindings) and NavigationView::pane_footer(Element) mounted through the existing pane-slot reconciler path.
  • Add TextBox::border_brush(BrushBinding) and TextBox::border_thickness(Thickness) and route BorderBrush/BorderThickness through a generalized IControl fallback in the WinUI backend.
  • Add tests validating the new props and add runnable samples demonstrating the new APIs.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/crates/windows-reactor.md Documents the backend dispatch behavior for background/foreground/border props.
crates/tools/reactor/src/winui.toml Adds NavigationView.OpenPaneLength to codegen inputs.
crates/tools/reactor/src/generated.txt Regenerated reactor interface/property inventory to include OpenPaneLength.
crates/tools/reactor/src/base.txt Adds IControl setters for BorderBrush/BorderThickness and INavigationView.put_PaneFooter.
crates/tests/libs/reactor/tests/controls_shell.rs Adds a test for NavigationView open pane length and pane footer mounting.
crates/tests/libs/reactor/tests/controls_input.rs Adds a test for TextBox border brush/thickness prop emission.
crates/tests/libs/reactor_selftest/src/bindings.rs Regenerated selftest WinUI bindings (adds IControl border setters and INavigationView footer/open pane length).
crates/samples/reactor/samples/examples/text_box_border.rs New sample showcasing TextBox border customization.
crates/samples/reactor/samples/examples/navigation_view_pane.rs New sample showcasing NavigationView open pane length and pane footer.
crates/libs/reactor/src/widgets/text_box.rs Adds border_brush/border_thickness fields + builders and emits the new props.
crates/libs/reactor/src/widgets/navigation_view.rs Adds open_pane_length and pane_footer and exposes footer via pane_element().
crates/libs/reactor/src/style.rs Adds Color::transparent() helper.
crates/libs/reactor/src/generated.rs Regenerated widget-to-prop bindings to emit Prop::OpenPaneLength for NavigationView.
crates/libs/reactor/src/bindings.rs Regenerated WinUI bindings (adds IControl border setters and INavigationView footer/open pane length).
crates/libs/reactor/src/backend/winui/mod.rs Generalizes border brush/thickness dispatch via IControl; wires NavigationView pane slot to SetPaneFooter.
crates/libs/reactor/src/backend/winui/generated_set_prop.rs Adds OpenPaneLength dispatch for Handle::NavigationView.

Comment thread crates/libs/reactor/src/widgets/text_box.rs Outdated
Comment thread docs/crates/windows-reactor.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Comment thread crates/libs/reactor/src/widgets/text_box.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants