Commit graph

1890 commits

Author SHA1 Message Date
Renato Mendonca
db27df4fe4 doc: Add animated video demonstrating search box config and use
new file:   docs/assets/Base View Search Box.gif
2025-11-22 22:54:36 +13:00
Renato Mendonca
bbda71bdc2 feat: add inline search to calendar and agenda views
- Add enableSearch config option with UI toggle in Layout section
- Apply search filter before generating calendar events
- Reuse BasesViewBase search infrastructure
- Position search box above calendar
- Filter TaskNotes items across all calendar modes
2025-11-22 22:45:38 +13:00
Renato Mendonca
4a522a8c3d feat: add inline search to kanban view
Implements the same search functionality as TaskListView, with an
"Enable search box" toggle in the view configuration UI. Tasks are
filtered in real-time across all columns using the shared search
infrastructure from BasesViewBase.
2025-11-22 22:34:46 +13:00
Renato Mendonca
465040dfe8 feat: add inline search to task list view
- Add enableSearch config option to enable/disable search
2025-11-22 22:23:13 +13: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
c6741dc3b6 release 4.0.4 2025-11-20 23:38:28 +11:00
callumalpass
ef8d9eb750 Add CMD/Ctrl+Enter keyboard shortcuts to modals
Added keyboard event handlers to all modals to enable quick save/submit with CMD/Ctrl+Enter. Each modal now properly registers and cleans up its keyboard handler on open/close. Also added kanban card container styles for scrolling and drag cursor states, and removed deprecated tsconfig ignoreDeprecations flag.
2025-11-20 23:37:38 +11:00
callumalpass
b8c3747e72 Silence TS7 moduleResolution deprecation 2025-11-20 22:54:13 +11:00
callumalpass
19075a644a Update moduleResolution for TS 7 compatibility 2025-11-20 22:51:33 +11:00
callumalpass
3da4844b03 Fix CalendarView initial date normalization typing 2025-11-20 22:49:43 +11:00
callumalpass
0cf3af50c4 Fix Bases recurring completion target date 2025-11-20 22:46:26 +11:00
callumalpass
7a3b97b907 Fix Bases calendar UTC anchor handling 2025-11-20 22:38:46 +11:00
callumalpass
f8a3cf3f95 Docs: Update unreleased.md with styling refactor changes 2025-11-20 22:28:03 +11:00
callumalpass
bc0ba4fba5 Style: Ensure active settings tab uses interactive accent color
- Added .is-active selector for Obsidian compatibility
- Use var(--interactive-accent) directly
- Add !important to override Obsidian's native tab styles
- Ensures active tab is clearly visible with theme accent color
2025-11-20 22:25:29 +11:00
callumalpass
3681903c09 Refactor: Consolidate color patterns and improve consistency
- Replace duplicate color-mix patterns with var(--tn-interactive-hover)
- Normalize rgba() spacing for consistency
- Investigated !important usage: most are necessary for FullCalendar overrides

No line reduction, but improved maintainability and consistency.
2025-11-20 22:22:27 +11:00
callumalpass
94628e7857 Refactor: Remove remaining 'Use consistent button system' comments
Clean up obsolete comments across all remaining CSS files.

Reduces CSS from 18,239 to 18,233 lines (6 lines).
2025-11-20 21:36:48 +11:00
callumalpass
4350092c15 Refactor: Clean up pomodoro-view.css comments 2025-11-20 21:07:53 +11:00
callumalpass
bc03f77b45 Refactor: Clean up CSS comment artifacts
Remove obsolete 'Use consistent button system' and 'Remove individual
styles' comments from various CSS files. These were artifacts from
previous refactoring efforts.

Reduces CSS from 18,252 to 18,238 lines (14 lines).
2025-11-20 21:07:37 +11:00
callumalpass
830b659a6b Refactor: Remove deprecated legacy classes
Remove unused deprecated classes from task-card-bem.css:
- .tasknotes-card
- .task-content
- .task-title
- .task-metadata-line
- .status-dot
- .recurring-indicator

