Skip to content

refactor(ui): draw the one-color SVGs with tinted and tint and the phone dropdown with popover::Above - #1186

Merged
pythoncrazy merged 2 commits into
mainfrom
refactor/svg-tint-leftovers
Nov 24, 2026
Merged

pythoncrazy merged 2 commits into
mainfrom
refactor/svg-tint-leftovers

Conversation

@pythoncrazy

Copy link
Copy Markdown
Owner

Survey item 6, the small leftovers:

  • The hand-written svg(h).width(n).height(n).style(move |_, _| svg::Style { color: Some(c) }) calls become tinted(&h, n, c) where the SVG is square and plain, and .style(tint(c)) (a new one-line style helper next to tinted) where it is rotated, faded or oblong. That also drops the let muted = p.muted;-style copies the closures needed. 32 sites in 17 files.
  • phone::Anchored was popover::Above with a dropdown under the first child and a blur. Above gets .below(blur), the phone field uses it, and Anchored goes away. Bubble becomes private to popover.rs.

Not done: the local brand closure in view_edit_group. brand_button_with would add Desktop's BrandButton hover (brightness(1.05)) and press scale (0.98), which the closure does not draw today. That is a visible change, so it does not belong in a behaviour-preserving PR. Desktop's Edit Group does use BrandButton (size: "standard", variant: "muted"/"primary"), so switching it is a separate parity fix.

Behaviour-preserving: the same widgets with the same sizes, colors, rotation and opacity, and the same dropdown position and blur.

loc.py (crates/beeper-ui/src production lines): 45,167 before, 45,106 after (-61). Functions over 60 lines: 107 → 106.

Checks: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace (only tests/e2e.rs fails here, for the missing weston), cargo test --test cli, ICED_TEST_BACKEND=tiny-skia cargo test -p beeper-ui.

🤖 Generated with Claude Code

@pythoncrazy
pythoncrazy merged commit 52a2b30 into main Nov 24, 2026
2 checks passed
@pythoncrazy
pythoncrazy deleted the refactor/svg-tint-leftovers branch November 24, 2026 21:30
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.

1 participant