Skip to content

fix: edit button styling and precise hit area - #46

Merged
osolmaz merged 4 commits into
mainfrom
fix/edit-button-hit-area
Jul 26, 2026
Merged

osolmaz merged 4 commits into
mainfrom
fix/edit-button-hit-area

Conversation

@osolmaz

@osolmaz osolmaz commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

The edit affordance looked like a text link and, worse, clicking anywhere on its row triggered it.
It now renders exactly like the other buttons — accent background, [✏ edit] with an icon in the emoji symbol set — and only the label itself is clickable.

What Changed

  • ContentRow targets gain an optional clickable width; button-like rows set it to their rendered label width, and hit-area registration clamps it to the viewport. List rows (links, settings) keep their full-row hit areas.
  • The edit rows use the shared button_style and a new edit_button symbol ([✏ edit] emoji, [edit] ASCII).
  • Wrapped fragments preserve the precise width, so degenerate ultra-narrow layouts cannot fall back to full-row clicks (review finding).

Testing

  • cargo test: 691 pass, including new assertions that the hit area equals the label width, that a click beside the button does nothing while the label still opens the composer, and that the button carries the shared style.
  • fmt/clippy -D warnings/slophammer clean; capture manifests re-stamped (unauthenticated fixtures render no edit buttons, so frames are unchanged).
  • Codex review: the one finding (wrap fragments losing the width) is fixed.

Risks

Minimal — a rendering/hit-area change scoped to rows that opt into a precise width.

osolmaz added 4 commits July 26, 2026 13:21
The edit affordance now renders with the shared button style and an
icon in the emoji symbol set, and its hit area covers exactly the
label instead of the whole row, so clicking beside it does nothing.
ContentRow targets gain an optional clickable width for button-like
rows; list rows keep full-row hit areas.
@osolmaz
osolmaz merged commit ff8de35 into main Jul 26, 2026
1 check passed
@osolmaz
osolmaz deleted the fix/edit-button-hit-area branch July 26, 2026 05:57
@osolmaz

osolmaz commented Jul 26, 2026

Copy link
Copy Markdown
Owner Author

Final report: merged as ff8de35. Edit affordance now uses the shared button style with an icon ([✏ edit] / [edit] in ASCII) and a hit area covering exactly the label — clicking beside it does nothing. ContentRow gained an opt-in precise target width, preserved across wrapped fragments per the review finding. 691 tests green.

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