Skip to content

Conversation

@Quorafind
Copy link
Collaborator

  • Add TaskTimer editor extension with start/stop/pause controls
  • Implement TaskTimerManager for timer state management
  • Add TaskTimerExporter for data export capabilities
  • Create TaskTimerFormatter for time display formatting
  • Add TaskTimerMetadataDetector for task metadata parsing
  • Include task timer CSS styling and UI components
  • Integrate timer settings into plugin configuration
  • Support timer persistence and session management

Quorafind and others added 17 commits July 28, 2025 15:12
- Add TaskTimer editor extension with start/stop/pause controls
- Implement TaskTimerManager for timer state management
- Add TaskTimerExporter for data export capabilities
- Create TaskTimerFormatter for time display formatting
- Add TaskTimerMetadataDetector for task metadata parsing
- Include task timer CSS styling and UI components
- Integrate timer settings into plugin configuration
- Support timer persistence and session management
Replace ViewPlugin with StateField to resolve CodeMirror block decoration
error. Use editorInfoField for proper editor access and replace innerHTML
with Obsidian's native DOM APIs.

- Replace ViewPlugin with StateField for block-level decorations
- Use state.field(editorInfoField) to access editor and app instances
- Remove innerHTML usage in favor of createEl/createDiv/createSpan
- Fix "Block decorations may not be specified via plugins" error
- Improve CSS with proper width and box-sizing for block display
- Maintain all existing timer functionality (start/pause/complete)
Add detailed console logging throughout timer decoration creation to
help diagnose rendering issues. Fix global configuration access by
properly setting timerConfig instead of undefined global variables.

- Add debug logs for each step of decoration creation process
- Log file processing, task detection, and decoration count
- Fix timerConfig initialization in taskTimerExtension function
- Add test file with proper frontmatter for timer functionality
- Enable troubleshooting of timer widget display issues
Fix TypeError by using correct method name isTaskTimerEnabled instead
of isTimerEnabledForFile, and remove extra app parameter from
TaskTimerMetadataDetector constructor.

- Use correct method name isTaskTimerEnabled()
- Remove app parameter from TaskTimerMetadataDetector constructor
- Resolves "metadataDetector.isTimerEnabledForFile is not a function"
Replace complex button-based UI with simple text links for better
integration and cleaner appearance. Improve subtask detection logic
to only show timers on actual parent tasks.

- Replace buttons with underlined text links for all actions
- Remove complex CSS styling in favor of minimal text styling
- Fix subtask detection to stop at same/lower indentation levels
- Update real-time display to refresh every second
- Add click event propagation prevention
- Simplify UI to show "⏱ time | action | action" format
- Remove 280+ lines of unnecessary CSS styling
- Fix timer not starting after block ID insertion
- Improve parent task detection to find all subtasks, not just immediate next line
- Add proper state updates to refresh widget after block ID creation
- Fix TypeScript errors with generateBlockId visibility and elapsed property
- Ensure timer controls update correctly after inserting block reference
Replace global variable configuration with CodeMirror 6's recommended Facet pattern
for passing configuration to StateField. This provides better type safety,
reactive updates, and follows CodeMirror architecture best practices.

Changes:
- Replace globalTimerConfig with taskTimerConfigFacet
- Update all config access to use state.facet() pattern
- Return array of [facet, statefield] from extension function
- Maintain compatibility with existing functionality
Priority values containing spaces (e.g., '⏰ 2025-06-05 14:25' or 'Invitation to meeting')
were causing InvalidCharacterError when used in CSS class names. This fix adds a utility
function to sanitize priority values by removing spaces and invalid characters.

- Add priorityUtils module with sanitizePriorityForClass() function
- Update all components that use priority in CSS classes:
  - kanban-card.ts (3 locations)
  - gantt/task-renderer.ts (2 locations)
  - quadrant-card.ts (1 location)
  - InlineEditor.ts (1 location)
  - listItem.ts (1 location)
  - treeItem.ts (1 location)
- Preserve numeric priorities (1-5) as-is
- Replace spaces with hyphens for text priorities
- Remove special characters invalid in CSS tokens

Fixes: Failed to execute 'add' on 'DOMTokenList' errors in kanban, gantt, and quadrant views
@Quorafind Quorafind merged commit 62f0671 into master Jul 31, 2025
2 checks passed
Quorafind added a commit that referenced this pull request Aug 27, 2025
feat(timer): add comprehensive task timer functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants