feat(client): one source for the footer links, and dialog buttons on the type ramp (UI/UX v3 P4c) - #96
Merged
Merged
Conversation
…the ramp (UI/UX v3 P4c) P4b left two surfaces on the cell path and the spec's §8 gave one reason for both. Measuring first shows the reason holds for one of them. The footer links were the real hit-region work. Their geometry existed twice — `visual_width * cell_w` in the builder and a copy of the same expression, label formatting included, in `settings_panel_hit.rs`. A proportional label's width is not a multiple of `cell_w`, so moving them to the ramp with the formula mirrored would have drifted the click target away from the glyphs silently. `overlay/settings/footer.rs` now owns the labels, the ramp step, the measurement and the rects: `footer_links` is the single call the builder draws from and the hit-test tests against, with a pure `place_links` underneath in the shape `place_tooltip` established. `hit_test_settings_panel` takes `&mut self` so it measures through the same `FontManager` — one cached run per mouse event over an open panel. The dialog buttons did not need it. §8 claims their widths reach click targets; `mouse.rs` never mentions `pending_consent` or `close_window_dialog`, and both dialogs are driven by the keyboard and by AccessKit. A label's width reaches its own box and nothing else, so this is plain typography: box widths come from `measure_run`, padding and gaps unchanged, labels centred from the measured run. The row now reserves `n - 1` gaps instead of `n`, which had left it half a gap off centre. Gate: a structural test asserts neither file reconstructs a footer label or calls `footer_links` twice, and that no dialog button is sized from `visual_width` again. The now-stale `#![allow(dead_code)]` markers on `measure_run` / `truncate_run_to_width` / `add_run_verts` are removed with their last non-adopting caller. Observed while measuring and deliberately not fixed here: the footer links have no AccessKit node at all, so a screen reader cannot reach either of them. That is a P6c-shaped accessibility gap, not a typography one. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Coverage reportGenerated by |
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this closes
The P4 design spec's §8 deferred two surfaces — the settings footer's
↗ Open config.toml/↺ Reset categorylinks and the dialog button labels — and gave one reason for both: "they are sized from their label widths and those widths reach click targets, so they need hit-region work."Measuring first shows that reason holds for one of them.
The footer links — the real hit-region work
Their geometry existed twice, label formatting included:
overlay/settings/mod.rs:708,734—visual_width(&label) as f32 * cell_wevent_handler/settings_panel_hit.rs:145,155— a copy of the same expressionA proportional label's width is not a multiple of
cell_w, so moving these to the P4b ramp with the formula mirrored would have drifted the click target away from the glyphs silently.New
overlay/settings/footer.rsowns the labels, the ramp step, the measurement and the rects.footer_linksis the single call the builder draws from and the hit-test tests against; the pureplace_linksunderneath takes measured widths, the shapeplace_tooltipestablished in P4b.hit_test_settings_panelbecomes&mut selfso it measures through the sameFontManager— one cached run per mouse event over an open panel.The dialog buttons — the premise was wrong
mouse.rsnever referencespending_consentorclose_window_dialog. Both dialogs are driven by the keyboard (input_handler/mod.rs:46,58) and by AccessKit (accessibility.rs:213,224writeselected/selected_button). A button label's width reaches its own box and nothing else.So this half is plain typography: box widths come from
measure_runat the ramp's Body step, padding (1.5 / 3 cells) and gaps (0.5 / 0.8) unchanged, labels centred from the measured run. One fix falls out — the row reservedngaps instead ofn - 1, leaving it half a gap off centre.Gates
footer_linksmore than once, and no dialog button may be sized fromvisual_widthagain.#[allow(dead_code)]markers onmeasure_run/truncate_run_to_width/add_run_vertsare removed with their last non-adopting caller.Verification
cargo fmt --check— cleancargo clippy --workspace --all-targets -- -D warnings— no warningscargo test --workspace— 28 suites pass, 7 new testsNoted, deliberately not fixed
The footer links have no AccessKit node at all —
accessibility.rsnever mentions them, so a screen-reader user cannot reach "Open config.toml" or "Reset category". That is a P6c-shaped accessibility gap rather than a P4 typography one and belongs in its own change; it is recorded in the spec's new §8.1.🤖 Generated with Claude Code