- 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]
• 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.
• 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.