diff --git a/IMPLEMENTATION_NOTES.md b/IMPLEMENTATION_NOTES.md index 20ee976..7c00590 100644 --- a/IMPLEMENTATION_NOTES.md +++ b/IMPLEMENTATION_NOTES.md @@ -99,7 +99,6 @@ class MyControl extends ControlBase { #### With TestDrive-JSUI System - **Component Discovery**: Listed by `scripts/list_components.py` - **TDD Testing**: Validated by `tests/test_component_listing.py` -- **Legacy Support**: `DocumentControlsLegacy` maintains backward compatibility #### With MarkiTect md-render - **Plugin Integration**: Ready for deployment via Makefile targets @@ -116,7 +115,6 @@ class MyControl extends ControlBase { #### Automated Testing - Component listing tests ensure discovery - Integration tests validate interaction patterns -- Legacy tests maintain backward compatibility ### Performance Considerations diff --git a/MIGRATION_STATUS.md b/docs/migration/MIGRATION_STATUS.md similarity index 100% rename from MIGRATION_STATUS.md rename to docs/migration/MIGRATION_STATUS.md diff --git a/relicts/AllControlsRudimentary.html b/docs/prototypes/AllControlsRudimentary.html similarity index 100% rename from relicts/AllControlsRudimentary.html rename to docs/prototypes/AllControlsRudimentary.html diff --git a/relicts/ControlFooter.html b/docs/prototypes/ControlFooter.html similarity index 100% rename from relicts/ControlFooter.html rename to docs/prototypes/ControlFooter.html diff --git a/relicts/DebugControlContent.html b/docs/prototypes/DebugControlContent.html similarity index 100% rename from relicts/DebugControlContent.html rename to docs/prototypes/DebugControlContent.html diff --git a/docs/prototypes/README.md b/docs/prototypes/README.md new file mode 100644 index 0000000..c1bb03d --- /dev/null +++ b/docs/prototypes/README.md @@ -0,0 +1,37 @@ +# TestDrive-JSUI Prototypes + +This directory contains historical HTML prototypes from the development of the control system architecture. + +## Files + +- **AllControlsRudimentary.html** - Early prototype showing all control panels +- **ControlFooter.html** - Footer control prototype +- **DebugControlContent.html** - Reference implementation for enhanced ControlBase behavior +- **StatusPsychadelic.html** - Status control visual prototype + +## Historical Context + +These prototypes were created during the development of the enhanced ControlBase architecture (documented in `IMPLEMENTATION_NOTES.md`). They served as reference implementations for: + +- Icon-only collapsed state +- Expand/drag functionality +- Bottom-left corner resize +- Collapse with position restoration +- Header toggle for content visibility + +## Status + +These files are **archived for historical reference only**. The implemented code is now in: +- `js/controls/control-base.js` - Base control class +- `js/controls/edit-control.js` - Edit panel +- `js/controls/debug-control.js` - Debug panel +- `js/controls/status-control.js` - Status indicator +- `js/controls/contents-control.js` - Table of contents + +## Notes + +The DebugControlContent.html prototype was specifically referenced in the IMPLEMENTATION_NOTES.md as the source for the advanced panel behavior patterns that were implemented in the ControlBase class. + +--- + +*Archived: December 16, 2025* diff --git a/relicts/StatusPsychadelic.html b/docs/prototypes/StatusPsychadelic.html similarity index 100% rename from relicts/StatusPsychadelic.html rename to docs/prototypes/StatusPsychadelic.html diff --git a/js/components/document-controls-legacy.js b/js/components/document-controls-legacy.js deleted file mode 100644 index 69696f9..0000000 --- a/js/components/document-controls-legacy.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Legacy wrapper for DocumentControls - * - * This file provides backward compatibility for tests that reference - * DocumentControlsLegacy. It simply re-exports the current DocumentControls - * implementation with the legacy name. - */ - -const { DocumentControls } = require('./document-controls.js'); - -// Re-export as legacy name for backward compatibility -const DocumentControlsLegacy = DocumentControls; - -// Export for use in tests and other modules -if (typeof module !== 'undefined' && module.exports) { - module.exports = { DocumentControlsLegacy }; -} - -// Export for browser use -if (typeof window !== 'undefined') { - window.DocumentControlsLegacy = DocumentControls; -} diff --git a/js/tests/button-events.test.js b/js/tests/button-events.test.js index bf6e45f..9d35543 100644 --- a/js/tests/button-events.test.js +++ b/js/tests/button-events.test.js @@ -33,10 +33,10 @@ describe('Button Functionality and DOM Events', () => { mockSection = document.querySelector('.section'); - // Load components - using legacy component for backward compatibility - require('../components/document-controls-legacy.js'); - if (global.DocumentControlsLegacy) { - documentControls = new global.DocumentControlsLegacy(document.getElementById('content')); + // Load components + require('../components/document-controls.js'); + if (global.DocumentControls) { + documentControls = new global.DocumentControls(document.getElementById('content')); } }); diff --git a/js/tests/test-documentcontrols-extraction.js b/js/tests/test-documentcontrols-extraction.js index 764313c..2d5607c 100644 --- a/js/tests/test-documentcontrols-extraction.js +++ b/js/tests/test-documentcontrols-extraction.js @@ -37,14 +37,14 @@ runner.describe('DocumentControls Component Extraction', () => { runner.it('should load extracted DocumentControls component', () => { // Load the extracted component - delete require.cache[require.resolve('../components/document-controls-legacy.js')]; + delete require.cache[require.resolve('../components/document-controls.js')]; try { - const module = require('../components/document-controls-legacy.js'); - runner.expect(module.DocumentControlsLegacy).toBeTruthy(); + const module = require('../components/document-controls.js'); + runner.expect(module.DocumentControls).toBeTruthy(); // Set global for other tests - global.ExtractedDocumentControls = module.DocumentControlsLegacy; + global.ExtractedDocumentControls = module.DocumentControls; } catch (error) { throw new Error(`Failed to load extracted DocumentControls: ${error.message}`); } diff --git a/js/tests/test-full-integration.js b/js/tests/test-full-integration.js index 3b06d12..3edb0ce 100644 --- a/js/tests/test-full-integration.js +++ b/js/tests/test-full-integration.js @@ -19,18 +19,18 @@ runner.describe('Full Component Integration Tests', () => { const sectionModule = require('../core/section-manager.js'); const domModule = require('../components/dom-renderer.js'); const debugModule = require('../components/debug-panel.js'); - const controlsModule = require('../components/document-controls-legacy.js'); + const controlsModule = require('../components/document-controls.js'); runner.expect(sectionModule.SectionManager).toBeTruthy(); runner.expect(domModule.DOMRenderer).toBeTruthy(); runner.expect(debugModule.DebugPanel).toBeTruthy(); - runner.expect(controlsModule.DocumentControlsLegacy).toBeTruthy(); + runner.expect(controlsModule.DocumentControls).toBeTruthy(); // Set globals for other tests global.ExtractedSectionManager = sectionModule.SectionManager; global.ExtractedDOMRenderer = domModule.DOMRenderer; global.ExtractedDebugPanel = debugModule.DebugPanel; - global.ExtractedDocumentControls = controlsModule.DocumentControlsLegacy; + global.ExtractedDocumentControls = controlsModule.DocumentControls; } catch (error) { throw new Error(`Failed to load extracted components: ${error.message}`); diff --git a/js/tests/test-real-user-functionality.js b/js/tests/test-real-user-functionality.js index c5117be..3d7fdde 100644 --- a/js/tests/test-real-user-functionality.js +++ b/js/tests/test-real-user-functionality.js @@ -18,12 +18,12 @@ runner.describe('Real User Functionality Tests', () => { const sectionModule = require('../core/section-manager.js'); const domModule = require('../components/dom-renderer.js'); const debugModule = require('../components/debug-panel.js'); - const controlsModule = require('../components/document-controls-legacy.js'); + const controlsModule = require('../components/document-controls.js'); const { SectionManager } = sectionModule; const { DOMRenderer } = domModule; const { DebugPanel } = debugModule; - const { DocumentControlsLegacy } = controlsModule; + const { DocumentControls } = controlsModule; // Setup DOM container const container = document.createElement('div'); @@ -34,7 +34,7 @@ runner.describe('Real User Functionality Tests', () => { const sectionManager = new SectionManager(); const domRenderer = new DOMRenderer(sectionManager, container); const debugPanel = new DebugPanel(); - const documentControls = new DocumentControlsLegacy(); + const documentControls = new DocumentControls(); // Setup document controls documentControls.create(); @@ -96,11 +96,11 @@ runner.describe('Real User Functionality Tests', () => { // Setup similar to above const sectionModule = require('../core/section-manager.js'); const domModule = require('../components/dom-renderer.js'); - const controlsModule = require('../components/document-controls-legacy.js'); + const controlsModule = require('../components/document-controls.js'); const { SectionManager } = sectionModule; const { DOMRenderer } = domModule; - const { DocumentControlsLegacy } = controlsModule; + const { DocumentControls } = controlsModule; const container = document.createElement('div'); container.innerHTML = '
'; @@ -108,7 +108,7 @@ runner.describe('Real User Functionality Tests', () => { const sectionManager = new SectionManager(); const domRenderer = new DOMRenderer(sectionManager, container); - const documentControls = new DocumentControlsLegacy(); + const documentControls = new DocumentControls(); documentControls.create(); @@ -195,12 +195,12 @@ runner.describe('Real User Functionality Tests', () => { const sectionModule = require('../core/section-manager.js'); const domModule = require('../components/dom-renderer.js'); const debugModule = require('../components/debug-panel.js'); - const controlsModule = require('../components/document-controls-legacy.js'); + const controlsModule = require('../components/document-controls.js'); const { SectionManager } = sectionModule; const { DOMRenderer } = domModule; const { DebugPanel } = debugModule; - const { DocumentControlsLegacy } = controlsModule; + const { DocumentControls } = controlsModule; const container = document.createElement('div'); container.innerHTML = '
'; @@ -209,7 +209,7 @@ runner.describe('Real User Functionality Tests', () => { const sectionManager = new SectionManager(); const domRenderer = new DOMRenderer(sectionManager, container); const debugPanel = new DebugPanel(); - const documentControls = new DocumentControlsLegacy(); + const documentControls = new DocumentControls(); documentControls.create(); diff --git a/scripts/list_components.py b/scripts/list_components.py index e6782e0..0b6e665 100755 --- a/scripts/list_components.py +++ b/scripts/list_components.py @@ -52,8 +52,7 @@ class ComponentAnalyzer: 'CssProcessor': 'CSSProcessor', 'JsEngine': 'JSEngine', 'ApiClient': 'APIClient', - 'UrlHandler': 'URLHandler', - 'DocumentControlsLegacy': 'DocumentControlsLegacy' + 'UrlHandler': 'URLHandler' } component_name = acronym_mappings.get(component_name, component_name) diff --git a/tests/test_component_listing.py b/tests/test_component_listing.py index a0fe275..d2fe935 100644 --- a/tests/test_component_listing.py +++ b/tests/test_component_listing.py @@ -35,7 +35,7 @@ class TestComponentListing: 'EditControl': 'js/controls/edit-control.js', 'DebugControl': 'js/controls/debug-control.js', 'DebugPanel': 'js/components/debug-panel.js', - 'DocumentControlsLegacy': 'js/components/document-controls-legacy.js', + 'DocumentControls': 'js/components/document-controls.js', 'SectionManager': 'js/core/section-manager.js', 'DOMRenderer': 'js/components/dom-renderer.js' }