Commit graph

31 commits

Author SHA1 Message Date
callumalpass
bf5a68019a checkpoint runtime api and companion docs 2026-06-01 19:19:26 +10:00
callumalpass
564ee354ca Resolve remaining lint warnings 2026-05-13 08:17:35 +10:00
callumalpass
f03ddbce58 refactor: consolidate file selector modals into FileSelectorModal
Create a new unified FileSelectorModal that replaces AttachmentSelectModal
and ICSNoteLinkModal. The new modal provides:
- Fuzzy search for existing files
- Shift+Enter to create new files with typed name
- Configurable filter (markdown only, all files, or custom)
- Simple footer showing create option with filename preview

Updated usages:
- TimeblockCreationModal: attachments (filter: all)
- TimeblockInfoModal: attachments (filter: all)
- ICSEventContextMenu: note linking (filter: markdown)
- ICSEventInfoModal: note linking (filter: markdown)

Also improved task selector create preview spacing.

Removed:
- src/modals/AttachmentSelectModal.ts
- src/modals/ICSNoteLinkModal.ts
2025-11-30 11:32:47 +11:00
callumalpass
bd632ea401 refactor: replace TaskSelectorModal with TaskSelectorWithCreateModal
All task selector modals now use the new TaskSelectorWithCreateModal,
which allows users to either select an existing task OR create a new
task via NLP parsing with Shift+Enter.

Updated usages:
- main.ts: insertTaskNoteLink, time tracking, time entry editor
- PomodoroView.ts: task selection for pomodoro sessions
- StatusBarService.ts: selecting tracked tasks
- TaskContextMenu.ts: dependency selection, subtask assignment
- TaskModal.ts: dependency selection, subtask selection
- calendar-core.ts: time entry creation from calendar

Also added openTaskSelector() helper function for drop-in replacement
of the old TaskSelectorModal callback pattern.

Removed:
- src/modals/TaskSelectorModal.ts
- styles/task-selector-modal.css
2025-11-30 11:32:47 +11:00
callumalpass
5b788c0514 feat: add task selector with NLP create modal
Add a new "Create or open task" command that opens a fuzzy selector modal
allowing users to either select an existing task or create a new task via
natural language parsing.

Features:
- Fuzzy search through existing tasks
- Real-time NLP preview in footer as user types
- Shift+Enter to create new task from parsed input
- Enter/click to select and open existing task
- Uses TaskCard component for consistent task rendering in suggestions

Implementation details:
- New TaskSelectorWithCreateModal extending SuggestModal
- Deferred cancelled result handling to work around Obsidian's
  onClose-before-onChooseSuggestion behavior
- CSS overrides for TaskCard within modal context
2025-11-30 11:32:47 +11:00
Renato Mendonca
395055b8a4 feat(bases): add inline search functionality to task-list view
- Implement TaskSearchFilter for ephemeral task filtering
  - Case-insensitive full-text search across task properties
  - Searches title, status, priority, tags, contexts, projects
  - Supports custom visible properties from view config
  - Performance monitoring for slow operations (>100ms)

- Seamless virtual scrolling integration
  - Search filtering applied before virtual scroll threshold check
  - Automatically switches between virtual/normal rendering based on filtered count
  - Maintains performance with large datasets (tested with 30k+ tasks)
  - Virtual scrolling activates at 100 filtered items threshold

- Create SearchBox UI component
  - Lucide search icon positioned outside input (left)
  - Debounced input (300ms) to reduce filter operations
  - Clear button with keyboard support (Escape key)
  - Proper cleanup to prevent memory leaks
  - BEM-style CSS with Obsidian design tokens

- BasesViewBase ready for reusability
  - Opt-in pattern via enableSearch flag
  - Shared setupSearch(), handleSearch(), applySearchFilter()
  - Component lifecycle integration for automatic cleanup
  - Ready for use in KanbanView, CalendarView, etc.

- Add test coverage
  - 24 unit tests for TaskSearchFilter
  - 24 unit tests for SearchBox component
  - Integration test placeholders for E2E testing

- Update TaskListView to use inherited search
  - Enable search with single flag: enableSearch = true
  - Apply filtering in renderFlat, renderGrouped methods
  - Preserves all existing functionality (grouping, sub-grouping, etc.)
2025-11-22 19:32:39 +13:00
callumalpass
9832645096 Remove legacy migration system and streamline codebase
This commit completes a comprehensive cleanup of deprecated and unused
code throughout the TaskNotes codebase.

Major Changes:
1. **Removed Legacy Migration System** (~600 lines)
   - Deleted MigrationService.ts and MigrationModal.ts
   - Removed RecurrenceInfo interface (replaced by rrule strings)
   - Updated all code to use RFC 5545 rrule format exclusively
   - Removed convertLegacyRecurrenceToRRule() function
   - Updated API controllers to generate rrule strings instead of objects

