Commit Graph

15 Commits

Author SHA1 Message Date
177d5cdf69 feat: integrate advanced control panels with feature toggles
Added feature toggle system to TestDriveJSUI library:

Integration:
- Added control configuration (editControl, statusControl, contentsControl, debugControl)
- Added compass positioning configuration (nw, ne, e, se, s, sw, w)
- Implemented initializeAdvancedControls() method
- Updated destroy() to clean up all control panels
- Maintained backward compatibility with simple controls

Configuration:
- controls.editControl (default: true)
- controls.statusControl (default: true)
- controls.contentsControl (default: true)
- controls.debugControl (default: false)
- controls.simpleControls (default: false) - legacy mode

Usage:
new TestDriveJSUI({
    container: '#editor',
    controls: {
        editControl: true,
        statusControl: false,
        contentsControl: true
    }
});

This integrates the existing advanced control system (ControlBase, EditControl,
StatusControl, ContentsControl, DebugControl) into the new library API.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 13:50:31 +01:00
7759f9e427 feat: add single-file standalone editor
Created full-editor-standalone.html that embeds all JavaScript inline.
This file can be copied anywhere and opened directly without needing
any other files or dependencies (except marked.js from CDN).

Perfect for distribution and testing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 13:24:43 +01:00
796c04709a feat: implement JavaScript-first TestDriveJSUI library (v1.0.0)
Completed Phase 1 refactoring to JavaScript-first architecture:

Core Library Implementation:
- Created js/testdrive-jsui.js main library class
- Integrated all existing components (SectionManager, DOMRenderer, DocumentControls)
- Added marked.js integration for markdown rendering
- Implemented event-driven API (on/off/emit)
- Support for edit/view modes and themes
- LocalStorage save/load functionality
- Download as markdown file
- Keyboard shortcuts (Ctrl+S, Escape)
- Auto-save capability (optional)

Examples:
- examples/full-editor.html - Complete demo with all features
- Updated examples/README.md with full documentation

Documentation:
- Updated README.md with JavaScript-first architecture section
- Added complete API reference (constructor, methods, events)
- Updated CLAUDE.md with library quick start and API
- Emphasized JavaScript-first design principles

Architecture:
- JavaScript provides ALL functionality
- Language adapters are optional integration helpers
- Works standalone in browser (no backend required)
- Clean separation: JS (functionality) vs Adapters (integration)

This completes the architectural shift documented in ARCHITECTURE.md
and JS_FIRST_REFACTORING.md Phase 1.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:14:58 +01:00
b84770e2d3 feat: add standalone JavaScript proof of concept
Created examples/standalone.html demonstrating testdrive-jsui as a pure
JavaScript library that works without any backend.

