Skip to content

Stand a block's marks flat inside its top-right corner - #4860

Merged
max-sixty merged 3 commits into
mainfrom
copy-button-inside
Oct 31, 2026
Merged

max-sixty merged 3 commits into
mainfrom
copy-button-inside

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A code block's Copy, and a draft's toolbar of Edit and Copy, stood with their middle on the box's top border (#3916), so their top half depended on room outside the box. Where something above the box covered or clipped that room, the half was cut: in rust-sort's Source pane, the first listing's Copy showed only its lower half, which read as a Copy sitting just inside the box, while elsewhere it stood over the edge. Both now stand inside the box's top-right corner, 4px from both edges, so whatever shows the box shows them whole. Copy still shows only on hover, keyboard focus or a tap that stands the user on the block; a draft's toolbar also stays while the draft is edited or asks for an edit. While shown, they cover the first line's last words; for a draft's toolbar that includes the line being edited, and a refused save's status widens it over a third of the line. The user chose one seat for both over keeping the edited line clear. This reverses #3916, whose rejected alternative was Copy in the corner wearing the toolbar's face.

The toolbar no longer casts a shadow. Its lift came with the border seat, where it rode across the edge between two surfaces; inside the box its hairline ring sets it apart, as common code-copy buttons do.

Under a finger a draft's toolbar keeps its seat on the bottom border: it shows there always, and in the corner its finger-wide reach would take every press meant for the end of the first line.

The inset is one token, --lf-block-control-inset, which a recording's play bar already matched in value (its comment said it stood "inset as Copy is from a code block's corner"); all three now read it.

On a narrow page, where a comment's pin stands just above its block's top edge, the border seat's Copy overlapped the pin by 8px; inside the corner it clears it.

Tests: the widened-table scroller test and the code-copy journey now hold Copy within 8px inside the block's top and right edges, where they held its middle to the top border.

This was written by Claude Code on behalf of max-sixty

A code block's Copy, and a draft's toolbar of Edit and Copy, stood with
their middle on the box's top border (#3916), so their top half
depended on room outside the box. Where something above the box covered
or clipped that room, the half was cut: in rust-sort's Source pane, the
first listing's Copy showed only its lower half, which read as a Copy
sitting just inside the box, while elsewhere it stood over the edge.
Both now stand inside the box's top-right corner, 4px from both edges,
so whatever shows the box shows them whole. Copy still shows only on
hover, keyboard focus or a tap that stands the user on the block; a
draft's toolbar also stays while the draft is edited or asks for an
edit. While shown, they cover the first line's last words; for a
draft's toolbar that includes the line being edited, and a refused
save's status widens it over a third of the line. The user chose one
seat for both over keeping the edited line clear. This reverses #3916,
whose rejected alternative was Copy in the corner wearing the toolbar's
face.

The toolbar no longer casts a shadow. Its lift came with the border
seat, where it rode across the edge between two surfaces; inside the
box its hairline ring sets it apart, as common code-copy buttons do.

Under a finger a draft's toolbar keeps its seat on the bottom border:
it shows there always, and in the corner its finger-wide reach would
take every press meant for the end of the first line.

The inset is one token, `--lf-block-control-inset`, which a recording's
play bar already matched in value (its comment said it stood "inset as
Copy is from a code block's corner"); all three now read it.

On a narrow page, where a comment's pin stands just above its block's
top edge, the border seat's Copy overlapped the pin by 8px; inside the
corner it clears it.

Tests: the widened-table scroller test and the code-copy journey now
hold Copy within 8px inside the block's top and right edges, where they
held its middle to the top border.
@max-sixty
max-sixty merged commit 8230e77 into main Oct 31, 2026
4 checks passed
@max-sixty
max-sixty deleted the copy-button-inside branch October 31, 2026 22:34
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.

2 participants