2. **Removed CSS for Deleted Views** (282 lines)
   - Deleted styles/notes-view.css
   - Updated build-css.mjs to remove reference

3. **Removed Commented-Out Code** (~60 lines)
   - Cleaned up "// Removed" placeholders in ProjectSubtasksService
   - Removed commented imports across settings tabs
   - Removed non-existent RegexOptimizer import reference

4. **Removed Deprecated Helper Functions** (~90 lines)
   - Removed isTaskOverdue() (had timezone bugs)
   - Removed isRecurringTaskDueOn() (superseded by isDueByRRule)
   - Removed legacy recurrence handling code

5. **Removed Legacy Static Templates** (~100 lines)
   - Deleted DEFAULT_BASES_FILES constant
   - Simplified template generation to only use dynamic templates

6. **Added Untracked Test File**
   - Added issue-361-completion-based-recurrence.test.ts to git

Type Safety Improvements:
- Fixed TaskInfo.recurrence to only accept string (rrule format)
- Fixed TaskFrontmatter.recurrence type
- Fixed FieldMapping.recurrence comment
- Updated all recurrence handling to be type-safe

Build Verified: All TypeScript compilation errors resolved ✓

Total Impact: ~1,200 lines of code removed
2025-11-15 22:12:45 +11:00
callumalpass
98370e1666 Consolidate relationship widgets into unified Relationships widget
Replace separate project-subtasks and task-dependencies widgets with a
single unified Relationships widget that displays all relationship types
(subtasks, projects, blocked-by, blocking) in a dynamic tabbed interface.

**Key Changes:**

- **Unified Bases Template**: New 'relationships' template with 4 dynamic
  tabs that automatically show/hide based on available data
  - Subtasks (Kanban): Tasks where current note is a project
  - Projects (List): Projects the current task belongs to
  - Blocked By (List): Tasks blocking the current task
  - Blocking (Kanban): Tasks the current task is blocking

- **Simplified Settings**: Consolidated from 4 settings to 2
  - Removed: showProjectSubtasks, projectSubtasksPosition,
    showTaskDependencies, taskDependenciesPosition
  - Added: showRelationships, relationshipsPosition
  - Kept: showExpandableSubtasks (for task cards, not widget)

- **Minimal Event Handling**: Widget no longer needs event listeners
  - Bases views handle all data updates reactively
  - Widget only rebuilds on document/file changes
  - Removed 100+ lines of event handling code

- **Renamed Files**:
  - src/editor/ProjectNoteDecorations.ts → RelationshipsDecorations.ts
  - styles/project-note-subtasks.css → relationships.css

- **Code Reduction**:
  - RelationshipsDecorations: 277 lines (vs 481 previously)
  - relationships.css: 48 lines (vs 316 previously)

**Benefits:**
- Single source of truth for all relationships
- Dynamic tabs based on available data
- Better performance (one widget instead of 2-3)
- Simpler codebase and easier maintenance
- Future-proof: easy to add new relationship types
2025-11-09 19:41:57 +11:00
callumalpass
f3ff723152 feat: enhance time entry interface with new modal and calendar integration
Add comprehensive time entry management features:

- Add TimeEntryEditorModal for viewing, editing, adding, and deleting time entries
  - Native HTML5 datetime-local pickers for better UX
  - Auto-calculated duration from start/end times
  - Sorted by date (newest first)
  - Total time display in hours and minutes

- Add new commands:
  - "Start time tracking (select task)": Opens task selector to start tracking
  - "Edit time entries (select task)": Opens task selector then time entry editor

- Add TaskActionPaletteModal integration:
  - "Edit time entries" action appears for tasks with time entries

- Add Alt+drag calendar functionality:
  - Alt+drag on Bases calendar creates time entries (similar to Shift+drag for timeblocks)
  - Opens task selector to choose which task to add time entry to
  - Auto-calculates duration from dragged time range

- Fix timeblock creation (Shift+drag):
  - Remove requirement for timeblocks to be visible to create them
  - Allow creation as long as timeblocking is enabled in settings
  - Add debug logging for troubleshooting modifier keys

- Fix EVENT_TASK_UPDATED error:
  - Remove redundant event triggers that were passing incorrect data
  - TaskService.updateTask() already handles event emission properly

- Fix modal width issues:
  - Update TimeEntryEditorModal to prevent horizontal scrolling
  - Update webhook modal CSS with same fix
  - Use width: auto on modal container, specific width on modal-content