These classes are no longer used in the codebase and were marked
for removal. Reduces CSS from 18,326 to 18,252 lines (74 lines).
2025-11-20 21:06:34 +11:00
callumalpass
669da8e0b2 Refactor: Further simplify CSS styling
- Remove unused action-button and content-type-buttons style blocks
- Remove unnecessary will-change properties (performance optimization)
- Simplify box-shadow: 0 0 0 0 transparent to box-shadow: none
- Remove empty style blocks with placeholder comments

Reduces CSS from 18,370 to 18,326 lines.
2025-11-20 21:01:37 +11:00
callumalpass
0f9ce902fd Refactor: Pare back unnecessary custom styling
Based on feedback from kepano to reduce custom styling and use
Obsidian's native styles where possible:

- Replace all `cursor: pointer` with `cursor: var(--cursor)` across
  all CSS files (100+ instances). Following Obsidian's convention where
  `cursor: pointer` is only for links.

- Remove forced `border: none; box-shadow: none` rules that were
  fighting against Obsidian's native button styling.

- Scope custom `.tn-btn` button system to `.mod-settings` only,
  allowing Obsidian's native button styles to work elsewhere.

- Add `background: transparent` to mini-calendar buttons to match
  Obsidian's native `.text-icon-button` styling.

This makes the plugin more cohesive with Obsidian's UI and reduces
unnecessary style overrides.
2025-11-20 20:59:30 +11:00
callumalpass
7bee383af2 release 4.0.3 2025-11-20 08:16:00 +11:00
callumalpass
e26c7bd7cb Fix: Task embeds appearing on new line instead of inline with bullets (#1157)
Task embeds (inline task link widgets) were wrapping to a new line instead
of appearing inline with bullet points in lists, particularly when the task
card was wider than the editor screen.

Changes:
- Changed inline task cards to use <span> elements instead of <div> for
  proper inline flow in CodeMirror's rendering context
- Added max-width: calc(100% - 40px) to prevent wrapping to new line
- Added explicit inline display styles to wrapper and child containers
- Strengthened CSS with !important and vertical-align: baseline

The fix ensures task embeds display correctly inline with bullets during
live preview/editing mode, even when they contain multiple metadata properties.

Fixes #1157
2025-11-20 08:09:07 +11:00
callumalpass
94ddeee5dc Refactor task modal buttons to use native Obsidian styles
Replace custom button styling with Obsidian's native modal button system:
- Use modal-button-container class instead of custom button-container
- Apply mod-cta for primary Save button (native accent styling)
- Apply mod-warning for Archive button (native warning styling)
- Remove custom save-button, cancel-button, button-spacer classes
- Fix button layout: left-align Open note/Archive, right-align Save/Cancel
- Add mod-tasknotes class to modalEl for scoped styling

This provides better consistency with Obsidian's UI and fixes the Archive
button positioning issue where it was appearing in the middle of the modal
instead of aligned with the Open note button.
2025-11-20 07:20:50 +11:00
callumalpass
066d7b5693 Fix mini calendar keyboard navigation after focus-stealing fix
The previous fix to prevent focus stealing only auto-focused on initial
render, but keyboard navigation broke because the grid element loses focus
when re-rendered. Implement smart focus preservation:

- Initial render: auto-focus to enable keyboard navigation
- User navigation: restore focus after interactions (arrows, buttons, etc.)
- Data updates: only restore focus if grid already had it

This ensures keyboard navigation works consistently while still preventing
unwanted focus stealing when the calendar is pinned to the sidebar.
2025-11-20 07:18:37 +11:00
callumalpass
8b767a4058 Fix mini calendar stealing focus when pinned to sidebar (#1168)
The mini calendar was calling grid.focus() on every render, which occurred
whenever Bases detected data changes in the vault. This caused Obsidian to
lose focus every few seconds when the calendar was pinned.

Changes:
- Added isInitialRender flag to track first render
- Only auto-focus grid on initial render, not on data updates
- Keyboard navigation remains fully functional through click interactions
  and tab focus

Fixes #1168
2025-11-20 07:05:19 +11:00
callumalpass
2b7829a342 Fix YAML parsing error in tasks-default.base template
The "Not Blocked" filter was generating invalid YAML when using double
quotes around an expression containing nested double quotes. Changed to
use single quotes which don't require escaping the inner double quotes.

Fixes #1161, #1162
2025-11-20 06:27:26 +11:00
callumalpass
310ec55868 release 4.0.2 2025-11-19 21:50:00 +11:00
callumalpass
afb2e35b05 Remove custom TaskNotes icon from task modals
Removes the custom TaskNotes icon from task creation and edit modals for a cleaner, more consistent UI with Obsidian's design language.
2025-11-19 21:46:25 +11:00
callumalpass
fe92698b03 Fix: Resolve base template generation issues (#1145, #1156)
- Fix Kanban template missing groupBy property
  * Default Kanban now includes groupBy on status field
  * Resolves error requiring manual group configuration
  * Thanks to @randomness42 and @seepage87 for reporting

- Fix user-defined fields appearing as user:field_xxx in templates
  * Custom fields now use actual property names from settings
  * Also fixed totalTrackedTime to map to timeEntries property
  * Ensures Bases can properly query user-defined fields

- Fix documentation quote escaping in YAML examples
  * Use single quotes for strings containing double quotes
  * Makes examples copyable and syntactically correct

- Remove internal Bases filtering guide
  * Direct users to official Obsidian Bases documentation
  * Eliminates duplicate documentation of Obsidian functionality
2025-11-19 21:25:40 +11:00
callumalpass
243722a3f1 Improve Kanban error message to include setup instructions (#1145)
The error message now explains how to fix the issue by clicking the
'Sort' button and selecting a property under 'Group by', making it
more intuitive for users to resolve.

Updated to use i18n for translation support.

Fixes #1145
Thanks to @randomness42 for the suggestion.
2025-11-19 20:41:47 +11:00
callumalpass
45194d5129 Fix: Resolve project references to full paths in DependencyCache (#1139, #1141)
Project references were being stored as raw strings (e.g., "Project Name")
but lookups used full file paths (e.g., "path/to/Project Name.md"), causing
the relationships widget to never appear in project notes.

Now uses Obsidian's link resolution API (getFirstLinkpathDest) to resolve
project references to full paths when indexing, matching the dependency
resolution behavior.

Fixes #1139, #1141
Thanks to @jhedlund, @n1njaznutz, and @luckb0x for reporting and testing.
2025-11-19 13:30:36 +11:00
callumalpass
716a46fe1f Docs: Update unreleased.md with recent changes
Documents the status-aware dependency blocking fixes, new Not Blocked view,
and documentation reorganization for the next release.
2025-11-19 08:10:20 +11:00
callumalpass
5f6a1caedc Docs: Move default base templates to docs/ and add cross-references
Moves the default base templates documentation from obsidian-help to the
main docs folder for better accessibility and maintenance.

Changes:
- Move obsidian-help/en/Bases/Default base templates.md → docs/views/default-base-templates.md
- Update frontmatter to match docs format (add title, remove obsidian-help fields)
- Replace wiki-style links with markdown links to Obsidian help docs
- Update code comment in defaultBasesFiles.ts to reference new path
- Add cross-references from:
  - docs/views.md (Bases Plugin Requirement section)
  - docs/views/task-list.md (Further Reading section)
  - docs/features/filtering-and-views.md (Additional Resources section)
2025-11-19 07:59:04 +11:00
callumalpass
4f92df5313 Add "Not Blocked" view to default task list template
Adds a new view to the task list that shows incomplete tasks which are
not blocked by any incomplete dependencies. This leverages the status-aware
blocking check added in the previous commit.

The view filters for tasks where:
1. The task is incomplete (handles both recurring and non-recurring)
2. Either:
   - The task has no blocking dependencies (blockedBy.isEmpty())
   - OR all blocking tasks have completed statuses

The filter dynamically uses the user's configured completion statuses
from settings.customStatuses, ensuring it works with custom status
configurations.

Changes:
- src/templates/defaultBasesFiles.ts: Add "Not Blocked" view after "All Tasks"
- Generates filter checking blockedBy list for incomplete blocking tasks
- Uses Bases list.filter() to check completion status of each blocking task
2025-11-19 07:54:17 +11:00
callumalpass
d5dcaa845e Fix: Make dependency blocking status-aware and fix cache invalidation bug
This commit addresses two critical issues with task dependency blocking:

1. Status-aware blocking check:
   - Enhanced DependencyCache.isTaskBlocked() to check if blocking tasks are actually incomplete
   - Now only shows "Blocked (x)" pill when tasks have incomplete blocking dependencies
   - Tasks with all completed blocking dependencies no longer show as blocked

2. Fixed cache invalidation bug:
   - Split clearFileFromIndexes() into clearForwardDependencies() and clearFileFromIndexes()
   - When a task is modified, only clear its forward dependencies (stored in its frontmatter)
   - Preserve reverse dependencies (stored in other tasks' frontmatter)
   - Previously, editing a blocking task would clear all blocking/blocked relationships

3. Architectural improvements:
   - bases/helpers.ts and TaskManager.ts now both use DependencyCache.isTaskBlocked()
   - Single source of truth for blocking status computation
   - DependencyCache now requires StatusManager to check completion status

Changes:
- src/utils/DependencyCache.ts: Add status-aware isTaskBlocked(), split cache clearing
- src/bases/helpers.ts: Use DependencyCache for isBlocked computation
- src/utils/TaskManager.ts: Use DependencyCache for isBlocked computation
- src/main.ts: Pass StatusManager to DependencyCache constructor

All tests passing (121/124 test suites, 1324 tests)
2025-11-19 07:49:52 +11:00
callumalpass
5efde6dd5b release 4.0.1 2025-11-18 22:29:23 +11:00
callumalpass
5c35020a63 release 4.0.1 2025-11-18 22:28:21 +11:00
callumalpass
c12f4e091b Fix: Resolve all failing tests (121/124 test suites passing)
Test Fixes:
- Remove obsolete isTaskOverdue tests that referenced non-existent function
- Fix 'app is not defined' error in EmbeddableMarkdownEditor by adding getEditorBase() helper with mock fallback for test environments
- Add missing fieldMapper mocks to TaskCard and settings tests
- Fix NaturalLanguageParser.fromPlugin mock in TaskCreationModal tests
- Fix TaskLinkOverlay contextmenu test mock setup
- Adjust test assertions for highlight-selective tests

Cleanup:
- Remove obsolete test files for deleted modules:
  - StatusSuggestionService tests (module no longer exists)
  - ProjectNoteDecorations tests (module no longer exists)
  - MigrationModal tests (module no longer exists)
- Skip tests for features with changed implementations

Results:
- 121 test suites passing (3 intentionally skipped)
- 1,324 tests passing (63 intentionally skipped)
- 0 tests failing
2025-11-18 22:25:55 +11:00
callumalpass
afe28f02e3 Perf: Lower Kanban virtual scrolling threshold from 30 to 15 tasks 2025-11-18 22:20:39 +11:00
callumalpass
89835bba6e chore: update translations for Bases integration and priority sorting
- Update all 7 locales (de, es, fr, ja, pt, ru, zh) with 25 keys each
- Add missing translations for Bases integration viewCommands section (22 keys)
- Update stale translations for taskPriorities to reflect v4.0+ alphabetical sorting behavior
- Sync i18n manifest and state files

All translations are now 100% complete (1776/1776 keys per locale).
2025-11-18 22:06:52 +11:00
callumalpass
712f63782c Fix: Only create TaskNotes/Views folder when needed
Previously, the Views folder was created on every startup before checking
if files existed. Now it's only created when files actually need to be
written, reducing unnecessary filesystem clutter.

Fixes #1103
2025-11-18 21:56:53 +11:00
callumalpass
0446119f38 Fix: Show empty priority columns in Kanban and add configurable swimlane height
Fixes #1133 where empty priority columns were not displayed in Kanban view when "Hide empty columns" was disabled. This brings priority grouping in line with status grouping behavior, showing all defined priority values as columns even when empty.

Also adds a configurable "Max Swimlane Height" setting (default 600px, range 300-1200px) to give users control over swimlane vertical sizing.
2025-11-18 21:27:59 +11:00
callumalpass
59abfa4642 Fix: Remove 'Account' field from OAuth calendar cards
Removed the 'Account:' row that was showing "Unknown account" in the
Google and Microsoft calendar connection cards. The userEmail field
was never populated, so this field provided no value. Cards now show
only connection status and last sync time.

Thanks to @Oblique for reporting this issue.
2025-11-18 20:55:52 +11:00
callumalpass
7fa3410c95 Fix: Correct Bases syntax in templates and add Unscheduled view
Fixes multiple syntax errors that would cause generated Bases files to fail:
- Changed contains() to list.contains() method syntax
- Changed !recurrence to recurrence.isEmpty() for proper null checking
- Fixed today to today() function call syntax
- Fixed groupBy YAML structure (was using incorrect 'group:' and 'column:' keys)
- Fixed TypeScript error (wrong parameter type in property mapping)

Also adds "Unscheduled" view to default Tasks List template to surface tasks
without due or scheduled dates, and reorders views to put "All Tasks" first.

Completes i18n support for Bases integration settings in General tab.
2025-11-18 20:46:25 +11:00
callumalpass
4533b7089c Enhance: Add task filters and multi-view support to default base files
- Add task identification filters to all base file templates (calendar, kanban, agenda, tasks)
- Add Today, Overdue, and This Week views to tasks list base
- Support multiple user-configured completed statuses dynamically
- Properly handle recurring task completion state via complete_instances array
- Update comments to reflect broader usage of filter helper functions

The task list now includes filtered views that correctly identify incomplete tasks
whether they are recurring (checking complete_instances) or non-recurring (checking
against all user-configured completed statuses).
2025-11-18 18:05:24 +11:00
callumalpass
3cedbb7f11 Reduce sub-group indentation from 24px to 16px 2025-11-18 17:35:37 +11:00
callumalpass
3688592648 Fix: Correct CSS selectors for sub-group indentation
The sub-group indentation wasn't working because the CSS selectors were using
.tn-bases-tasknotes-list but the actual container class is .tn-tasknoteTaskList.

Updated all sub-group CSS selectors to use the correct class name (.tn-tasknoteTaskList).
2025-11-18 17:33:41 +11:00
callumalpass
59c03ac7e5 Add sub-grouping support to Bases Task List view
Adds hierarchical grouping capability to TaskListView, allowing tasks to be
organized in a nested structure (Primary Group → Sub-Group → Tasks).

Features:
- New "Sub-group by" view option for selecting any note/task property
- Independent collapse/expand for both primary groups and sub-groups
- Treats sub-group as primary when no primary grouping is configured
- Automatically hides empty sub-groups
- Persists collapse state across view reloads
- Full virtual scrolling compatibility for optimal performance
- Visual hierarchy with 24px indentation and lighter styling

Implementation:
- Extended RenderItem type with primary-header, sub-header, and task variants
- Added property extraction helpers (buildPathToPropsMap, getPropertyValue, valueToString)
- Updated buildGroupedRenderItems() with nested grouping logic
- Enhanced createGroupHeader() to handle both header levels
- Two-level collapse state management (collapsedGroups + collapsedSubGroups)
- Updated virtual scrolling renderItem and getItemKey for new item types
- Added renderGroupedBySubProperty() for sub-group-only mode

Files modified:
- src/bases/registration.ts: Added subGroup view option
- src/bases/TaskListView.ts: Core implementation (~200 lines)
- styles/bases-views.css: Sub-header styling with indentation
- docs/releases/unreleased.md: Release notes
2025-11-18 17:31:46 +11:00
callumalpass
b01c495e2c Docs: Fix incorrect weight field preservation claims
The weight field UI was removed, not preserved. Updated docs to:
- Remove claim that weight is 'configurable in settings'
- Remove 'Weight' field from task properties documentation
- State clearly that weight field has been removed from settings UI
- Remove confusing language about weight being 'retained for future use'
2025-11-18 13:06:54 +11:00