generated from coulomb/repo-seed
refactor: complete post-migration cleanup
Implemented all cleanup items from CLEANUP_REPORT.md: Legacy Code Removal: - Removed document-controls-legacy.js wrapper - Updated 4 test files to use DocumentControls directly - Updated scripts/list_components.py acronym mappings - Updated tests/test_component_listing.py expectations Archive and Organization: - Moved relicts/ to docs/prototypes/ with README explaining history - Moved MIGRATION_STATUS.md to docs/migration/ - Removed IMPLEMENTATION_NOTES.md legacy references Test Verification: - All 68 JavaScript tests passing (Jest) - All 3 Python component tests passing - No breaking changes to functionality The codebase is now cleaner with no legacy wrappers or empty directories. Migration is complete and documented. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,6 @@ class MyControl extends ControlBase {
|
|||||||
#### With TestDrive-JSUI System
|
#### With TestDrive-JSUI System
|
||||||
- **Component Discovery**: Listed by `scripts/list_components.py`
|
- **Component Discovery**: Listed by `scripts/list_components.py`
|
||||||
- **TDD Testing**: Validated by `tests/test_component_listing.py`
|
- **TDD Testing**: Validated by `tests/test_component_listing.py`
|
||||||
- **Legacy Support**: `DocumentControlsLegacy` maintains backward compatibility
|
|
||||||
|
|
||||||
#### With MarkiTect md-render
|
#### With MarkiTect md-render
|
||||||
- **Plugin Integration**: Ready for deployment via Makefile targets
|
- **Plugin Integration**: Ready for deployment via Makefile targets
|
||||||
@@ -116,7 +115,6 @@ class MyControl extends ControlBase {
|
|||||||
#### Automated Testing
|
#### Automated Testing
|
||||||
- Component listing tests ensure discovery
|
- Component listing tests ensure discovery
|
||||||
- Integration tests validate interaction patterns
|
- Integration tests validate interaction patterns
|
||||||
- Legacy tests maintain backward compatibility
|
|
||||||
|
|
||||||
### Performance Considerations
|
### Performance Considerations
|
||||||
|
|
||||||
|
|||||||
37
docs/prototypes/README.md
Normal file
37
docs/prototypes/README.md
Normal file
@@ -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*
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -33,10 +33,10 @@ describe('Button Functionality and DOM Events', () => {
|
|||||||
|
|
||||||
mockSection = document.querySelector('.section');
|
mockSection = document.querySelector('.section');
|
||||||
|
|
||||||
// Load components - using legacy component for backward compatibility
|
// Load components
|
||||||
require('../components/document-controls-legacy.js');
|
require('../components/document-controls.js');
|
||||||
if (global.DocumentControlsLegacy) {
|
if (global.DocumentControls) {
|
||||||
documentControls = new global.DocumentControlsLegacy(document.getElementById('content'));
|
documentControls = new global.DocumentControls(document.getElementById('content'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ runner.describe('DocumentControls Component Extraction', () => {
|
|||||||
|
|
||||||
runner.it('should load extracted DocumentControls component', () => {
|
runner.it('should load extracted DocumentControls component', () => {
|
||||||
// Load the extracted 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 {
|
try {
|
||||||
const module = require('../components/document-controls-legacy.js');
|
const module = require('../components/document-controls.js');
|
||||||
runner.expect(module.DocumentControlsLegacy).toBeTruthy();
|
runner.expect(module.DocumentControls).toBeTruthy();
|
||||||
|
|
||||||
// Set global for other tests
|
// Set global for other tests
|
||||||
global.ExtractedDocumentControls = module.DocumentControlsLegacy;
|
global.ExtractedDocumentControls = module.DocumentControls;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to load extracted DocumentControls: ${error.message}`);
|
throw new Error(`Failed to load extracted DocumentControls: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,18 +19,18 @@ runner.describe('Full Component Integration Tests', () => {
|
|||||||
const sectionModule = require('../core/section-manager.js');
|
const sectionModule = require('../core/section-manager.js');
|
||||||
const domModule = require('../components/dom-renderer.js');
|
const domModule = require('../components/dom-renderer.js');
|
||||||
const debugModule = require('../components/debug-panel.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(sectionModule.SectionManager).toBeTruthy();
|
||||||
runner.expect(domModule.DOMRenderer).toBeTruthy();
|
runner.expect(domModule.DOMRenderer).toBeTruthy();
|
||||||
runner.expect(debugModule.DebugPanel).toBeTruthy();
|
runner.expect(debugModule.DebugPanel).toBeTruthy();
|
||||||
runner.expect(controlsModule.DocumentControlsLegacy).toBeTruthy();
|
runner.expect(controlsModule.DocumentControls).toBeTruthy();
|
||||||
|
|
||||||
// Set globals for other tests
|
// Set globals for other tests
|
||||||
global.ExtractedSectionManager = sectionModule.SectionManager;
|
global.ExtractedSectionManager = sectionModule.SectionManager;
|
||||||
global.ExtractedDOMRenderer = domModule.DOMRenderer;
|
global.ExtractedDOMRenderer = domModule.DOMRenderer;
|
||||||
global.ExtractedDebugPanel = debugModule.DebugPanel;
|
global.ExtractedDebugPanel = debugModule.DebugPanel;
|
||||||
global.ExtractedDocumentControls = controlsModule.DocumentControlsLegacy;
|
global.ExtractedDocumentControls = controlsModule.DocumentControls;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to load extracted components: ${error.message}`);
|
throw new Error(`Failed to load extracted components: ${error.message}`);
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
const sectionModule = require('../core/section-manager.js');
|
const sectionModule = require('../core/section-manager.js');
|
||||||
const domModule = require('../components/dom-renderer.js');
|
const domModule = require('../components/dom-renderer.js');
|
||||||
const debugModule = require('../components/debug-panel.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 { SectionManager } = sectionModule;
|
||||||
const { DOMRenderer } = domModule;
|
const { DOMRenderer } = domModule;
|
||||||
const { DebugPanel } = debugModule;
|
const { DebugPanel } = debugModule;
|
||||||
const { DocumentControlsLegacy } = controlsModule;
|
const { DocumentControls } = controlsModule;
|
||||||
|
|
||||||
// Setup DOM container
|
// Setup DOM container
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
@@ -34,7 +34,7 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
const sectionManager = new SectionManager();
|
const sectionManager = new SectionManager();
|
||||||
const domRenderer = new DOMRenderer(sectionManager, container);
|
const domRenderer = new DOMRenderer(sectionManager, container);
|
||||||
const debugPanel = new DebugPanel();
|
const debugPanel = new DebugPanel();
|
||||||
const documentControls = new DocumentControlsLegacy();
|
const documentControls = new DocumentControls();
|
||||||
|
|
||||||
// Setup document controls
|
// Setup document controls
|
||||||
documentControls.create();
|
documentControls.create();
|
||||||
@@ -96,11 +96,11 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
// Setup similar to above
|
// Setup similar to above
|
||||||
const sectionModule = require('../core/section-manager.js');
|
const sectionModule = require('../core/section-manager.js');
|
||||||
const domModule = require('../components/dom-renderer.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 { SectionManager } = sectionModule;
|
||||||
const { DOMRenderer } = domModule;
|
const { DOMRenderer } = domModule;
|
||||||
const { DocumentControlsLegacy } = controlsModule;
|
const { DocumentControls } = controlsModule;
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.innerHTML = '<div id="markdown-content"></div>';
|
container.innerHTML = '<div id="markdown-content"></div>';
|
||||||
@@ -108,7 +108,7 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
|
|
||||||
const sectionManager = new SectionManager();
|
const sectionManager = new SectionManager();
|
||||||
const domRenderer = new DOMRenderer(sectionManager, container);
|
const domRenderer = new DOMRenderer(sectionManager, container);
|
||||||
const documentControls = new DocumentControlsLegacy();
|
const documentControls = new DocumentControls();
|
||||||
|
|
||||||
documentControls.create();
|
documentControls.create();
|
||||||
|
|
||||||
@@ -195,12 +195,12 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
const sectionModule = require('../core/section-manager.js');
|
const sectionModule = require('../core/section-manager.js');
|
||||||
const domModule = require('../components/dom-renderer.js');
|
const domModule = require('../components/dom-renderer.js');
|
||||||
const debugModule = require('../components/debug-panel.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 { SectionManager } = sectionModule;
|
||||||
const { DOMRenderer } = domModule;
|
const { DOMRenderer } = domModule;
|
||||||
const { DebugPanel } = debugModule;
|
const { DebugPanel } = debugModule;
|
||||||
const { DocumentControlsLegacy } = controlsModule;
|
const { DocumentControls } = controlsModule;
|
||||||
|
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
container.innerHTML = '<div id="markdown-content"></div>';
|
container.innerHTML = '<div id="markdown-content"></div>';
|
||||||
@@ -209,7 +209,7 @@ runner.describe('Real User Functionality Tests', () => {
|
|||||||
const sectionManager = new SectionManager();
|
const sectionManager = new SectionManager();
|
||||||
const domRenderer = new DOMRenderer(sectionManager, container);
|
const domRenderer = new DOMRenderer(sectionManager, container);
|
||||||
const debugPanel = new DebugPanel();
|
const debugPanel = new DebugPanel();
|
||||||
const documentControls = new DocumentControlsLegacy();
|
const documentControls = new DocumentControls();
|
||||||
|
|
||||||
documentControls.create();
|
documentControls.create();
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ class ComponentAnalyzer:
|
|||||||
'CssProcessor': 'CSSProcessor',
|
'CssProcessor': 'CSSProcessor',
|
||||||
'JsEngine': 'JSEngine',
|
'JsEngine': 'JSEngine',
|
||||||
'ApiClient': 'APIClient',
|
'ApiClient': 'APIClient',
|
||||||
'UrlHandler': 'URLHandler',
|
'UrlHandler': 'URLHandler'
|
||||||
'DocumentControlsLegacy': 'DocumentControlsLegacy'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
component_name = acronym_mappings.get(component_name, component_name)
|
component_name = acronym_mappings.get(component_name, component_name)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TestComponentListing:
|
|||||||
'EditControl': 'js/controls/edit-control.js',
|
'EditControl': 'js/controls/edit-control.js',
|
||||||
'DebugControl': 'js/controls/debug-control.js',
|
'DebugControl': 'js/controls/debug-control.js',
|
||||||
'DebugPanel': 'js/components/debug-panel.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',
|
'SectionManager': 'js/core/section-manager.js',
|
||||||
'DOMRenderer': 'js/components/dom-renderer.js'
|
'DOMRenderer': 'js/components/dom-renderer.js'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user