- Add comprehensive i18n translations for all new features
- Add styling for TimeEntryEditorModal with responsive design and dark mode support
2025-10-29 21:46:23 +11:00
callumalpass
b0329300e4 feat: add grouping styles and toggle functionality to Bases list view
- Create new bases-views.css with TaskListView-inspired grouping styles
- Add chevron toggle buttons to group headers
- Implement expand/collapse functionality for groups
- Add responsive design for mobile devices
- Include Kanban board styles for future use
- Integrate into CSS build process

The Bases list view now has consistent styling with TaskListView,
including collapsible groups with animated chevrons and proper spacing.
2025-10-05 17:46:14 +11:00
callumalpass
b695adcaf6 feat: add task card widget in task notes
Add configurable task card widget that displays at the top of task notes,
providing immediate access to task actions and context menus.

- Add TaskCardNoteDecorations extension with CodeMirror widget
- Task card shows at top of note after frontmatter
- Uses existing createTaskCard function for consistency
- Includes settings toggle (enabled by default)
- Positioned above project subtasks widget when both enabled
- Minimal border styling with small padding
- Responds to task updates and settings changes

Addresses issue #576 by eliminating need for command palette to access
task actions when viewing a task note.
2025-09-27 23:56:56 +10:00
callumalpass
b41f11e36e feat: Implement comprehensive statistics view with project drill-down
- Add new StatsView component with project-based statistics and filtering
- Implement interactive project drill-down modals with detailed metrics
- Add sparkline time trend visualization for project activity
- Include activity bar charts showing daily task completion patterns
- Support date range filtering and project-specific analytics
- Fix modal CSS scoping to work properly when appended to document.body
- Remove jarring hover transform effects per user feedback
- Add comprehensive debugging for modal visibility troubleshooting

Addresses GitHub issue #477 for enhanced project statistics tracking.
2025-08-25 21:11:13 +10:00
renatomen
7480d68bcf feat: add filter heading display to TaskListView
- Add FilterHeading component to show current saved view name and completion count
- Display 'All' when no saved view is applied, or saved view name when applied
- Include completion count in 'X / Y' format with proper spacing
- Add horizontal divider line below heading for visual separation
- Integrate with TaskListView between FilterBar and task content
- Auto-detect active saved view from persisted state on view load
- Update heading when tasks are refreshed or filters change
- Add proper cleanup on view close

The heading provides immediate visual feedback about:
- What filter/view is currently active
- Task completion progress (completed/total count)

Layout: [FilterBar] -> [Heading + Count] -> [Divider] -> [Task Content]
2025-08-18 00:24:32 +12:00
Callum Alpass
b3c8e4963a feat(ui): add comprehensive webhook settings styling
- Create dedicated webhook-settings.css with modern design system
- Add webhook styles to CSS build process in build-css.mjs
- Implement card-based layout for webhook list and modal
- Add proper spacing, colors, and hover effects
- Use Obsidian design tokens for consistent theming
2025-08-13 10:37:02 +10:00
Callum Alpass
24eeb4a92b feat: Implement task reminders system with iCalendar VALARM support
## New Features

### Core Reminder System
- Add `reminders` field to TaskInfo interface following iCalendar VALARM spec
- Support both relative (`-PT15M`) and absolute (`2025-10-26T09:00:00`) reminders
- Implement reminder data mapping in FieldMapper and MinimalNativeCache
- Add reminders to task creation and edit workflows

### User Interface Components
- **ReminderModal**: Complete modal for managing task reminders
  - Add/remove relative and absolute reminders
  - Visual forms with date/time pickers and duration controls
  - Real-time preview and validation
- **ReminderContextMenu**: Quick access menu for common reminder actions
  - Pre-configured options (5min, 15min, 1hr, 1day before)
  - Context-aware based on task due/scheduled dates
- **Task Cards**: Bell icon indicators for tasks with reminders
  - Click to open reminder management modal
  - Tooltip showing reminder count
  - Proper CSS positioning to avoid icon overlap

### Modal Enhancements
- Add reminder icons to TaskCreationModal and TaskEditModal action bars
- Enhanced event system for real-time UI updates
- Support for reminder preview changes during editing

### Notification Service
- NotificationService foundation for future reminder notifications
- Settings for notification preferences (system vs in-app)
- Integration points for reminder processing

## Technical Implementation

### Data Layer
- Extended TaskInfo with optional `reminders: Reminder[]` field
- Updated FieldMapper to handle reminder array serialization
- Modified MinimalNativeCache and helpers to include reminders in task extraction
- Enhanced TaskService to support reminder CRUD operations

### Event System
- Enhanced ReminderModal with comprehensive event emission
- `reminder-changed` events for saved changes
- `reminder-preview-changed` events for real-time feedback
- Proper cancellation handling and state reset

