callumalpass_tasknotes/build-css.mjs

125 lines
6 KiB
JavaScript
Raw Permalink Normal View History

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 05:59:40 +00:00
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
2025-06-10 11:11:46 +00:00
'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/filter-heading.css', // FilterHeading component with proper BEM scoping
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 06:32:39 +00:00
'styles/search-box.css', // SearchBox component with proper BEM scoping
'styles/modal-bem.css', // Modal components with proper BEM scoping
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 11:45:08 +00:00
'styles/task-modal.css', // Task modal components (Google Keep/Todoist style)
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 03:01:04 +00:00
'styles/reminder-modal.css', // Reminder modal component with proper BEM scoping
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-26 14:17:46 +00:00
'styles/date-picker.css', // Enhanced date/time picker styling
'styles/task-selector-with-create-modal.css', // TaskSelectorWithCreateModal component with proper BEM scoping
'styles/file-selector-modal.css', // FileSelectorModal component with proper BEM scoping
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-12 14:00:14 +00:00
'styles/unscheduled-tasks-selector-modal.css', // UnscheduledTasksSelectorModal component with proper BEM scoping
'styles/task-action-palette-modal.css', // TaskActionPaletteModal component with proper BEM scoping
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 10:46:23 +00:00
'styles/time-entry-editor-modal.css', // TimeEntryEditorModal component with proper BEM scoping
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 07:23:59 +00:00
'styles/relationships.css', // RelationshipsWidget component with proper BEM scoping
'styles/task-card-note-widget.css', // TaskCardNoteWidget 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
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-12 14:00:14 +00:00
'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/pomodoro-view.css', // PomodoroView component with proper BEM scoping
'styles/pomodoro-stats-view.css', // PomodoroStatsView component with proper BEM scoping
'styles/stats-view.css', // StatsView component with proper BEM scoping
'styles/release-notes-view.css', // Release notes view typography
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 11:26:04 +00:00
'styles/settings-view.css', // SettingsView component with proper BEM scoping
'styles/webhook-settings.css', // Webhook settings UI with proper BEM scoping
'styles/status-bar.css', // StatusBar component with proper BEM scoping
2026-05-12 22:17:35 +00:00
'styles/bases-views.css', // Bases integration views (list and kanban)
'styles/static-style-utilities.css' // Static style utility classes migrated from inline styles
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 05:59:40 +00:00
];
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:
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 05:59:40 +00:00
- styles/variables.css: CSS custom properties and design system variables
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 02:20:19 +00:00
- styles/utilities.css: Scoped utility classes for layout, spacing, typography, and states
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 05:59:40 +00:00
- styles/base.css: Basic styles, animations, card components, and layout
BEM Component Files:
- styles/task-card-bem.css: TaskCard component with proper BEM scoping
2025-06-10 11:11:46 +00:00
- 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/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
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 05:59:40 +00:00
Run 'npm run build-css' to regenerate this file.
*/
`;
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 11:45:08 +00:00
const REMAINING_STYLES = ``;
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 05:59:40 +00:00
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';
2025-06-15 05:37:13 +00:00
console.log(`[OK] Included ${cssFile}`);
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 05:59:40 +00:00
} catch (error) {
2025-06-15 05:37:13 +00:00
console.error(`[ERROR] Error reading ${cssFile}:`, error.message);
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 05:59:40 +00:00
process.exit(1);
}
}
// Add the remaining modal styles
combinedCSS += REMAINING_STYLES;
// Write the combined CSS to styles.css
try {
writeFileSync('styles.css', combinedCSS);
2025-06-15 05:37:13 +00:00
console.log('[OK] Built styles.css successfully');
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 05:59:40 +00:00
// Count lines for reference
const lineCount = combinedCSS.split('\n').length;
2025-06-15 05:37:13 +00:00
console.log(`[OK] Generated ${lineCount} lines of CSS`);
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 05:59:40 +00:00
} catch (error) {
2025-06-15 05:37:13 +00:00
console.error('[ERROR] Error writing styles.css:', error.message);
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 05:59:40 +00:00
process.exit(1);
}
}
// Run the build
2026-05-12 22:17:35 +00:00
buildCSS();