Features:
- Opens directly in browser (file:// works)
- Markdown rendering using marked.js from CDN
- Save/load content to browser localStorage
- Download markdown files
- No Python/Ruby/Java required

Validates JavaScript-first architecture:
- All rendering happens in browser
- Backend adapters are truly optional
- Zero coupling to any specific backend

Added examples/README.md:
- Usage instructions (just open in browser!)
- Architecture validation notes
- Next steps for full implementation

This proves the concept that testdrive-jsui can be a standalone
JavaScript library with language adapters being optional integration
helpers, not core functionality providers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:06:50 +01:00
ab4679126e docs: establish JavaScript-first architecture and refactoring plan
Clarified that testdrive-jsui is a JavaScript library with optional
backend adapters, not a Python package with JavaScript assets.

Added ARCHITECTURE.md:
- Core principle: JavaScript provides all functionality
- Python/Ruby/Java are integration adapters only
- Clear layer separation: JS library vs language adapters
- Distribution models: CDN, npm, with adapters
- Anti-patterns to avoid
- Success metrics

Added JS_FIRST_REFACTORING.md:
- Phase 1: Create standalone JavaScript bundle
- Phase 2: Refactor Python as thin adapter
- Phase 3: Build and distribution
- Concrete implementation steps with code examples
- Timeline: 2-4 days of focused work

Key Changes in Approach:
- JavaScript does ALL rendering (using marked.js)
- Backend adapters only serve assets and pass config
- No HTML generation in Python/Ruby/Java
- Library works completely standalone in browser

This establishes foundation for true language-agnostic design.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 12:04:12 +01:00
1fe4b6b9fa 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>
2025-12-16 11:43:42 +01:00
6a6543228a docs: add cleanup report and standalone reusability plan
Added comprehensive documentation for post-migration cleanup and future
standalone development:

- CLEANUP_REPORT.md: Identifies 6 cleanup opportunities after migration
  completion (empty dirs, legacy wrappers, relicts, documentation updates)

- STANDALONE_PLAN.md: 5-phase plan to achieve 95% standalone maturity
  (move rendering engine to capability, create examples, update docs,
  testing, PyPI distribution)

- CLAUDE.md: Updated with migration completion status

These documents provide clear roadmap for making testdrive-jsui truly
pip-installable and reusable independently from MarkiTect.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 11:10:56 +01:00
f5ce02cf8d docs: Complete Phase 4 migration documentation
Update documentation to reflect Phase 4 completion:
- Mark Phase 4 as complete in MIGRATION_STATUS.md
- Update executive summary with Phase 4 achievements
- Update CLAUDE.md migration status to reflect all phases complete
- Document removal of 29 legacy files
- Establish single source of truth: /capabilities/testdrive-jsui/js/

Phase 4 Cleanup Summary:
-  Removed /markitect/static/js/ directory (all JS files)
-  Removed /markitect/static/editor.js (unused)
-  Preserved /markitect/static/css/ (still in use)
-  Clean codebase with no duplicate JavaScript files

Migration Status: FULLY COMPLETE - All 4 phases done

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 10:26:46 +01:00
891d785533 Complete Phase 1 & 3: TestDrive-JSUI capability migration
Phase 1 - File Migration:
- Copy missing files to capability (document-controls.js, test-document-navigator.js)
- Create legacy compatibility wrapper (document-controls-legacy.js)
- Install jest-environment-jsdom dependency
- All 84 automated tests passing (68 JS + 15 Python + 1 fixes)

Phase 3 - Template Updates:
- Update MIGRATION_STATUS.md with Phase 3 completion status
- Update CLAUDE.md with migration completion details
- Document verification results for both view and edit modes

Migration Status:
- All 24 original JavaScript files now in capability 
- File verification: 20 identical, 4 intentionally different 
- Test coverage: 59.11% (exceeds 58% requirement) 
- Ready for Phase 4 cleanup after verification period

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 10:19:56 +01:00
9d7964f9e5 feat: add refactored testdrive-jsui capability with consolidated architecture
Complete integration of refactored testdrive-jsui capability:

## Refactored Architecture
- js/ - All JavaScript source (controls, components, core)
- static/ - CSS, images, templates
- src/testdrive_jsui/ - Python package
- tests/ - Python tests

## Plugin Self-Declaration
- get_plugin_source_dir() - plugin declares own location
- get_asset_paths() - organized asset paths
- No hardcoded discovery logic

## Merged Content
- Baseline UI scaffold (tutorials, LICENSE, INTRODUCTION.md)
- Refactored capability implementation
- Comprehensive documentation

Ready for standalone use or integration with markitect.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:01:58 +01:00
7ef23c2905 chore: Fixed line endings i tutorials and provided Introduction 2025-11-03 21:46:15 +01:00
03656a1f19 doc: Tutorials for new users 2025-11-03 21:36:45 +01:00
9fbd10ffbc churn: enabling deterministic install 2025-11-03 20:52:12 +01:00
63a59377b8 init: seeding the project repo 2025-11-03 20:28:51 +01:00
Coulomb Social
5d56e62051 Initial commit 2025-11-03 19:19:47 +00:00