feat: implement comprehensive settings interface and validation system (task 2)
- Add complete TypeScript interfaces for plugin configuration: - ExportMode and ExportFormat enums for type safety - Template interface for Typst template management - ExportConfig interface for per-export configurations - Comprehensive obsidianTypstPDFExportSettings interface - Implement robust settings persistence with validation and migration - Replace placeholder settings UI with full Obsidian Setting API implementation: - External tools configuration (Pandoc/Typst paths, output folder) - Export defaults (template, format, mode selection) - Typography settings (font families and sizing) - Page setup controls (size, orientation, margins) - Behavior toggles (auto-open, folder structure preservation) - Add DEFAULT_SETTINGS with sensible defaults for all configuration options - Implement validateSettings() and migrateSettings() for data integrity 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2 files changed
+614
-15
No files matched your search
@@ -75,7 +75,7 @@
|
||||
"dependencies": [
|
||||
1
|
||||
],
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"subtasks": [
|
||||
{
|
||||
"id": 1,
|
||||
@@ -83,7 +83,7 @@
|
||||
"description": "Define the comprehensive PluginSettings interface with external tool paths, export defaults, typography settings, and page setup configuration",
|
||||
"dependencies": [],
|
||||
"details": "Create PluginSettings interface containing: pandocPath and typstPath for external tool locations, outputFolder for default export directory, export defaults (template, format, mode), typography settings (fonts, font sizes), page setup configuration (page size, orientation, margins), and behavior flags (openAfterExport, preserveFolderStructure). Include proper JSDoc documentation for each property.",
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"testStrategy": ""
|
||||
},
|
||||
{
|
||||
@@ -92,7 +92,7 @@
|
||||
"description": "Create per-export configuration interface and define ExportMode and ExportFormat enumerations",
|
||||
"dependencies": [],
|
||||
"details": "Define ExportConfig interface for per-export settings that can override plugin defaults. Create ExportMode enum with values 'typography' and 'style-preserving' for different export approaches. Create ExportFormat enum with values 'standard' and 'single-page' for output format options. Ensure enums are properly typed and documented.",
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"testStrategy": ""
|
||||
},
|
||||
{
|
||||
@@ -101,7 +101,7 @@
|
||||
"description": "Create Template interface for Typst template management and validation",
|
||||
"dependencies": [],
|
||||
"details": "Design Template interface with properties for template name, file path, variables, and metadata. Include template validation structure for required variables and compatibility checking. Define template variable types and default value specifications. Create interface for template discovery and loading mechanisms.",
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"testStrategy": ""
|
||||
},
|
||||
{
|
||||
@@ -112,7 +112,7 @@
|
||||
"2.1"
|
||||
],
|
||||
"details": "Implement loadSettings() and saveSettings() methods that properly serialize/deserialize the PluginSettings interface. Add validation for required paths, enum values, and configuration consistency. Include migration logic for settings format updates and proper error handling for corrupted settings.",
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"testStrategy": ""
|
||||
},
|
||||
{
|
||||
@@ -124,7 +124,7 @@
|
||||
"2.4"
|
||||
],
|
||||
"details": "Replace the existing obsidianTypstPDFExportSettings interface in main.ts with the new comprehensive PluginSettings interface. Update all references to use proper TypeScript types. Remove any remaining template/sample code references to settings. Ensure proper initialization of default settings values.",
|
||||
"status": "pending",
|
||||
"status": "done",
|
||||
"testStrategy": ""
|
||||
}
|
||||
]
|
||||
@@ -675,7 +675,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"created": "2025-08-29T14:23:07.961Z",
|
||||
"updated": "2025-08-29T15:02:03.551Z",
|
||||
"updated": "2025-08-29T15:13:25.131Z",
|
||||
"description": "Tasks for master context"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user