Commit graph

2 commits

Author SHA1 Message Date
callumalpass
b664e4e03c Improve pomodoro timer and stats bases 2026-05-17 00:01:14 +10:00
Callum Alpass
b3097d5710 feat: status bar to display currently tracked tasks (#114)
Highlights:
• Introduces a new StatusBarService (src/services/StatusBarService.ts)
that:
  – Creates and manages a status bar element displaying active time
tracking sessions.
  – Retrieves current tracked tasks by filtering active time sessions.
  – Debounces update requests to minimize excessive DOM re-renders.
  – Provides a click handler that opens the tasks view (with a note to
potentially filter tasks in the future).
  – Offers methods for initializing, updating, toggling visibility, and
cleanup.

• Updates src/main.ts to:
  – Import and instantiate the new StatusBarService.
  – Initialize the status bar service during plugin startup.
  – Set up new event listeners (e.g., for task updates, data changes,
and Pomodoro events) that trigger status bar updates.
  – Clean up and update visibility of the status bar service during
plugin unload and theme/style refreshes.

• Enhances settings (src/settings/settings.ts) by:
  – Adding a new boolean setting "showTrackedTasksInStatusBar" with a
default value of false.
  – Introducing a new section in the settings tab to allow users to
toggle the status bar display on or off.
  – Updating the setting immediately triggers a status bar visibility
update.

• Adjusts style:
  – Adds the "styles/status-bar.css" file containing styling for the
status bar element, including responsive behavior and theme adjustments.
  – Updates build-css.mjs to include the new CSS file in the plugin's
build pipeline.

Overall, these changes integrate a user-configurable display for active
task tracking directly into the status bar, providing immediate visual
feedback and interactivity with the plugin’s time tracking features.
2025-06-30 21:58:35 +10:00