Skip to content

fix(a2ui/basic): a clickable list row's lines are left-aligned - #373

Merged
jrosskopf merged 1 commit into
mainfrom
fix/a2ui-card-list-alignment
Nov 15, 2026
Merged

jrosskopf merged 1 commit into
mainfrom
fix/a2ui-card-list-alignment

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

A list row whose whole row is clickable is rendered as a borderless Button around a Column (label + caption). With the official v0.9 renderer that is an HTML <button>, which centres its content, so the label centred across the wider caption. The Column now carries align: start (basic catalog v0.9), and the widget page left-aligns borderless buttons so wrapped lines at narrow widths stay left-aligned too.

Tests: a_clickable_list_rows_lines_are_left_aligned (red on main), golden 1a/1c updated and still schema-validated; the local-e2e widget check now asserts every line of a clickable row starts at the same x at full and 220 px width (red on main, green now). Other cards render byte-identical. The widget resource URI hash changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EqCfXJb5WRqV9Mz4ZkdkjZ


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

A list item with an action and no action label is a borderless Button
around a Column of its label and detail. An HTML <button> centres its
content and a Column stretches its children, so in the widget the label
centred over the (wider) detail line.

- basic.rs: that Column packs its children at the start (align: "start",
  a basic-catalog v0.9 prop), so each line keeps its own width.
- Widget: a borderless button aligns its text at the start, so wrapped
  lines (a narrow card) do not centre either; the basic catalog has no
  text-align prop for that.
- Tests: the projected Column carries align "start" (goldens 1a, 1c
  updated, still schema-valid); the browser run checks that every line of
  a clickable row starts at the same x, at full and narrow width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqCfXJb5WRqV9Mz4ZkdkjZ
@jrosskopf
jrosskopf merged commit 3a0a330 into main Nov 15, 2026
3 checks passed
@jrosskopf
jrosskopf deleted the fix/a2ui-card-list-alignment branch November 15, 2026 16:31
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