Skip to content

feat(ui): Text single-line truncation; IconButton v0.5 press feedback spec - #546

Merged
egdev6 merged 5 commits into
mainfrom
docs/plans-text-truncate-icon-button-hit-area
Nov 22, 2026
Merged

egdev6 merged 5 commits into
mainfrom
docs/plans-text-truncate-icon-button-hit-area

Conversation

@egdev6

@egdev6 egdev6 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

This PR delivers the approved Text v0.3 single-line truncation (#538) and the approved IconButton v0.5 press-feedback amendment, a prerequisite for #540's hit area. The Recado compact note card (egdev6/recado#41) needs both.

Text v0.3: truncate (implemented)

  • New Text.truncate?: boolean, default false, on every variant.
    • Opt-in behavior: the root becomes block min-w-0 truncate and accents and the eyebrow render inline. The full text stays in the DOM, so assistive technology reads all of it.
    • Not added: no automatic title or aria, no wrapper, and the prop is never forwarded to the DOM or a Slot child.
    • Unchanged: Heading and ListItem.
  • Approved plan: docs/components/text/v0.3/implementation-plan.md.
  • Evidence: docs/components/text/v0.3/implementation-evidence.md.
  • Registry: a new convention, single-line-text-truncation / truncate, marked approved. The owner's verbatim approval is recorded in odd/tasks/consumer-request-specs.md L6 and L13, and in the receipt docs/components/text/v0.3/prop-naming-approval.json.
  • Generated files: the artifact and system.md are regenerated, and the CHANGELOGs (ui, system) cite (#538).

IconButton v0.5: press feedback (spec only)

  • Removes the active scale-94 press shrink. This supersedes that promise from v0.2; v0.2's no-hover-lift promise stays. With the shrink gone, v0.4's invisible ≥44px ::after hit area works unchanged. Chrome feasibility tests showed that every scaled option misdirected clicks at the edge.
  • Ghost and outline: pressed state is surface-3 plus --shadow-btn-pressed. This is a non-color depth cue, and --shadow-focus keeps priority.
  • Secondary: a documented, scoped exception keeps --color-alpha-red-15 as its pressed background.
  • Captures: approved without new ones. contentSHA256: c0f0a7dc66d67339807e8ec3e512508a8d718063a3fe17d37dbfa4da2d1f6d3a.
  • Implementation needs the v0.4 plan, which still has to be written and approved.

Commits

Commit Content
afec36b Text plan
dd033c5 Text implementation
9a208d4 v0.5 draft
d58d739 Verification and convention provenance
d331c5c v0.5 approval

Validation

  • Tests: written first and failing before each change, passing after:
    • Text: 21 failures → 74/74
    • metadata and CSS: 6 failures → 507/507
    • Heading and ListItem preserved: 74/74
    • registry: 132/132
    • artifact: 43/43
    • pnpm typecheck, biome, and props/artifact/system checks also pass.
  • Fresh build: after pnpm build, node --test scripts/package-exports.test.mjs passes 137/137.
  • Independent verification (risk item 3): public Text API, shipped CSS, consumed artifact and registry.
    • Defaults unchanged: with truncate omitted, false or an untyped value, rendering is byte-identical to the base across 24,384 Text and Heading renders.
    • Headless Chrome 148: ellipsis, RTL, long tokens, inline accent and ListItem rows behave as specified.
    • Advisory: in ListItem row, the trailing action stays visible but wraps under the text.
  • Pending:
    • a real screen-reader check (AC-06);
    • interactive keyboard and touch checks (AC-07);
    • a packed React 18/19 consumer (AC-10; runs in CI).
    • Visual conformity is Not evaluated.
  • Follow-up: the artifact generator already attached Text-only recipes to Heading's anatomy before this PR, and the truncate axis now appears there too. The MCP serves only system.md, whose Heading section is unchanged. The fix needs a generator change outside this scope.

Linked issue

Refs #538 (closes at the release that ships it, per the consumer requests flow), Refs #540

@egdev6 egdev6 added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 22, 2026
@egdev6
egdev6 merged commit 6c461f5 into main Nov 22, 2026
7 checks passed
@egdev6
egdev6 deleted the docs/plans-text-truncate-icon-button-hit-area branch November 22, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant