Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add cell color clear function #47

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Conversation

Tatehito
Copy link
Collaborator

@Tatehito Tatehito commented Feb 22, 2024

Close #45

Self Check

  • I've confirmed All checks have passed on PR page. (You may leave this box unchecked due to long workflows.)
    • PR title follows Angular's commit message format.
      • PR title doesn't have WIP:.
    • All tests are passed.
      • Test command (e.g., yarn test) is passed.
      • Lint command (e.g., yarn lint) is passed.
  • I've reviewed my changes on PR's diff view.

@Tatehito Tatehito self-assigned this Feb 22, 2024
@Tatehito Tatehito requested a review from ykit00 February 26, 2024 00:14
event.preventDefault();

handleClickCell(columnIndex, rowIndex);
updateCellColor(undefined, columnIndex, rowIndex);
Copy link
Collaborator

Choose a reason for hiding this comment

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

型によるものですが、undefined が引数になるのは結構違和感ありますね。
無色 -> null のほうが自然で使いやすいかもしれないと思いましたがどうでしょう・・?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ykit00
たしかに!あらためて調べてみたのですが、undefined: 初期化されていない、null: 利用できない、のような意味合いがありどちらも適していないと思ったのでundefined -> 'white' に変更しました!

Copy link
Collaborator

@ykit00 ykit00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Tatehito Tatehito merged commit be5761e into main Feb 26, 2024
5 checks passed
@Tatehito Tatehito deleted the feature/clear-cell-color branch February 26, 2024 06:26
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.

ユーザーは右クリックでマスの色をリセットできる
2 participants