Skip to content

fix: SW-2535 make table action cells reachable on touch (+ alwaysVisible) - #218

Open
boramyi-ts wants to merge 2 commits into
mainfrom
SW-2535-action-cell
Open

fix: SW-2535 make table action cells reachable on touch (+ alwaysVisible)#218
boramyi-ts wants to merge 2 commits into
mainfrom
SW-2535-action-cell

Conversation

@boramyi-ts

Copy link
Copy Markdown
Contributor

SW-2535 — Action cell bug

TableCell variant="action" was opacity-0 until row hover, so on touch devices (no hover) the row-action trigger (the menu) was invisible at rest and undiscoverable. opacity-0 keeps it in the a11y tree and tappable, but a sighted touch user can't see it's there.

Fix

  • Default now reveals action cells on coarse pointers (pointer-coarse:opacity-100) — always visible on tablets/phones, where there's no hover to reveal them. Mouse devices keep reveal-on-hover unchanged.
  • New alwaysVisible prop opts out of the fade entirely (show at rest on every device) for consumers that want persistent row actions.
Context At rest
Desktop / mouse (pointer: fine) hidden → reveal on row hover/focus (unchanged)
Tablet / phone (pointer: coarse) always visible
alwaysVisible always visible everywhere

Keyboard (focus-within reveal) and screen readers (opacity-0 stays operable) were already fine; this closes the touch gap.

Before → After — touch (iPad emulation)

The action column is empty at rest before; after, the shows on every row.

Before (touch) After (touch)
before touch after touch

alwaysVisible opt-in (desktop)

always visible

Testing

  • yarn typecheck ✓ · yarn lint ✓ (0 warnings) · Storybook play 37/37.
  • Added a default-hidden-at-rest assertion to Row Actions and a new Persistent Row Actions story (alwaysVisible) asserting opacity 1.
  • Coarse-pointer behavior verified via iPad emulation (jsdom/desktop-Chromium can't emulate pointer: coarse): touch → opacity 1, desktop → opacity 0.

🤖 Generated with Claude Code

TableCell variant="action" was opacity-0 until row hover, so on touch (no
hover) the row actions were invisible at rest and undiscoverable.

- Default now reveals action cells on coarse pointers (pointer-coarse:
  opacity-100) so they always show on tablets/phones; mouse devices keep the
  reveal-on-hover behavior unchanged.
- New `alwaysVisible` prop opts out of the fade entirely (show at rest on
  every device), for consumers that want persistent row actions.
- Stories: added a default-hidden-at-rest assertion to Row Actions and a new
  Persistent Row Actions story (alwaysVisible) asserting opacity 1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ts-lib-ui-kit-storybook Ready Ready Preview Sep 11, 2026 3:21pm UTC

Request Review

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues found

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 96.94% (🎯 83%)
⬆️ +0.42%
24731 / 25510
🟢 Statements 96.94% (🎯 83%)
⬆️ +0.42%
24731 / 25510
🟢 Functions 94.61% (🎯 74%)
⬇️ -1.14%
1178 / 1245
🟢 Branches 90.77% (🎯 81%)
⬆️ +0.66%
4980 / 5486
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/ui/table.tsx 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #1242 for commit ef0e468 by the Vitest Coverage Report Action

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