Skip to content

cardkit-ui: a real dealer button, for both games to share - #24

Merged
rotundtapir merged 2 commits into
mainfrom
feat/dealer-button
Sep 7, 2026
Merged

rotundtapir merged 2 commits into
mainfrom
feat/dealer-button

Conversation

@rotundtapir

Copy link
Copy Markdown
Owner

Euchre marked the dealer by appending " (D)" to a seat name, which reads as part of the name and gets missed. 500 does the same thing. This extracts the replacement euchre just shipped: the white puck a real table uses.

  • Card-coloured (CardSurfaceWhite / NeutralInkOnCardSurface) rather than themed — it is an object on the felt, not a label, so it should not flip with the colour scheme.
  • The glyph is sized off the puck rather than from a type scale, so the compact variant stays legible instead of becoming a smudge.
  • DealerButtonTag lets a test find the marker without knowing which seat holds it.

The one non-obvious rule for callers is in the KDoc: reserve the puck's height on every seat's row, not just the dealer's. The puck is taller than the name beside it and the deal moves one seat per hand, so a row that sizes itself to its contents grows and shrinks once a hand and shoves the table around it. Euchre hit exactly that.

Euchre will drop its local copy for this on the next pin bump. 500 is welcome to adopt it — no obligation, and nothing here changes existing behaviour, since nothing calls it yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RAUtJpC5AwDWmkoPsqj9Hh

Euchre marked the dealer by appending " (D)" to a seat name, which reads as part
of the name and gets missed; 500 does the same thing. This is the white puck a
real table uses — card-coloured rather than themed, because it is an object on
the felt, not a label.

The KDoc carries the one non-obvious rule for callers: reserve the puck's height
on every seat, not just the dealer's, or the row grows and shrinks once a hand
as the deal moves round.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAUtJpC5AwDWmkoPsqj9Hh
Signed-off-by: rotund_tapir <rotund_tapir@protonmail.com>

@rotundtapir rotundtapir left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review from the 500 side (Jack asked me to look for anything that would bite 500). Nothing blocking; three small things, in priority order:

  1. Accessibility: the puck reads as "D". Text("D") is the only semantics, so TalkBack announces a bare letter next to a name. Give the puck Modifier.semantics(mergeDescendants = true) { contentDescription = "Dealer" } (or a contentDescription: String = "Dealer" parameter alongside label) so screen readers say what it is. 500's cards already carry contentDescription = card.label; this should match that standard.

  2. Test tag namespace. cardkit-ui's existing tag is namespaced (CardTestTagPrefix = "ck:card:"); DealerButtonTag = "dealerButton" is not, so it lives in the same flat space as the apps' own tags. "ck:dealerButton" keeps the convention and rules out a collision.

  3. Glyph wrapping. label is free-form but the Text has no maxLines = 1 / softWrap = false; a two-character label inside a 22dp circle can wrap. Cheap to pin.

Noted, not a change request: Dp.toSp() divides by the user's font scale, so the glyph stays fixed to the puck regardless of system font size. That is the right call for a marker that has to fit its circle, and it is another reason (1) matters — the a11y path is the label, not the glyph.

For 500 specifically: colours follow the felt convention (fixed ink on fixed surface), the compact 22dp size fits our landscape side column, and reserving the puck's height on every seat row is straightforward in our opponents' row. 500 has no dealer marker today (the description's "500 does the same thing" isn't right — we only have the deal animation as a cue), so on our side this is a trial of a new element rather than a swap; Jack wants to see it on the phone and in landscape before adopting.

…the glyph

Review asks from the 500 side: a bare "D" announced beside a seat name
is meaningless, so the puck now carries contentDescription = "Dealer"
(parameterised beside label). The test tag becomes ck:dealerButton,
matching ck:card: so it cannot collide with an app's own tags. And the
glyph is maxLines = 1 / softWrap = false, so a longer label cannot wrap
inside the 22dp compact circle.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAUtJpC5AwDWmkoPsqj9Hh
Signed-off-by: rotund_tapir <rotund_tapir@protonmail.com>
@rotundtapir
rotundtapir merged commit 69d348b into main Sep 7, 2026
1 check passed
@rotundtapir
rotundtapir deleted the feat/dealer-button branch September 7, 2026 21:30
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