### Styling
- New reminder-modal.css for modal components
- Updated task-card-bem.css with proper icon positioning
- BEM methodology for consistent component styling
- Responsive design considerations

## Bug Fixes
- Fix icon overlap on task cards by adjusting CSS positioning:
  - Recurring indicator: `right: 26px`
  - Reminder indicator: `right: 44px`
  - Project indicator: `right: 62px`
  - Chevron: `right: 80px`
- Ensure reminders field properly propagates through cache system
- Add TypeScript type safety for reminder data structures

## Settings Integration
- Add notification preferences to settings panel
- Field mapping support for custom reminder property names
- Backward compatibility with existing task data

This implementation provides a complete foundation for task reminders while
maintaining full backward compatibility and following the plugin's architectural patterns.
2025-08-07 13:01:04 +10:00
Callum Alpass
f193dade24 feat: add collapsible project note subtasks widget
- Add ProjectNoteDecorations extension for live preview mode
- Create ProjectSubtasksService for shared project logic
- Implement collapsible subtask display with persistent state
- Add comprehensive event listening for real-time updates
- Remove duplicate post-processor implementation
- Use proper Obsidian editorLivePreviewField API
- Add responsive CSS with smooth transitions
2025-07-09 21:01:30 +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
Callum Alpass
b4fe29068b Refactor and consolidate modal implementation, update naming and imports, and adjust styles and tests
• Remove the legacy “MinimalistTaskModal” base class and its derivatives (MinimalistTaskCreationModal and MinimalistTaskEditModal) by renaming and consolidating them into new classes:
  – Rename MinimalistTaskModal to TaskModal
  – Rename MinimalistTaskCreationModal → TaskCreationModal
  – Rename MinimalistTaskEditModal → TaskEditModal
• Update all references and imports across the project (including AdvancedCalendarView) to use the new TaskModal, TaskCreationModal, and TaskEditModal classes instead of the old minimalist versions.
• Extract and expose a new TaskConversionOptions type (in src/types/taskConversion.ts) to provide a consistent interface for passing conversion-related options.
• Adjust the modal logic:
  – In TaskCreationModal, update natural language parsing, pre-populated values, and form handling using the new base TaskModal APIs.
  – In TaskEditModal, change the constructor signature to accept an options object (including “task” and an optional “onTaskUpdated” callback) and update recurrence handling to convert legacy recurrence objects into display strings.
• Update CSS:
  – Rename styles/minimalist-modal.css to styles/task-modal.css and update class comments (e.g. “MINIMALIST TASK MODAL” → “TASK MODAL – Google Keep/Todoist Inspired”).
  – Modify selectors in modal-bem.css by removing references to “.task-creation-modal” and “.task-edit-modal” in some cases, as these are now included under the unified “tasknotes-plugin” context.
• Remove the tests for BaseTaskModal (tests/unit/modals/BaseTaskModal.test.ts) since that base class is no longer used, and update test references for the new TaskCreationModal class.
• Overall, this commit streamlines the modal codebase and unifies the naming and styling of task-related modals while updating the type definitions and downstream usage in views and tests.

These changes are backward‐compatible with previous plugin settings (aside from renamed classes/interfaces) but may require updates in any custom integrations relying on the old MinimalistTask* modals.
2025-06-27 21:45:08 +10:00
Callum Alpass
6501185b3b Implement enhanced date picker modal and update task modals with refined UI and functionality
• Added a new CSS file (styles/date-picker.css) that provides comprehensive styling for the date picker modal including header, inputs, buttons, and responsive/focus states.
• Modified build-css.mjs to include the new date-picker.css file.
• Refactored DateContextMenu to:
  - Introduce a modular layout by splitting modal creation into smaller methods (createModal, createHeader, createDateSection, createTimeSection, createInputLabel, createInputContainer, createDateInput, createTimeInput, createButtonSection, etc.).
  - Add a calendar icon and enhanced visual cues in the modal header.
  - Implement click handlers that automatically show native pickers via a custom addPickerClickHandler.
  - Set up event handlers for the select, cancel, Enter, ESC and clicking outside the modal to improve UX.
• Updated MinimalistTaskCreationModal and MinimalistTaskEditModal to use "Create task" and "Edit task" (changed title casing) for consistency.
• Enhanced MinimalistTaskEditModal by:
  - Removing legacy extraction of task details.
  - Adding a details section that includes a title input (with live update) and additional fields.
  - Introducing action buttons with an “Open note” button that opens the associated note in a new leaf while ensuring proper error handling.
• Modified MinimalistTaskModal to extract and combine date/time parts (using getDatePart, getTimePart, and combineDateAndTime) when updating due and scheduled dates based on picker input.

