Skip to content

feat(deps): bump iced 0.13 -> 0.14 (with iced_aw 0.14, iced_fonts 0.3)#18

Open
nedseb wants to merge 3 commits into
mainfrom
feat/iced-0.14
Open

feat(deps): bump iced 0.13 -> 0.14 (with iced_aw 0.14, iced_fonts 0.3)#18
nedseb wants to merge 3 commits into
mainfrom
feat/iced-0.14

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Apr 28, 2026

Summary

First of the held-back major bumps from #16. Brings the project onto iced 0.14 (released after PR #5 landed) along with the matching iced_aw 0.14 and iced_fonts 0.3.

Breaking changes worked around

Upstream change Our adjustment
iced::application(boot, update, view) now takes a state factory instead of a title fn; title moves to .title(...) builder iced::application(MainWindow::default, MainWindow::update, MainWindow::view).title(MainWindow::title)
iced::window::get_latest()iced::window::latest() renamed at the call site
iced::advanced::graphics::futures::eventiced::event (the advanced module is feature-gated and we don't need it) re-imported
iced_fonts::REQUIRED_FONT_BYTES removed (per-font constants only); iced_aw 0.14 no longer needs an icon font for the widgets we use dropped the .font(...) call
iced::Pixels: From<u16> removed; only From<f32> and the Pixels(f32) constructor remain log widget text size and form spacing now in f32
iced::Theme: Default removed pick Theme::Light explicitly (matches previous behavior)
iced::Event::InputMethod(_) is a new variant added to the ignored-events arm in MainWindow::update
iced::stream::channel now takes impl AsyncFnOnce; the resulting stream's Send is gated on the closure's future being Send, which can't be expressed cleanly through a generic wrapper bound on stable Rust replaced the message_runner helper fn with a small message_runner! macro so the async move |s| { … } closure is passed directly to channel(...) and the future-Send constraint is enforced at the use site
iced_aw 0.14 dropped the grid feature new ui::form module exposes form_row (label + content row, fixed-width label) and form (column of rows). Same visual layout.
iced_aw::number_input(value, ...)number_input(&value, ...) &self.target_waiting_time

Test plan

  • cargo build --release --locked green locally.
  • cargo test --release --locked green (4 existing tests still pass).
  • Smoke test: launched the binary, settings load, UI renders.
  • CI matrix on this PR.

Held back for follow-ups

  • directories 5 → 6
  • sysinfo 0.31 → 0.38

nedseb added 2 commits April 28, 2026 15:20
Major-version migration. Net effect of breaking changes:

* `iced::application(boot, update, view)` now takes a state factory as
  first argument instead of a title fn; the title moves to a builder
  method `.title(MainWindow::title)`.
* `iced::window::get_latest()` -> `iced::window::latest()`.
* `iced::advanced::graphics::futures::event` -> `iced::event` (the
  `advanced` module is feature-gated and we don't need it).
* `iced_fonts::REQUIRED_FONT_BYTES` is gone (per-font constants only);
  iced_aw 0.14 no longer requires loading an icon font for the widgets
  we use, so the `.font(...)` call is just dropped.
* `iced::Pixels: From<u16>` is gone; pass `f32` (or `Pixels(f32)`)
  explicitly. Affects the log widget text size and the form spacing.
* `iced::Theme: Default` is gone; pick a variant explicitly. We pick
  `Theme::Light`, matching the previous default behavior.
* `iced::Event::InputMethod(_)` is a new variant, added to the
  ignored-events arm in `MainWindow::update`.
* `iced::stream::channel` now takes `impl AsyncFnOnce`, and the
  resulting stream's Send-ness is gated on the closure's future being
  Send. Replaced the generic `message_runner` helper with a small
  `message_runner!` macro so call sites pass an `async move |s| {…}`
  closure directly to `channel(...)` and the future-Send constraint is
  enforced at the use site instead of through a wrapper bound that
  isn't expressible cleanly in stable Rust.
* `iced_aw 0.14` dropped the `grid` feature. Replaced the `grid!` /
  `grid_row!` macros with a tiny `ui::form` module exposing `form_row`
  (label + content row, fixed-width label) and `form` (column of
  rows). Same visual layout.
* `iced_aw::number_input` now takes `&value` instead of `value`.

Smoke test: `cargo build --release --locked` and `cargo test --release
--locked` green; binary launches, loads settings, renders. Held-back
majors not in this PR: directories 6, sysinfo 0.38.
Copilot AI review requested due to automatic review settings April 28, 2026 13:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GUI stack to iced 0.14 (and aligned iced_aw / iced_fonts versions), adapting the app’s UI and runtime wiring to upstream API changes while preserving the existing layout and behavior.

Changes:

  • Bump iced to 0.14 with matching iced_aw 0.14 and iced_fonts 0.3, plus corresponding lockfile refresh.
  • Replace removed iced_aw grid macros with a new local ui::form helper module and migrate both tabs to it.
  • Update runtime hooks for iced 0.14 (application builder/title changes, window/latest API rename, event import path, Pixels construction, theme default removal, new Event::InputMethod).

Reviewed changes

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

Show a summary per file
File Description
src/ui/tab_wireless_stack.rs Switch to new form layout and replace message_runner helper fn with a macro to satisfy channel’s AsyncFnOnce API.
src/ui/tab_daplink.rs Switch to new form layout and update number_input call signature.
src/ui/mod.rs Export new form module.
src/ui/main_window.rs Update event import, handle new input event variant, switch to explicit Theme::Light, and update window::latest() call.
src/ui/log_widget.rs Update Pixels construction to the new API.
src/ui/form.rs New lightweight form helpers replacing iced_aw grid macros removed in 0.14.
src/main.rs Update iced::application initialization and move title into builder .title(...); remove icon font injection.
Cargo.toml Dependency bumps for iced/iced_aw/iced_fonts.
Cargo.lock Large transitive update due to iced 0.14 and renderer stack changes.
.gitignore Ignore local tooling files (CLAUDE.md, .codex).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ui/tab_daplink.rs Outdated
),
grid_row!(
form_row(
"(Optionnal) User program",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit — "Optionnal" → "Optional".

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