mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
## 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.
116 lines
No EOL
5.3 KiB
JavaScript
116 lines
No EOL
5.3 KiB
JavaScript
import { readFileSync, writeFileSync } from 'fs';
|
|
import { join } from 'path';
|
|
|
|
const CSS_FILES = [
|
|
// Core System Files
|
|
'styles/variables.css', // CSS custom properties and design system variables
|
|
'styles/utilities.css', // Scoped utility classes for layout, spacing, typography
|
|
'styles/base.css', // Basic styles, animations, card components, and layout
|
|
|
|
// BEM Component Files
|
|
'styles/task-card-bem.css', // TaskCard component with proper BEM scoping
|
|
'styles/task-inline-widget.css', // Inline task widget for editor with proper BEM scoping
|
|
'styles/note-card-bem.css', // NoteCard component with proper BEM scoping
|
|
'styles/filter-bar-bem.css', // FilterBar component with proper BEM scoping
|
|
'styles/modal-bem.css', // Modal components with proper BEM scoping
|
|
'styles/task-modal.css', // Task modal components (Google Keep/Todoist style)
|
|
'styles/reminder-modal.css', // Reminder modal component with proper BEM scoping
|
|
'styles/date-picker.css', // Enhanced date/time picker styling
|
|
'styles/task-selector-modal.css', // TaskSelectorModal component with proper BEM scoping
|
|
'styles/unscheduled-tasks-selector-modal.css', // UnscheduledTasksSelectorModal component with proper BEM scoping
|
|
'styles/task-action-palette-modal.css', // TaskActionPaletteModal component with proper BEM scoping
|
|
'styles/project-note-subtasks.css', // ProjectNoteSubtasks component with proper BEM scoping
|
|
|
|
// BEM View Files
|
|
'styles/task-list-view.css', // TaskListView component with proper BEM scoping
|
|
'styles/calendar-view.css', // CalendarView component with proper BEM scoping
|
|
'styles/advanced-calendar-view.css', // AdvancedCalendarView component with proper BEM scoping
|
|
'styles/kanban-view.css', // KanbanView component with proper BEM scoping
|
|
'styles/agenda-view.css', // AgendaView component with proper BEM scoping
|
|
'styles/notes-view.css', // NotesView component with proper BEM scoping
|
|
'styles/pomodoro-view.css', // PomodoroView component with proper BEM scoping
|
|
'styles/pomodoro-stats-view.css', // PomodoroStatsView component with proper BEM scoping
|
|
'styles/settings-view.css', // SettingsView component with proper BEM scoping
|
|
'styles/status-bar.css' // StatusBar component with proper BEM scoping
|
|
];
|
|
|
|
const MAIN_CSS_TEMPLATE = `/* TaskNotes Plugin Styles */
|
|
|
|
/*
|
|
This file is automatically generated by the build process.
|
|
To modify styles, edit the source files in the styles/ directory.
|
|
|
|
Source files:
|
|
|
|
Core System:
|
|
- styles/variables.css: CSS custom properties and design system variables
|
|
- styles/utilities.css: Scoped utility classes for layout, spacing, typography, and states
|
|
- styles/base.css: Basic styles, animations, card components, and layout
|
|
|
|
BEM Component Files:
|
|
- styles/task-card-bem.css: TaskCard component with proper BEM scoping
|
|
- styles/task-inline-widget.css: Inline task widget for editor with proper BEM scoping
|
|
- styles/note-card-bem.css: NoteCard component with proper BEM scoping
|
|
- styles/filter-bar-bem.css: FilterBar component with proper BEM scoping
|
|
- styles/modal-bem.css: Modal components with proper BEM scoping
|
|
|
|
BEM View Files:
|
|
- styles/task-list-view.css: TaskListView component with proper BEM scoping
|
|
- styles/calendar-view.css: CalendarView component with proper BEM scoping
|
|
- styles/kanban-view.css: KanbanView component with proper BEM scoping
|
|
- styles/agenda-view.css: AgendaView component with proper BEM scoping
|
|
- styles/notes-view.css: NotesView component with proper BEM scoping
|
|
- styles/pomodoro-view.css: PomodoroView component with proper BEM scoping
|
|
- styles/pomodoro-stats-view.css: PomodoroStatsView component with proper BEM scoping
|
|
- styles/settings-view.css: SettingsView component with proper BEM scoping
|
|
|
|
Run 'npm run build-css' to regenerate this file.
|
|
*/
|
|
|
|
`;
|
|
|
|
const REMAINING_STYLES = ``;
|
|
|
|
function buildCSS() {
|
|
console.log('Building CSS...');
|
|
|
|
let combinedCSS = MAIN_CSS_TEMPLATE;
|
|
|
|
// Read and concatenate each CSS file
|
|
for (const cssFile of CSS_FILES) {
|
|
try {
|
|
const content = readFileSync(cssFile, 'utf8');
|
|
|
|
// Add a section header comment
|
|
const filename = cssFile.split('/').pop();
|
|
combinedCSS += `\n/* ===== ${filename.toUpperCase()} ===== */\n`;
|
|
combinedCSS += content;
|
|
combinedCSS += '\n';
|
|
|
|
console.log(`[OK] Included ${cssFile}`);
|
|
} catch (error) {
|
|
console.error(`[ERROR] Error reading ${cssFile}:`, error.message);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
// Add the remaining modal styles
|
|
combinedCSS += REMAINING_STYLES;
|
|
|
|
// Write the combined CSS to styles.css
|
|
try {
|
|
writeFileSync('styles.css', combinedCSS);
|
|
console.log('[OK] Built styles.css successfully');
|
|
|
|
// Count lines for reference
|
|
const lineCount = combinedCSS.split('\n').length;
|
|
console.log(`[OK] Generated ${lineCount} lines of CSS`);
|
|
|
|
} catch (error) {
|
|
console.error('[ERROR] Error writing styles.css:', error.message);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
// Run the build
|
|
buildCSS(); |