feat: implement export configuration modal (task 7)

Add comprehensive ExportConfigModal class extending Obsidian Modal
with full UI for PDF export configuration including:

- Export mode selection (current note, note with dependencies, collection)
- Format selection (PDF via Pandoc+Typst, Typst source export)
- Template management with predefined and custom options
- Output settings (filename patterns, destination paths)
- Page configuration (size, orientation, margins)
- Typography settings (fonts, sizes, spacing)
- Real-time validation with visual feedback
- Settings persistence with recent export tracking
- Progress indicator with cancellation capability
- Professional CSS styling for modal appearance

Implements Task 7 and all 5 subtasks (7.1-7.5) from TaskMaster.

Note: Modal implementation complete but not yet connected to
export commands - handleExportWithDependencyCheck still shows
placeholder message and needs integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-08-29 23:07:10 +02:00
1 parent 58e0558903
commit 83b52c6f41
3 files changed
+1676 -7

No files matched your search

+2
View File
@@ -38,6 +38,8 @@ node_modules/
*.njsproj
*.sln
*.sw?
*.sublime-project
*.sublime-workspace
# OS specific
# Task files
+7 -7
View File
@@ -401,7 +401,7 @@
"dependencies": [
6
],
"status": "pending",
"status": "done",
"subtasks": [
{
"id": 1,
@@ -409,7 +409,7 @@
"description": "Build basic ExportConfigModal class extending Modal with constructor, configuration state management, and type definitions",
"dependencies": [],
"details": "Create ExportConfigModal class extending Obsidian's Modal class. Define comprehensive configuration interface for export settings including export mode, format, template selection, page configuration, and typography options. Initialize modal with default settings and plugin reference, following patterns from reference better-export-pdf plugin modal.ts. Set up basic modal structure with proper TypeScript typing.",
"status": "pending",
"status": "done",
"testStrategy": "Test modal can be instantiated, opened, and closed without errors. Verify configuration object initializes with expected default values and types match interface definitions."
},
{
@@ -420,7 +420,7 @@
"7.1"
],
"details": "Build generateForm method creating UI sections for: export mode selection (typography/style-preserving), format choice (standard/single-page), template selection dropdown, output settings (location, filename pattern), page configuration (size, orientation, margins), and typography options (fonts, sizes). Use Obsidian UI components: Setting, ButtonComponent, DropdownComponent following existing patterns. Include proper labeling and organization.",
"status": "pending",
"status": "done",
"testStrategy": "Test all form sections render correctly, dropdowns contain expected options, and input fields accept valid values. Verify form layout matches design requirements."
},
{
@@ -431,7 +431,7 @@
"7.2"
],
"details": "Add event handlers for all form inputs to validate settings in real-time. Implement preview update logic that refreshes display when settings change. Add validation for required fields, numeric ranges, and file paths. Show visual feedback for invalid inputs and helpful error messages. Use debounced updates for performance optimization following reference implementation patterns.",
"status": "pending",
"status": "done",
"testStrategy": "Test validation triggers on invalid inputs, preview updates reflect configuration changes, and error messages are clear and actionable. Verify performance with rapid setting changes."
},
{
@@ -442,7 +442,7 @@
"7.1"
],
"details": "Create settings persistence mechanism to save current export configuration to plugin settings. Implement configuration restoration from previous exports, maintaining user preferences. Handle default settings fallback and migration of settings format changes. Store settings in plugin data using Obsidian's standard settings pattern with proper serialization.",
"status": "pending",
"status": "done",
"testStrategy": "Test settings persist across plugin reloads, previous configurations restore correctly, and default settings apply appropriately for new users."
},
{
@@ -453,7 +453,7 @@
"7.3"
],
"details": "Implement progress indicator showing export status and completion percentage. Add cancel button functionality to halt export process safely. Create progress modal or overlay displaying current operation status, files processed, and estimated time remaining. Handle cancellation gracefully by cleaning up temporary files and resetting modal state. Follow patterns from reference implementation's Progress.svelte integration.",
"status": "pending",
"status": "done",
"testStrategy": "Test progress indicator shows accurate status during export, cancel functionality works without leaving corrupted files, and modal state resets properly after cancellation."
}
]
@@ -675,7 +675,7 @@
],
"metadata": {
"created": "2025-08-29T14:23:07.961Z",
"updated": "2025-08-29T20:51:56.772Z",
"updated": "2025-08-29T21:00:45.921Z",
"description": "Tasks for master context"
}
}
+1667
View File
File diff suppressed because it is too large. Load diff