What
Migrate all 7 quadraui::Tooltip { .. } exhaustive struct-literal construction
sites to the new Tooltip::new(id, text).with_*(..) builder API shipped by
JDonaghy/quadraui#541 (PR JDonaghy/quadraui#608).
Why
quadraui#541 gives Tooltip two new fields (border: TooltipBorder,
title: Option<String>) so a consumer can choose full-box / sides-only / no
border, and adds a title slot. Tooltip stays a plain exhaustive struct (not
#[non_exhaustive]) — see the Downstream impact doc comment on
quadraui::primitives::tooltip — so every exhaustive Tooltip { .. } literal
with no ..Default::default() fails to compile the instant the new fields
land, and this repo has 7 of them:
src/tui_main/panels.rs:810
src/render.rs:1151
src/render.rs:1490
src/render.rs:4285
src/gtk/draw.rs:1378
src/gtk/draw.rs:1667
src/gtk/draw.rs:1765
quadraui shipped Tooltip::new(id, text) (all other fields at their
behaviour-preserving default) plus .with_styled_lines(), .with_placement(),
.with_border(), .with_title(), .with_bg(), .with_fg() builder methods
specifically so call sites survive the next field addition too — this
migration is a one-time cost, not a recurring one, once done.
Tooltip::new's default border is TooltipBorder::Full, which is defined to
match what every backend already renders on develop today (GTK/macOS have
always stroked a full box; TUI has since #542 whenever height >= 3). So this
migration needs no new .with_border(..) calls to preserve current
on-screen appearance — it's a pure literal→builder rewrite.
Example
Before (src/render.rs:1151):
let tooltip = quadraui::Tooltip {
id: quadraui::WidgetId::new("lsp_hover"),
text: hover.text.clone(),
styled_lines: None,
placement: quadraui::TooltipPlacement::Top,
bg: None,
fg: None,
};
After:
let tooltip = quadraui::Tooltip::new(quadraui::WidgetId::new("lsp_hover"), hover.text.clone())
.with_placement(quadraui::TooltipPlacement::Top);
Only chain .with_*() for fields that were set to a non-default value; drop
fields that matched the default (styled_lines: None, bg: None, fg: None,
placement: TooltipPlacement::default()).
Acceptance
Blocked on
JDonaghy/quadraui#541 / PR JDonaghy/quadraui#608 landing on quadraui's
develop (the new Tooltip::new/with_* API doesn't exist before that).
Can be branched and written ahead of time against the PR branch; final merge
should wait for quadraui#541 to land so CI actually resolves the new API from
develop.
What
Migrate all 7
quadraui::Tooltip { .. }exhaustive struct-literal constructionsites to the new
Tooltip::new(id, text).with_*(..)builder API shipped byJDonaghy/quadraui#541(PRJDonaghy/quadraui#608).Why
quadraui#541givesTooltiptwo new fields (border: TooltipBorder,title: Option<String>) so a consumer can choose full-box / sides-only / noborder, and adds a title slot.
Tooltipstays a plain exhaustive struct (not#[non_exhaustive]) — see the Downstream impact doc comment onquadraui::primitives::tooltip— so every exhaustiveTooltip { .. }literalwith no
..Default::default()fails to compile the instant the new fieldsland, and this repo has 7 of them:
src/tui_main/panels.rs:810src/render.rs:1151src/render.rs:1490src/render.rs:4285src/gtk/draw.rs:1378src/gtk/draw.rs:1667src/gtk/draw.rs:1765quadraui shipped
Tooltip::new(id, text)(all other fields at theirbehaviour-preserving default) plus
.with_styled_lines(),.with_placement(),.with_border(),.with_title(),.with_bg(),.with_fg()builder methodsspecifically so call sites survive the next field addition too — this
migration is a one-time cost, not a recurring one, once done.
Tooltip::new's default border isTooltipBorder::Full, which is defined tomatch what every backend already renders on
developtoday (GTK/macOS havealways stroked a full box; TUI has since #542 whenever
height >= 3). So thismigration needs no new
.with_border(..)calls to preserve currenton-screen appearance — it's a pure literal→builder rewrite.
Example
Before (
src/render.rs:1151):After:
Only chain
.with_*()for fields that were set to a non-default value; dropfields that matched the default (
styled_lines: None,bg: None,fg: None,placement: TooltipPlacement::default()).Acceptance
Tooltip::new(..).with_*(..)instead of a raw struct literal.cargo build && cargo testgreen once built against quadraui#541'sbranch (
cargo update -p quadraui/ the repo's local-path override —see this repo's own quadraui-pin docs — to build against the unmerged
branch before it's on
develop).Blocked on
JDonaghy/quadraui#541/ PRJDonaghy/quadraui#608landing on quadraui'sdevelop(the newTooltip::new/with_*API doesn't exist before that).Can be branched and written ahead of time against the PR branch; final merge
should wait for quadraui#541 to land so CI actually resolves the new API from
develop.