Repository navigation
cardkit-ui: a real dealer button, for both games to share - #24
Conversation
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
left a comment
There was a problem hiding this comment.
Review from the 500 side (Jack asked me to look for anything that would bite 500). Nothing blocking; three small things, in priority order:
-
Accessibility: the puck reads as "D".
Text("D")is the only semantics, so TalkBack announces a bare letter next to a name. Give the puckModifier.semantics(mergeDescendants = true) { contentDescription = "Dealer" }(or acontentDescription: String = "Dealer"parameter alongsidelabel) so screen readers say what it is. 500's cards already carrycontentDescription = card.label; this should match that standard. -
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. -
Glyph wrapping.
labelis free-form but theTexthas nomaxLines = 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>
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.CardSurfaceWhite/NeutralInkOnCardSurface) rather than themed — it is an object on the felt, not a label, so it should not flip with the colour scheme.DealerButtonTaglets 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