feat: TimerControlsに「TIME Revert」ボタンと「リセット」ボタンを追加 - #4
Conversation
There was a problem hiding this comment.
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
TimerControlsPropswith a newonRevertcallback. - Add a “Time Revert” button to
TimerControlswired toonRevert. - Implement
revertTimerinAppto restore fromlastSetTimeand 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.
tanahiro2010
left a comment
There was a problem hiding this comment.
refactor: change handler's name
|
@shinya @shinya-saita please review |
|
@tanahiro2010 まず、テストしてみたところ、添付の画像にあるように、ボタンが伸びてしまい、レイアウトが崩れています。 また、その結果として、ボタンの名前は単に「Restore」にしてください。これがタイマーであることは明らかなので。 また、ボタンの色は他の部分とは異なる色にしていただきたいです。 |

概要
タイマーアプリに「時間巻き戻し」機能を追加しました。
ユーザーがタイマーを最後に設定した時刻へ戻せるようになっています。
変更内容
新機能:時間巻き戻し
App.tsxにrevertTimer関数を追加AppからTimerControlsにonRevertプロパティを追加UI 更新
TimerControlsにリバート用ボタンを追加onRevertを実行するよう変更※ ボタンラベルは
Restore Timerに変更しています。型定義の更新
types.tsTimerControlsPropsにonRevertを追加TimerControlsonRevertプロパティを受け取るよう更新