These changes improve the modularity, usability, and visual consistency of date/time selection and task editing features across the plugin.
2025-06-27 07:29:14 +10:00
Callum Alpass
86e9a95d29 feat: Implement minimalist task modals and update context menus and UI styling
• Rework task modals to follow a minimalist design (inspired by Google
Keep/Todoist) by introducing new modal classes:
  – Added MinimalistTaskModal.ts as the base class for minimalist task
modals.
  – Added MinimalistTaskCreationModal.ts for creating tasks using the
new UI.
  – Added MinimalistTaskEditModal.ts for editing tasks following the
minimalist style.

• Update main application flow to use the new minimal modals:
  – Switched TaskCreationModal and TaskEditModal usage to
MinimalistTaskCreationModal and MinimalistTaskEditModal in main.ts and
AdvancedCalendarView.ts.
  – Updated task conversion logic to prepopulate values and convert
conversion options for the minimalist creation modal.

• Enhance context menus for task attributes:
  – Extended DateContextMenu with a custom date–time picker, providing
quick date selections (Today, Tomorrow, Weekend, etc.) and a “Pick date
& time…” option.
  – Added PriorityContextMenu to sort and display task priorities with
color styling.
  – Added RecurrenceContextMenu with built-in recurrence options and a
custom recurrence modal for more granular control.
  – Added StatusContextMenu that displays custom statuses (with color
updates) from plugin settings.

• Refactor CSS:
  – Added a new stylesheet (styles/minimalist-modal.css) implementing
the minimalist modal design. The CSS covers title inputs, an action bar
with icon controls, collapsible details, autocomplete fields, NLP
inputs, modal expansion animations, responsive design, as well as dark
mode adjustments.
  – Updated build-css.mjs to include the new minimalist-modal.css.

• Minor refactors and fixes:
  – Improved date parsing in MinimalNativeCache by switching from
