Repository navigation
feat(sudoku): grid digit keypad (3×3) with per-key remaining count - #658
Merged
Merged
Conversation
…g counts
Replace the single-row nine-button strip (compact layout only) with a
`Grid(horizontalSpacing:8, verticalSpacing:8)` layout matching the
existing `macDigitGrid` pattern. Per-key changes:
- VStack shows the digit (`.title2.weight(.medium)`) above a small
remaining count (`.caption2`). Remaining = 9 − placed count, derived
at the `BoardView` call site from `viewModel.board.cells`.
- remaining == 1 → count tinted sage-green ("last one" cue).
- remaining == 0 → `.disabled(true)`, `.opacity(0.35)`, no count label.
- Notes mode → 1 pt sage border + ~6 % sage wash around the grid via
zero-lineWidth / zero-opacity fallback (avoids view-type mismatch).
- Accessibility: `.accessibilityValue("\(n) remaining")` / "fully placed".
- Dynamic Type capped at `.xLarge` (same rationale as the old strip, #540).
`DigitPadView` receives a new `remainingCounts: [Int]` (9 elements,
index i = digit i+1). `BoardView.digitPad` computes it inline:
`(1...9).map { dgt in max(0, 9 − cells.filter { $0 == UInt8(dgt) }.count) }`.
Mac path (`macDigitGrid`), `compactControlRow`, and all public callbacks
are untouched.
Snapshot baselines: 6 iPhone fixtures re-recorded; 7 Mac/iPad fixtures
byte-identical.
Co-Authored-By: Claude <[email protected]>
wei18
added a commit
that referenced
this pull request
Jul 1, 2026
…ghting (#662) Records the unified pause/leave menu (#660, 4 owner-driven design rounds), the 3×3 keypad (#658), in-board peer+same-digit highlighting (#661), the CI PR-title relax (#659), and the session's lessons (ground UX in the actual screen; check worktrees before force-remove; don't trust subagent test claims). Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner-requested: replace the iPhone single-row 1–9 digit strip with a 3×3 grid (九宮格), plus a per-key remaining-count.
What
Grid(1-2-3 / 4-5-6 / 7-8-9), reusing the MacmacDigitGridpattern. Control row (Undo/Redo/Notes/Erase) unchanged, above the grid.BoardViewfromviewModel.board.cells: shown for every digit; ==1 tinted sage-green (last-one cue); ==0 dimmed + disabled.Verified
Follow-up: iPhone SE fit uses minHeight 56; a ViewThatFits→44 fallback is the next move if a real SE run shows crowding.
🤖 Generated with Claude Code