Repository navigation
fix(a2ui/basic): a clickable list row's lines are left-aligned - #373
Merged
Merged
Conversation
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
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.
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 carriesalign: 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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.