splitting ISO strings to using a helper (getDatePart and parseDate).
(#82)
  – Updated NotesView to format dates using a new date formatting
helper.
  – Numerous UI and event handling improvements for better user
interaction and smoother animations.

This commit lays the groundwork for a more modern, streamlined, and
visually consistent task management user experience while ensuring
backward compatibility through new modal options and enhanced context
menus.
2025-06-27 07:29:14 +10:00
Callum Alpass
7cb18a46e7 Integrate chrono-node for enhanced date parsing and update CSS assets
• Updated build-css.mjs:
  - Added a new CSS file entry ("styles/task-action-palette-modal.css") for the TaskActionPaletteModal component.
  - Removed legacy CSS support by eliminating the "styles/components.css" entry along with its corresponding comments in both the CSS_FILES array and the main CSS template comment header.

• Updated NaturalLanguageParser.ts:
  - Imported the chrono-node library to leverage its natural language date parsing capabilities.
  - Replaced the previous date/time extraction call with a call to a new method, extractDatesAndTimesWithChrono, ensuring a more robust parsing of due dates and times.
  - Added extractDatesAndTimesWithChrono, which uses chrono-node to:
      • Parse natural language dates from the task text.
      • Set the dueDate (formatted as 'yyyy-MM-dd') and, if applicable, the dueTime (formatted as 'HH:mm') when the hour is detected.
      • Remove the matching date text from the input string.
      • Fallback to the legacy extractDatesAndTimes method if chrono-node parsing fails.
  - Updated comments in legacy extraction methods (for priority, status, recurrence, and time estimate) to note their status as legacy methods.

This commit improves the accuracy and reliability of due date/time parsing from user input, while also streamlining the CSS asset management by removing outdated legacy references.
2025-06-22 14:07:27 +10:00
Callum Alpass
32e6763a45 release 3.3.0 2025-06-15 15:37:13 +10:00
Callum Alpass
1f1f4370b0 Add Advanced & Mini Calendar Views, Unscheduled Tasks Modal, and CSS/styling updates
• Renamed and restructured calendar views:
  - Renamed the existing CalendarView to MiniCalendarView for better clarity.
  - Updated all references from CALENDAR_VIEW_TYPE to MINI_CALENDAR_VIEW_TYPE and renamed CSS classes accordingly.
  - Added a new AdvancedCalendarView incorporating FullCalendar plugins (dayGrid, timeGrid, interaction) that provides advanced event interactions (drag/drop, resizing, toggling time entries) with its unique CSS styling.

• Introduced new view support and commands in main.ts:
  - Updated imported view types in main.ts to include both MINI_CALENDAR_VIEW_TYPE and ADVANCED_CALENDAR_VIEW_TYPE.
  - Registered a new command “open-advanced-calendar-view” alongside the existing mini calendar activation.
  - Adapted activateCalendarView and getCalendarLeaf to reference the mini calendar view.

• Added UnscheduledTasksSelectorModal:
  - Created a new modal (src/modals/UnscheduledTasksSelectorModal.ts) that leverages obsidian’s FuzzySuggestModal to search unscheduled tasks.
  - The modal provides detailed task metadata, including priority, due date (with overdue/today indicators), and time estimates.
  - Implemented a highlight function for matching search terms and proper ARIA attributes for accessibility.
  - Added corresponding CSS (styles/unscheduled-tasks-selector-modal.css) for modal appearance and interactions.

• Updated package lock and project metadata:
  - Bumped project version from 0.1.0 (“chronosync”) to 2.2.4 (“tasknotes”).
  - Added new dependencies for @fullcalendar/core, @fullcalendar/daygrid, @fullcalendar/interaction, @fullcalendar/timegrid, along with preact for FullCalendar.

• Modifications and cleanup in CSS/styling:
  - Introduced new styles for AdvancedCalendarView in styles/advanced-calendar-view.css.
  - Made minor adjustments in agenda-view.css, filter-bar-bem.css, settings-view.css, and task-card-bem.css to remove redundant checkbox styles and update BEM class names for consistency.
  - Updated components.css to remove legacy checkbox styling.

• Overall improvements and integration:
  - Ensured proper integration with cacheManager and taskService for loading tasks and updating scheduling properties.
  - Added event listeners to refresh calendar events on data and task changes.
  - Improved accessibility features by updating instructional texts, aria attributes, and modal titles.

This commit provides enhanced calendar functionality with two separate views (mini and advanced), a refined unscheduled task selection experience, updated project metadata, and improved UI styling across multiple components.
2025-06-13 00:00:14 +10:00
Callum Alpass
0f117e5dc3 update build 2025-06-10 21:16:39 +10:00
Callum Alpass
5830d9343f Refactor PomodoroView CSS class names for consistent BEM naming and add TaskSelectorModal styles
• Update build-css.mjs to include the new "styles/task-selector-modal.css" file.
• In PomodoroView.ts, replace legacy CSS class names with updated BEM-style names:
  – Remove redundant or legacy classes (e.g., "pomodoro-no-task", "is-hidden", "is-loading") in favor of new BEM modifiers.
  – Replace component element classes (e.g., progress circle, timer display, task selector, control sections, etc.) with their BEM counterparts.
  – Streamline class usage in both element creations and event updates to ensure consistency in naming.
• Create a new styles/task-selector-modal.css file that implements a full BEM structure for the TaskSelectorModal component:
  – Define base styles for suggestions, title, metadata, due date, context tags, and status badges.
  – Include responsive adjustments, focus states for accessibility, and integration tweaks for dark themes and Obsidian modal containers.

These changes improve the modularity, readability, and maintainability of the CSS, ensuring that all UI components adhere to the same naming conventions and design system.
2025-06-09 13:52:10 +10:00
Callum Alpass
5972ba16fd Complete build system cleanup by removing legacy CSS files
- Remove legacy files: pomodoro.css, settings.css, tasks-legacy.css
- Optimize build system to use only BEM and core files
- Update documentation to reflect clean structure
- Achieve 9.1% bundle size reduction (27,884 bytes saved)
- Reduce CSS from 11,644 lines to 10,501 lines (1,143 lines saved)
- Maintain full functionality with clean, efficient CSS generation

Files removed:
- styles/pomodoro.css (697 lines) - replaced by pomodoro-view.css + pomodoro-stats-view.css
- styles/settings.css (446 lines) - replaced by settings-view.css
- styles/tasks-legacy.css (101 lines) - deprecated utilities and animations

Build system now uses optimal file order:
1. Core System (variables, utilities, base)
2. BEM Components (task-card-bem, note-card-bem, filter-bar-bem, modal-bem)
3. BEM Views (all view-specific CSS files)
4. Legacy Support (minimal components.css for compatibility)

Bundle size: 305,483 bytes → 277,599 bytes (-27,884 bytes)
CSS lines: 11,644 → 10,501 (-1,143 lines)
2025-06-09 12:54:58 +10:00
Callum Alpass
c464c68665 Complete BEM refactoring for remaining views (PomodoroView, PomodoroStatsView, Settings)
- Add pomodoro-view.css with comprehensive BEM structure for timer components
- Add pomodoro-stats-view.css with BEM structure for statistics and session history
- Add settings-view.css with BEM structure for form elements and configuration UI
- Update PomodoroView.ts to use dual class system (BEM + legacy) for compatibility
- Update PomodoroStatsView.ts with BEM class names while maintaining functionality
- Update settings.ts with BEM class names for form inputs, tables, and navigation
- Update build-css.mjs to include new BEM view files in proper order
- Maintain consistent --tn- variable usage and .tasknotes-plugin scoping
- Preserve all existing functionality with improved CSS organization
2025-06-09 12:32:14 +10:00
Callum Alpass
a77fe95e97 Refactor and add complete BEM‐based, scoped CSS for TaskNotes
• Introduce a new set of CSS files (filter-bar-bem.css, agenda-view.css, calendar-view.css, kanban-view.css, modal-bem.css, note-card-bem.css, notes-view.css, task-card-bem.css, task-list-view.css, utilities.css) that implement a modern BEM naming convention and are entirely scoped under .tasknotes-plugin. This ensures styles no longer conflict with Obsidian’s or other plugins’ styles.

• Update index.css to list and order the new files properly, noting that “components.css” remains while legacy files (such as filters.css, calendar.css, tasks.css, and kanban.css) are either deprecated or now referenced via legacy files (e.g. tasks-legacy.css).

• Refactor variables.css to add plugin‐specific variables (using --tn- prefix) for spacing, typography, borders, shadows, transitions, z‐indices, and more. This integration uses Obsidian’s theme variables as fallbacks so that TaskNotes derives its colors and sizes directly from the host environment.

• Separate and modularize layout and component styling:
  – New “task-card-bem.css” and “note-card-bem.css” provide updated implementations for TaskCard and NoteCard components with proper BEM elements and modifiers (e.g. modifiers for completed, archived, recurring, and priority states).
  – “filter-bar-bem.css” redefines the filter bar styling (including advanced filtering panels) with scoped, clear element classes.
  – “modal-bem.css” refactors modal dialogs (for task creation, editing, due date, etc.) into BEM components that include form groups, input styling, character counters, autocomplete suggestions, and well-defined button styles.
  – “agenda-view.css”, “calendar-view.css”, “kanban-view.css”, “notes-view.css”, and “task-list-view.css” implement view-specific styles for each view with a modern layout, responsive behavior, and improved interaction states.

• Maintain legacy styles for backwards compatibility:
  – “tasks-legacy.css” continues to support old task styles while new BEM styles are preferred.
  – In “tasks.css”, legacy styles have been replaced or redirected to the new structure (and an import is added for backwards–compatible CSS).
  – Similarly, “kanban.css” now contains only legacy styles (with a note indicating deprecation) since the new BEM structure is in “kanban-view.css”.

• Add a comprehensive utilities.css file that documents and implements a full suite of scoped utility classes:
  – Layout (flex, grid, positioning)
  – Spacing (margins, padding, gap)
  – Typography (text alignment, font sizes, line heights, text transform)
  – Display (block, inline, table, etc.)
  – Background, borders, shadows, opacity, transitions, transforms, cursors, and state modifiers
  – Responsive variants for small (sm), medium (md), and large (lg) breakpoints
  – Reduced motion and high-contrast support via media queries

• Update index.css to clearly document the new file ordering and describe the purpose of each new file compared to legacy components.

Overall, this commit overhauls the styling system by:

  – Unifying the design under a scoped .tasknotes-plugin namespace
  – Implementing a modern, modular BEM structure across components and views
  – Ensuring consistency through CSS custom properties (using the --tn- prefix)
  – Preparing for gradual deprecation of legacy CSS styles, while maintaining backward compatibility

These changes lay a strong foundation for consistent and maintainable UI improvements in the TaskNotes plugin.
2025-06-09 12:20:19 +10:00
Callum Alpass
be1ce55988 Add settings.css for TaskNotes settings page and update build-css.mjs
This commit introduces two main changes:

1. Updated build-css.mjs:
   • Added "styles/settings.css" to the CSS_FILES array.
   • Updated the build file template documentation to mention the new settings.css file.
   • This ensures that the settings stylesheet is included in the main build output during the CSS build process.

2. Added styles/settings.css:
   • Contains comprehensive CSS styles specifically for the TaskNotes plugin settings page.
   • Defines styling for components such as the settings tab navigation, tab buttons (including active and hover states), and tab content areas.
   • Provides detailed styles for warning and help sections, ensuring consistency in display and usability.
   • Implements a field-mapping table with responsive layout and hover effects for better interactivity.
   • Includes dedicated styles for status/priority lists, color indicators, and input fields within item rows.
   • Overrides Obsidian setting components for better integration and visual alignment.
   • Addresses responsive design concerns for various screen sizes with media queries.
   • Incorporates dark mode adjustments, accessibility enhancements (e.g., focus indicators, reduced-motion preferences), and high contrast mode support.
   • Overall, these styles aim to improve the user experience by providing a clear, accessible, and visually consistent interface for configuring TaskNotes settings.

These changes enhance the plugin’s UI by ensuring that settings-related elements are styled consistently and integrated into the build process.
2025-06-09 10:59:17 +10:00
Callum Alpass
281901642e feat: Add Tasks Plugin task conversion and enhanced task creation modal
Commit Details:
• Updated build-css.mjs to include new CSS files (agenda, modals, pomodoro) and updated the CSS documentation header to describe these new styles.
• Modified src/main.ts:
  – Extended the Obsidan module imports to include Editor and MarkdownView.
  – Imported TaskConversionOptions from TaskCreationModal.
  – Added a new command “convert-to-tasknote” that invokes a conversion method (convertTasksPluginToTaskNote) when triggered in the editor. This method:
    ▪ Retrieves the current line from the editor.
    ▪ Uses the new TasksPluginParser to attempt parsing the line as a Tasks plugin task.
    ▪ Validates the parsed data and, if successful, opens the TaskCreationModal pre-populated with the parsed details.
• Enhanced TaskCreationModal (src/modals/TaskCreationModal.ts):
  – The constructor now accepts an optional TaskConversionOptions parameter. When provided, the modal is pre-populated with fields (title, due date, details, recurrence, etc.) based on the parsed data.
  – Added a helper method (populateFromParsedData) to map and set values from the Tasks plugin parsed data into the modal’s fields.
  – Introduced a new due date input method (createDueDateInputWithRef) that stores a reference for later updates.
  – Added a “Save and insert to current note” button, which, after validating and creating the task, inserts a markdown link to the task file in the current note.
  – Refactored task creation logic to separate validation (validateAndPrepareTask) and file creation (performTaskCreation), ensuring more structured error handling and code reuse.
• Introduced a new utility module, src/utils/TasksPluginParser.ts:
  – Implements the TasksPluginParser class that parses a task line written in the Tasks plugin format.
  – Extracts metadata such as due dates, scheduled/start/created/done dates, priorities via emoji patterns, and recurrence information.
  – Provides helper methods to clean the task title and to validate if a line follows the expected Tasks plugin format.
  – Outputs a ParsedTaskData object to facilitate conversion of legacy task formatting to the new TaskNotes system.
• Overall, these changes add robust support for converting tasks defined in the Tasks plugin format into TaskNotes tasks, enhancing user workflows by pre-populating and linking tasks in existing notes.

This commit thus improves the plugin’s capabilities by allowing users to seamlessly convert legacy task formats and providing a richer task creation experience with inline link insertion and detailed field extraction.
2025-06-08 17:58:24 +10:00
Callum Alpass
63525f5dd6 Add modular CSS build system with comprehensive source files and documentation
• Introduce a new “styles” directory that breaks out the plugin’s CSS into several modular source files:
 – variables.css: Defines all CSS custom properties (spacing, colors, typography, transitions) to serve as design system tokens.
 – base.css: Contains foundational styles, animations (e.g. task-flash, task-pulse, fade-in) and core card styles following BEM methodology. Also includes accessibility and performance optimizations.
 – components.css: Provides reusable UI component styles and utility classes (e.g. is-hidden, is-loading, buttons, modals, tab system, task selectors) used across multiple views.
 – calendar.css: Implements calendar layout and view styling including navigation (month/week views), day formatting, indicators (notes, tasks, daily notes), hover effects and colorized modes.
 – tasks.css: Contains styles for task-list views including card layouts, task metadata, priority/ status badges, time tracking, recurring tasks, and interactivity on hover/active states.
 – kanban.css: Provides styling for Kanban board views, including board header, column layout, drag/drop feedback, checkboxes, board actions, filters and responsive adjustments.
 – filters.css: Implements a unified filtering system across views with a filter bar layout, search and sort controls, advanced filtering panels, multi-select dropdowns, chip badges and date range pickers.
 – index.css: A documentation index that outlines the intended build order and purpose of each modular CSS file.

• Add styles/README.md documenting the CSS build system, file structure, dependency order (variables → base → components → calendar → tasks → kanban → filters), and development workflow (make changes in source files, run “npm run build-css”, and test).

• This commit lays a solid foundation for maintainable, consistent styling across the TaskNotes plugin. The CSS build process concatenates these files in the proper order to generate the final (but untracked) styles.css for distribution, while supporting CI/CD integration and responsive design.

• (Optional) The build scripts in package.json have been updated to invoke “build-css” as part of “npm run dev” and “npm run build”, ensuring the latest CSS is built before launching the app.

Overall, this commit modularizes and documents the plugin’s styling strategy, improving maintainability and clarity for future development.
2025-06-08 15:59:40 +10:00