Skip to content

feat: TimerControlsに「TIME Revert」ボタンと「リセット」ボタンを追加 - #4

Open
tanahiro2010 wants to merge 8 commits into
shinya:mainfrom
tanahiro2010:main
Open

feat: TimerControlsに「TIME Revert」ボタンと「リセット」ボタンを追加#4
tanahiro2010 wants to merge 8 commits into
shinya:mainfrom
tanahiro2010:main

Conversation

@tanahiro2010

Copy link
Copy Markdown

概要

タイマーアプリに「時間巻き戻し」機能を追加しました。
ユーザーがタイマーを最後に設定した時刻へ戻せるようになっています。

変更内容

新機能:時間巻き戻し

  • App.tsxrevertTimer 関数を追加

    • タイマーを最後に設定した時刻へ復元
    • アラーム状態を停止
    • 「時間切れ」状態をリセット
  • App から TimerControlsonRevert プロパティを追加

UI 更新

  • TimerControls にリバート用ボタンを追加
  • ボタン押下時に onRevert を実行するよう変更

※ ボタンラベルは Restore Timer に変更しています。

型定義の更新

  • types.ts

    • TimerControlsPropsonRevert を追加
  • TimerControls

    • 新しい onRevert プロパティを受け取るよう更新

Copilot AI review requested due to automatic review settings May 29, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a “time revert” capability to restore the timer back to the most recently set duration, exposed via the timer controls UI.

Changes:

  • Extend TimerControlsProps with a new onRevert callback.
  • Add a “Time Revert” button to TimerControls wired to onRevert.
  • Implement revertTimer in App to restore from lastSetTime and pass it down.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/types.ts Adds onRevert to the timer controls props contract.
src/components/TimerControls.tsx Wires a new “Time Revert” control button to the new callback.
src/App.tsx Implements revertTimer behavior and passes it into TimerControls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/types.ts Outdated
Comment thread src/components/TimerControls.tsx Outdated
Comment thread src/components/TimerControls.tsx Outdated
@tanahiro2010 tanahiro2010 changed the title TimerControlsに「TIME Revert」ボタンと「リセット」ボタンを追加 feat: TimerControlsに「TIME Revert」ボタンと「リセット」ボタンを追加 May 29, 2026

@tanahiro2010 tanahiro2010 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

refactor: change handler's name

Comment thread src/components/TimerControls.tsx Outdated
Comment thread src/components/TimerControls.tsx Outdated
Comment thread src/App.tsx Outdated
Comment thread src/types.ts Outdated
@tanahiro2010
tanahiro2010 requested a review from Copilot May 29, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread src/types.ts
Comment thread src/components/TimerControls.tsx
Comment thread src/App.tsx
@tanahiro2010

Copy link
Copy Markdown
Author

@shinya @shinya-saita please review

@shinya shinya added the enhancement New feature or request label Jul 6, 2026
@shinya
shinya self-requested a review July 6, 2026 01:18
@shinya

shinya commented Jul 6, 2026

Copy link
Copy Markdown
Owner

@tanahiro2010
ありがとうございます。また、フィードバックが遅れてしまい申し訳ありません。
いくつか改善していただきたい点があります。

まず、テストしてみたところ、添付の画像にあるように、ボタンが伸びてしまい、レイアウトが崩れています。
これを修正してほしいです。
スクリーンショット 2026-07-06 10 08 16

また、その結果として、ボタンの名前は単に「Restore」にしてください。これがタイマーであることは明らかなので。
そうすればボタンの長さが短くなるため、レイアウトの問題も解決すると思います。

また、ボタンの色は他の部分とは異なる色にしていただきたいです。
特に強い希望はありませんが、デザイン全体のバランスを考慮すると、グレーとかですかね。
(別にそれ以外でもOKです。同じ色は避けたいです。)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants