Skip to content

feat(board): size a worded copy chip to its label, not to the icon square - #314

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/board-worded-copy-chip
Aug 28, 2026
Merged

feat(board): size a worded copy chip to its label, not to the icon square#314
Jammy2211 merged 1 commit into
mainfrom
feature/board-worded-copy-chip

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Reported from a laptop against the health board: under the Evidence gaps heading, the one-tap clear them all button reads as a thin column of text.

The cause

button.copy is a fixed 2.6rem square — exactly right for the bare clipboard glyph every board puts beside a row, and a trap for a button that carries words. At 42px wide the label wraps to one word per line and overflows its own 42px height.

Every sibling board emits only the bare glyph, so the health board — the one place in the family that gives a copy button a worded face — is where it showed up.

The fix

An opt-in modifier beside the existing button.copy.term:

button.copy.text{width:auto;height:auto;max-width:100%;padding:.34rem .62rem;
 font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;
 text-overflow:ellipsis;vertical-align:bottom}

Sized to the label, held on one line the way .pill is — elided rather than allowed to push the page sideways, with the same vertical-align:bottom that overflow:hidden's baseline shift needs. Being opt-in, every bare-glyph button in every board keeps the square it was drawn for.

Verification

  • pytest tests/test_board_theme.py tests/test_board.py tests/test_intake_dashboard.py → 141 passed.
  • Tenant firewall clean (repos_sync.py --check --only "tenant firewall (organ code)").

Companion: PyAutoLabs/PyAutoHeart#192 adds the class at the two call sites. Either order is safe — the class without the rule renders exactly as today.

🤖 Generated with Claude Code

https://claude.ai/code/session_018q6ZrgG6u8o8ENYZ7cq3Lr

…uare

`button.copy` is a fixed 2.6rem square, which is exactly right for a bare
clipboard glyph and a trap for a button that carries words: the label wraps
inside 42px into a one-word-per-line column and spills out of its own box.
Reported from a laptop against the health board's "clear them all" line,
the one place in the family that gives a copy button a worded face.

`button.copy.text` sizes to the label and holds it on one line the way
`.pill` does — elided rather than allowed to push the page sideways. Opt-in,
so every bare-glyph button in every board keeps the square it was drawn for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q6ZrgG6u8o8ENYZ7cq3Lr
@Jammy2211
Jammy2211 merged commit 27915e6 into main Aug 28, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/board-worded-copy-chip branch August 28, 2026 14:55
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