From 70ebb6a767c545790a3984e95bd34bf2140f89c8 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Wed, 10 Sep 2025 12:49:03 +0200 Subject: [PATCH] refactor: complete ExportConfigModal.ts refactoring (Step 4.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused getOutputFilename() method - Remove unnecessary delegation methods showValidationErrors() and showValidationWarnings() - Update handleSubmit() to call renderer methods directly - Clean up excessive blank lines for better readability - Reduce file size from 237 to 219 lines while maintaining functionality This completes Phase 4.3 of the large file refactoring plan, achieving the target of ~200 lines while preserving all modal lifecycle methods, event handlers, and state management functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/ui/modal/ExportConfigModal.ts | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/ui/modal/ExportConfigModal.ts b/src/ui/modal/ExportConfigModal.ts index a4ebf0e..7fffaa7 100644 --- a/src/ui/modal/ExportConfigModal.ts +++ b/src/ui/modal/ExportConfigModal.ts @@ -85,10 +85,6 @@ export class ExportConfigModal extends Modal { this.loadAvailableTemplates(); } - - - - private async loadAvailableTemplates(): Promise { try { const templateManager = new TemplateManager(this.plugin); @@ -151,13 +147,13 @@ export class ExportConfigModal extends Modal { const validationResults = this.validator.validateAllSections(Array.from(this.sections.values())); if (!validationResults.isValid) { - this.showValidationErrors(validationResults.errors); + this.renderer.showValidationErrors(validationResults.errors); return; } // Show any warnings if (validationResults.warnings && validationResults.warnings.length > 0) { - this.showValidationWarnings(validationResults.warnings); + this.renderer.showValidationWarnings(validationResults.warnings); } // Build export configuration @@ -199,24 +195,11 @@ export class ExportConfigModal extends Modal { } - private showValidationErrors(errors: string[]): void { - this.renderer.showValidationErrors(errors); - } - - private showValidationWarnings(warnings: string[]): void { - this.renderer.showValidationWarnings(warnings); - } - updateProgress(message: string, percent: number): void { this.renderer.updateProgress(message, percent); } - private getOutputFilename(): string { - const noteName = this.state.settings.noteTitle || 'document'; - return `${noteName}.pdf`; - } - onClose(): void { // Clean up state listeners