Skip to content

Fix OK button enabled on new game dialog for empty case - #57

Merged
gturc-dev merged 1 commit into
masterfrom
gturc/fix-ok-button-enabled-new-game-dialog-for-empty-case
Apr 13, 2026
Merged

gturc-dev merged 1 commit into
masterfrom
gturc/fix-ok-button-enabled-new-game-dialog-for-empty-case

Conversation

@gturc-dev

Copy link
Copy Markdown
Collaborator

Summary

  • Disables the OK button in the "New Game" dialog until at least one character is entered in the name field
  • Observes UITextField.textDidChangeNotification on the alert's text field to toggle the button state
  • Prevents creating a game with an empty name via the UI

Test plan

  • Tap + → "Create new game"
  • Verify OK button is disabled when the text field is empty
  • Type at least one character and verify OK button becomes enabled
  • Clear the text field and verify OK button disables again
  • Confirm a game is created successfully when a name is entered and OK is tapped

🤖 Generated with Claude Code

@gturc-dev
gturc-dev requested a review from amiantos April 13, 2026 22:38
@gturc-dev gturc-dev added the improvement improve existing feature label Apr 13, 2026

@amiantos amiantos left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM... I need to get rid of those SwiftLint and SwiftFormat workflows...

@gturc-dev
gturc-dev merged commit 6f5e429 into master Apr 13, 2026
1 of 2 checks passed
@gturc-dev
gturc-dev deleted the gturc/fix-ok-button-enabled-new-game-dialog-for-empty-case branch April 13, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement improve existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants