Ellpeck / ObsidianSimpleTimeTracker

Multi-purpose time trackers for your notes!
MIT License
145 stars 25 forks source link

[feat] Inline Stop Button for Active Segment #68

Open Karamellwuerfel opened 1 week ago

Karamellwuerfel commented 1 week ago

Description: In the current implementation, the user has to scroll to the top of the screen to stop the active time segment using the main "Stop" button. This is inconvenient, especially in a long list of time segments. To enhance usability, the "Continue" or "Start" button should dynamically change to a "Stop" button when a segment is active. This allows users to stop the active segment directly from the list, without needing to scroll up.

Acceptance Criteria:

  1. When a segment is currently running (active), its associated "Continue" or "Start" button changes to a "Stop" button.
  2. Clicking the "Stop" button in the segment row immediately stops the active segment, updates the segment end time, and recalculates the duration.
  3. The main timer at the top is also stopped when the inline "Stop" button is clicked.
  4. The button should revert to "Continue" after the segment is stopped.

Example Scenario:

  1. User starts a segment from the list or from the main timer.
  2. The "Continue" button for the active segment changes to a "Stop" button.
  3. User clicks the inline "Stop" button in the segment row.
  4. The segment is immediately stopped, the end time is recorded, and the duration is updated.
  5. The button changes back to "Continue" to indicate that the segment can be resumed (like just now).

Benefits: