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.