Skip to content

ux(chargen): pencil icon and hover state on row Edit affordances#168

Merged
slabgorb merged 1 commit intodevelopfrom
ux/chargen-edit-affordance
Apr 26, 2026
Merged

ux(chargen): pencil icon and hover state on row Edit affordances#168
slabgorb merged 1 commit intodevelopfrom
ux/chargen-edit-affordance

Conversation

@slabgorb
Copy link
Copy Markdown
Owner

Summary

Per playtest 2026-04-26 sq-playtest-pingpong section [UX] Edit affordances on the chargen sheet are too pale to discover (low priority, real usability hit). The per-row Edit links on the chargen confirmation sheet were bare text in text-muted-foreground, easy to miss against a dark card. ux-observer flagged stats and equipment rows as the worst offenders.

Two complementary upgrades:

  • lucide-react Pencil icon next to the visible "Edit" text — discoverable without hover, helpful for first-timers, touch users, and Sebastien (mechanics-first scanner per CLAUDE.md playgroup).
  • Row-level named-group hover (group/edit-row) brightens the entire row's background and the Edit button's border — elegant cue for mouse users that doesn't demand attention.

Accessibility is intact: icon is aria-hidden, button keeps aria-label="Edit <Field>", visible "Edit" text retained alongside icon. Dark aesthetic preserved (existing theme tokens only). No behavior change — click still emits {action: "edit", target_step: index}.

Test plan

  • npx vitest run src/components/CharacterCreation/ — 10/10 pass (3 files)
  • New: CharacterCreation.edit-affordance.test.tsx — 5 unit assertions + 1 wiring test (verifies App.tsx still imports + mounts CharacterCreation in creation phase, per CLAUDE.md "Every Test Suite Needs a Wiring Test")
  • npm run lint — clean for touched files (one pre-existing warning in App.tsx is unrelated)
  • Visual verification in next playtest screenshot

The chargen confirmation sheet's per-row "Edit" links rendered as bare
text in `text-muted-foreground` against a dark card background — pale,
small, and easy to miss. ux-observer flagged this in playtest 2026-04-26
(see sq-playtest-pingpong "[UX] Edit affordances on the chargen sheet
are too pale to discover"); especially impactful on the stats and
equipment rows where the row's own content is dense.

Two-pronged upgrade, each one independently improving discoverability:
- `lucide-react` `Pencil` icon next to the visible "Edit" text. Makes
  the affordance obvious without requiring hover (better for first-
  timers and touch users; serves Sebastien who scans for mechanical
  controls per CLAUDE.md playgroup rubric).
- Row-level named-group hover (`group/edit-row`) brightens the row
  background and the Edit button's border on hover. Elegant cue for
  mouse users; doesn't demand attention until the user moves toward it.

Accessibility preserved: icon is `aria-hidden`, the button still
carries `aria-label="Edit <Field>"`, and the visible "Edit" text is
retained alongside the icon (not icon-only). Dark aesthetic kept —
all colors are existing theme tokens (muted-foreground, border, card).

No behavior change — the click handler still emits
`{action: "edit", target_step: index}` exactly as before.

Tests:
- `CharacterCreation.edit-affordance.test.tsx` — 5 unit assertions
  (icon renders per row, accessible name preserved, "Edit" text kept,
  icon aria-hidden, row-hover Tailwind class wiring) + 1 wiring test
  asserting App.tsx still imports + mounts CharacterCreation in the
  `creation` session phase.

Refs: sq-playtest-pingpong 2026-04-26 — UX section.
@slabgorb slabgorb merged commit 99ae903 into develop Apr 26, 2026
1 check failed
@slabgorb slabgorb deleted the ux/chargen-edit-affordance branch April 26, 2026 11:47
slabgorb added a commit that referenced this pull request Apr 26, 2026
…tsx by combining stats grid (this PR) with edit-affordance Pencil/hover (#168)
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