Commit graph

76 commits

Author SHA1 Message Date
callumalpass
c87e73588c fix mobile task modal footer footprint 2026-06-01 22:36:44 +10:00
callumalpass
43c70b7404 Merge pull request #1945 2026-05-26 18:11:28 +10:00
callumalpass
a9c5a41d7c fix mobile details fallback width 2026-05-25 00:59:18 +10:00
callumalpass
f45993f476 release 4.9.0 2026-05-24 09:35:31 +10:00
callumalpass
fd1b936808 fix cramped mobile edit task modal 2026-05-20 17:36:28 +10:00
callumalpass
ac943322cc replace calendar event emoji marker 2026-05-18 19:33:29 +10:00
callumalpass
8a86940a3a Fix mobile task modal custom field focus 2026-05-18 04:49:30 +10:00
callumalpass
7ace1460de Wrap task modal metadata paths 2026-05-18 04:03:20 +10:00
callumalpass
cb727eea4f Match details editor heading colors 2026-05-18 00:20:04 +10:00
callumalpass
237326816d Polish task modal title layout 2026-05-17 20:19:52 +10:00
callumalpass
ae92752c25 Restore task modal NLP preview visibility 2026-05-17 19:02:53 +10:00
callumalpass
abf337ca04 Use clickable cursor variable for TaskNotes controls 2026-05-17 14:28:33 +10:00
callumalpass
c520e1c134 Prevent split modal details collapse 2026-05-17 04:02:58 +10:00
callumalpass
8f48ea2479 Restore wide task modal scrolling 2026-05-17 01:29:28 +10:00
callumalpass
b664e4e03c Improve pomodoro timer and stats bases 2026-05-17 00:01:14 +10:00
callumalpass
9c0d59a84b Restore task modal editor padding 2026-05-16 11:19:08 +10:00
callumalpass
b288fdc70e Fix modal markdown editor sizing 2026-05-16 10:32:19 +10:00
callumalpass
d60ceace4b Tighten CSS linting and selector scopes 2026-05-14 23:06:37 +10:00
callumalpass
15d3555458 Expand modal markdown editor hit area 2026-05-14 22:56:41 +10:00
callumalpass
7da3572bac Move embedded editor styling to CSS 2026-05-14 22:56:41 +10:00
callumalpass
da71c84926 Clean up lint and modal styling 2026-05-14 22:04:48 +10:00
callumalpass
9d0665e82f Clean up CSS lint issues 2026-05-14 21:06:30 +10:00
callumalpass
72421907a7 Add modal task cards for subtasks and dependencies 2026-03-29 19:31:09 +11:00
callumalpass
67cee1f212 fix(modal): prevent buttons from overlapping content on mobile (#1595)
Added mobile-specific CSS rules targeting `body.is-mobile` for the
expanded task modal to ensure proper flex layout. The button container
now stays pinned at the bottom without overlapping the scrollable
content area on Obsidian mobile devices.
2026-02-15 11:12:05 +11:00
callumalpass
f9a053b6b6 fix(modal): enable scroll in edit modal when content exceeds viewport (#1577)
Make modal content scrollable while keeping action buttons pinned at bottom:
- Set modal-content as flex container with max-height constraint
- Make minimalist-modal-container a flex child that fills available space
- Add overflow-y: auto to modal-split-content for scrollable form fields
- Keep button container fixed with flex-shrink: 0 and visual separator

On wide screens with split-layout, reset overflow to visible since
individual columns handle their own scrolling.
2026-02-15 11:03:35 +11:00
callumalpass
0238a7cd0a fix: restore pointer cursor fallback on interactive elements (#1470) 2026-02-08 19:05:31 +11:00
callumalpass
1289b73a98 fix: prevent expanded task modal buttons from being cut off (#1532)
Constrain the expanded modal to max-height: 85vh and use flex layout
so the content area shrinks while the button container stays pinned
at the bottom of the viewport.
2026-02-08 18:23:14 +11:00
callumalpass
33ba082835 fix: remove focus glow from title inputs in task modal
Override Obsidian's default input focus box-shadow for both
.title-input and .title-input-detailed elements.
2025-12-08 21:24:45 +11:00
callumalpass
eda5779058 style: improve task modal layout and styling
- Position details field below title on narrow screens (non-split mode)
- Add thinner (0.5px) section dividers for cleaner appearance
- Remove glow effect from title input on focus
- Add 1200px+ breakpoint with wider modal (1100px) and left column (480px)
2025-12-08 21:18:43 +11:00
callumalpass
8c89c70f58 feat: add split layout for task modals on wide screens
Add a two-column layout for task modals on screens 900px+ wide, showing
form fields on the left and the details editor on the right. Includes a
new setting to toggle this behavior.

Also refactors task modal architecture to use template method pattern,
reducing code duplication between TaskCreationModal and TaskEditModal.
2025-12-07 19:35:17 +11:00
callumalpass
c607c7d408 fix: archive button too narrow on mobile in task edit modal
Use Obsidian's .is-mobile class to properly detect mobile devices
instead of relying solely on viewport width. The save button's
margin-left: auto now only applies on desktop.
2025-12-07 13:27:45 +11:00
callumalpass
31bacdc002 refactor: extract shared buildMetadataRows utility for project suggestions
- Add buildMetadataRows method to ProjectMetadataResolver for consistent
  metadata row building across NLP autocomplete and ProjectSelectModal
- Convert dynamic imports to static imports in NLPCodeMirrorAutocomplete
  for better performance (no longer imports on every keystroke)
- Add debug logging for row config parse errors (dev mode only)
- Add comprehensive tests for buildMetadataRows
- Fix misleading CSS comment about "legacy" styles that are still in use
2025-11-30 11:32:47 +11:00
Renato Mendonca
cb377ffb8c
feat: add rich metadata display to NLP project autosuggestion (#1215)
Enhance the CodeMirror-based NLP autocomplete to display rich project
metadata (title, aliases, path, custom frontmatter) when users type the
project trigger, bringing feature parity with the manual "Add to
Project" button dropdown.

Changes:
- Use CodeMirror 6's addToOptions API for custom rendering
- Display up to 3 configurable metadata rows based on projectAutosuggest.rows settings
- Add ProjectMetadataResolver integration for consistent metadata resolution
- Add CSS styles for metadata display in autocomplete tooltip

This improves UX consistency by ensuring both project selection methods
(NLP-triggered and manual) display the same rich context to help users
identify the correct project.
2025-11-26 08:31:05 +11:00
callumalpass
4c5c29d609 fix: task lists and checkboxes rendering incorrectly in task details editor (#1172) 2025-11-22 20:21:27 +11:00
callumalpass
f5f63edee2 fix: nlp autosuggest box being clipped inside NLP field boundaries (#1203) 2025-11-22 20:21:27 +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
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
811a8ee880 Feature: Add visual styling for skipped recurring task instances in calendars
Added visual differentiation for skipped instances across calendar views,
making it easy to distinguish between completed, skipped, and pending
recurring task instances at a glance.

Bases Calendar View:
- Skipped instances display with gray background (rgba(128,128,128,0.2))
- Lighter background for pattern instances (0.15 opacity)
- Added isSkipped flag to event extendedProps

Task Edit Modal Calendar:
- Skipped instances show with:
  - Gray background (rgba(128,128,128,0.3))
  - Muted text color
  - Strike-through text decoration
  - Faint border
  - Darker background on hover
- Read-only display of existing skipped instances
- Added recurring-calendar__day--skipped CSS class

Technical Changes:
- Extended CalendarEvent type with isSkipped property
- Updated createNextScheduledEvent() to check and style skipped instances
- Updated createRecurringEvent() to check and style skipped instances
- TaskEditModal now reads and displays skipped_instances from task data
- Added CSS styling in task-modal.css for skipped state

Visual Hierarchy:
- Completed: Bright accent color background, white text
- Skipped: Gray background, muted text with strike-through
- Recurring: Border only, transparent background
- Future: No special styling

This makes it immediately clear which instances were completed vs skipped,
improving the visual feedback for recurring task management.
2025-11-16 17:20:25 +11:00
callumalpass
9cd3bd1595 Unify property selection UI with user field support
- Extract PropertySelectorModal to shared location (src/modals/)
- Create shared property list builder utility (src/utils/propertyHelpers.ts)
- Update inline properties setting to use shared modal and helpers
- Replace default properties checkboxes with modal UI for consistency
- User-defined fields now automatically available in both property selectors
- Consistent UX across inline and default property configuration
2025-11-09 19:41:57 +11:00
callumalpass
db220ef433 Fix placeholder line rendering and animation
Changed approach:
- Lines are inline-block with ::after pseudo-element for line breaks
- Empty lines have min-height and no cursor
- max-width animates to 1000px (fixed value instead of 100%)
- Added padding-right to separate text from cursor
- overflow: hidden to crop text during animation

This should make all three lines visible and animate properly.
2025-11-09 19:41:57 +11:00
callumalpass
270158f217 Fix placeholder animation timing and scroll position
Fixed two issues:
1. Third line now appears right after first line finishes (not after empty line)
   - First line: delay 0ms
   - Second line (empty): delay = first line duration
   - Third line: delay = first line duration (parallel with empty line)

2. Prevent editor from scrolling down on mount
   - Added cm.scrollDOM.scrollTop = 0 after focus
   - This keeps the placeholder visible at the top
2025-11-09 19:41:57 +11:00
callumalpass
d42cfb4a4f Fix placeholder positioning and animation
Fixed issues with animated placeholder:
- Position absolute to overlay on editor properly
- Changed to max-width animation instead of width
- Each line is block display for proper stacking
- Added padding to match editor content area
- Width: fit-content with max-width: 0 for animation
2025-11-09 19:41:57 +11:00
callumalpass
0702157487 Add animated typewriter effect to multi-line NLP placeholder
Created a beautiful animated placeholder with typewriter effect that:
- Shows all 3 lines of placeholder text
- Animates each line typing out character by character
- Each line starts 1 second after the previous line
- Includes blinking cursor during typing
- Cursor disappears 1 second after last line completes
- No cursor bug because it's a widget, not actual editor lines!

Implementation:
1. PlaceholderWidget creates separate divs for each line
2. Each line has CSS custom properties for animation timing:
   - --typing-duration: Based on line length (50ms per character)
   - --typing-delay: Staggered by line (1000ms between lines)
   - --char-count: Number of characters for step animation

3. CSS animations:
   - typing: Expands width from 0 to 100% using steps()
   - blink-caret: Border blinks during typing
   - remove-caret: Hides cursor after animation completes

Effect:
Line 1: "Buy groceries..." types out (0s delay)
Line 2: Empty line (1s delay)
Line 3: "Add details here..." types out (2s delay)
Cursor disappears at ~5s total

Much more engaging than static placeholder! 
2025-11-09 19:41:57 +11:00
callumalpass
56db46859c Fix multi-line placeholder cursor bug with custom single-line placeholder
Root cause: CodeMirror's placeholder() extension creates multiple line
elements for multi-line placeholder text, causing multiple cursors to appear.

Solution: Replaced placeholder() extension with custom PlaceholderWidget that:
- Only shows the first line of placeholder text
- Renders as a single widget decoration
- Avoids creating multiple line elements
- Prevents multi-cursor bug entirely

Implementation:
- Created PlaceholderWidget class extending WidgetType
- Uses EditorView.decorations.compute() to show widget only when doc is empty
- Extracts first line from placeholder text: placeholder.split('\n')[0]
- Removed CSS workarounds (no longer needed)

Now placeholder shows "Buy groceries tomorrow at 3pm @home #errands"
without the "Add details here..." line, and cursor appears normally.
2025-11-09 19:41:57 +11:00
callumalpass
b3e50641bb Fix cursor appearing across all placeholder lines in NLP editor
When multi-line placeholder text is shown, CodeMirror creates multiple
cursor instances (one per line). This fix hides all but the first cursor
when the placeholder is visible.

CSS: Hide all .cm-cursor elements except :first-of-type when .cm-placeholder exists
Reverted line-height back to 1.5 as requested
2025-11-09 19:41:57 +11:00
callumalpass
d574466cd1 Fix NLP editor placeholder line-height to reduce visual spacing
Reduced line-height from 1.5 to 1.3 in NLP markdown editor to make
the multi-line placeholder text render more compactly. This prevents
the placeholder from appearing overly spread out across multiple lines.
2025-11-09 19:41:57 +11:00
callumalpass
7867ff2ff2 Add customizable NLP triggers with full user field support
Implements issue #752 - customizable trigger strings for all property types.

Major changes:
- Add PropertyTriggerConfig and NLPTriggersConfig types
- Add TriggerConfigService for managing trigger configurations
- Update NaturalLanguageParser to use configurable triggers (not hard-coded)
- Rewrite NLPCodeMirrorAutocomplete with dynamic trigger discovery
- Add comprehensive settings UI for configuring triggers
- Add user field extraction and preview support
- Fix whitespace preservation in trigger strings
- Add migration from old statusSuggestionTrigger setting

Features:
- Multi-character triggers (e.g., "context:", "project:")
- User-defined property triggers with autocomplete
- Smart tag handling (native vs custom suggester)
- Extraction and population of user fields on task creation
- Extensive debug logging for troubleshooting

Files modified:
- src/types/settings.ts - New trigger types
- src/settings/defaults.ts - Default trigger configuration
- src/services/TriggerConfigService.ts - NEW service
- src/services/NaturalLanguageParser.ts - Dynamic triggers
- src/editor/NLPCodeMirrorAutocomplete.ts - Complete rewrite
- src/modals/TaskCreationModal.ts - User field population
- src/settings/tabs/featuresTab.ts - Settings UI
- src/main.ts - Settings migration

Build: Successful, 2.7MB, zero TypeScript errors
2025-11-09 19:41:57 +11:00
callumalpass
82772204cb Fix internal padding in NLP markdown editor
- Move padding from cm-content to cm-scroller
- Reset cm-content padding to 0 with !important
- Reset cm-line padding to prevent double padding
- Now text has proper spacing from border edges

Padding is now applied at the scroller level to ensure it works correctly.
2025-11-09 19:41:57 +11:00
callumalpass
b664d50a7e Match NLP markdown editor styling to old textarea styling
- Background: var(--background-secondary) by default
- Focus: border-color changes to --interactive-accent
- Focus: background changes to --background-primary
- Focus: add accent glow shadow (2px rgba)
- Padding: var(--size-4-3) var(--size-4-2) to match old input
- Line height: 1.5 to match old textarea
- Placeholder: --text-muted color
- Smooth transition on all changes (0.2s ease)

Now the markdown editor looks and feels just like the old textarea!
2025-11-09 19:41:57 +11:00
callumalpass
deccb5d962 Scope autocomplete CSS to TaskNotes modals only
Prefix all CodeMirror autocomplete styles with .tasknotes-plugin
to prevent affecting other plugins or Obsidian's native editors.

This ensures our styling is isolated to TaskNotes UI components.
2025-11-09 19:41:57 +11:00