2025-10-09 17:29:57 -07:00
|
|
|
# MTG Python Deckbuilder ${VERSION}
|
|
|
|
|
|
2025-10-19 13:29:47 -07:00
|
|
|
## [Unreleased]
|
|
|
|
|
|
2025-10-06 14:12:17 -07:00
|
|
|
### Summary
|
2025-11-04 10:08:49 -08:00
|
|
|
Web UI improvements with Tailwind CSS migration, TypeScript conversion, component library, template validation tests, enhanced code quality tools, and optional card image caching for faster performance and better maintainability.
|
2025-10-19 13:29:47 -07:00
|
|
|
|
|
|
|
|
### Added
|
2025-11-04 10:08:49 -08:00
|
|
|
- **Template Validation Tests**: Comprehensive test suite ensuring HTML/template quality
|
|
|
|
|
- Validates Jinja2 syntax and structure
|
|
|
|
|
- Checks for common HTML issues (duplicate IDs, balanced tags)
|
|
|
|
|
- Basic accessibility validation
|
|
|
|
|
- Prevents regression in template quality
|
2025-10-31 10:11:00 -07:00
|
|
|
- **Code Quality Tools**: Enhanced development tooling for maintainability
|
|
|
|
|
- Automated utilities for code cleanup
|
|
|
|
|
- Improved type checking configuration
|
2025-10-28 08:21:52 -07:00
|
|
|
- **Card Image Caching**: Optional local image cache for faster card display
|
2025-10-29 10:44:29 -07:00
|
|
|
- Downloads card images from Scryfall bulk data (respects API guidelines)
|
2025-10-28 08:21:52 -07:00
|
|
|
- Graceful fallback to Scryfall API for uncached images
|
2025-10-29 10:44:29 -07:00
|
|
|
- Enabled via `CACHE_CARD_IMAGES=1` environment variable
|
|
|
|
|
- Integrated with setup/tagging process
|
|
|
|
|
- Statistics endpoint with intelligent caching (weekly refresh, matching card data staleness)
|
|
|
|
|
- **Component Library**: Living documentation of reusable UI components at `/docs/components`
|
|
|
|
|
- Interactive examples of all buttons, modals, forms, cards, and panels
|
|
|
|
|
- Jinja2 macros for consistent component usage
|
2025-10-28 08:21:52 -07:00
|
|
|
- Component partial templates for reuse across pages
|
2025-10-29 10:44:29 -07:00
|
|
|
- **TypeScript Migration**: Migrated JavaScript codebase to TypeScript for better type safety
|
|
|
|
|
- Converted `components.js` (376 lines) and `app.js` (1390 lines) to TypeScript
|
|
|
|
|
- Created shared type definitions for state management, telemetry, HTMX, and UI components
|
|
|
|
|
- Integrated TypeScript compilation into build process (`npm run build:ts`)
|
|
|
|
|
- Compiled JavaScript output in `code/web/static/js/` directory
|
|
|
|
|
- Docker build automatically compiles TypeScript during image creation
|
2025-10-19 13:29:47 -07:00
|
|
|
|
|
|
|
|
### Changed
|
2025-10-29 10:44:29 -07:00
|
|
|
- **Inline JavaScript Cleanup**: Removed legacy card hover system (~230 lines of unused code)
|
|
|
|
|
- **JavaScript Consolidation**: Extracted inline scripts to TypeScript modules
|
|
|
|
|
- Created `cardHover.ts` for unified hover panel functionality
|
|
|
|
|
- Created `cardImages.ts` for card image loading with automatic retry fallbacks
|
|
|
|
|
- Reduced inline script size in base template for better maintainability
|
2025-10-28 08:21:52 -07:00
|
|
|
- **Migrated CSS to Tailwind**: Consolidated and unified CSS architecture
|
|
|
|
|
- Tailwind CSS v3 with custom MTG color palette
|
|
|
|
|
- PostCSS build pipeline with autoprefixer
|
2025-10-29 10:44:29 -07:00
|
|
|
- Reduced inline styles in templates (moved to shared CSS classes)
|
|
|
|
|
- Organized CSS into functional sections with clear documentation
|
2025-10-29 15:45:40 -07:00
|
|
|
- **Theme Visual Improvements**: Enhanced readability and consistency across all theme modes
|
|
|
|
|
- Light mode: Darker text for improved readability, warm earth tone color palette
|
|
|
|
|
- Dark mode: Refined contrast for better visual hierarchy
|
|
|
|
|
- High-contrast mode: Optimized for maximum accessibility
|
|
|
|
|
- Consistent hover states across all interactive elements
|
|
|
|
|
- Improved visibility of form inputs and controls
|
2025-10-28 16:17:55 -07:00
|
|
|
- **JavaScript Modernization**: Updated to modern JavaScript patterns
|
2025-10-29 10:44:29 -07:00
|
|
|
- Converted `var` declarations to `const`/`let`
|
|
|
|
|
- Added TypeScript type annotations for better IDE support and error catching
|
|
|
|
|
- Consolidated event handlers and utility functions
|
2025-10-28 08:21:52 -07:00
|
|
|
- **Docker Build Optimization**: Improved developer experience
|
2025-10-29 10:44:29 -07:00
|
|
|
- Hot reload enabled for templates and static files
|
|
|
|
|
- Volume mounts for rapid iteration without rebuilds
|
2025-10-28 08:21:52 -07:00
|
|
|
- **Template Modernization**: Migrated templates to use component system
|
2025-10-31 10:11:00 -07:00
|
|
|
- **Type Checking Configuration**: Improved Python code quality tooling
|
|
|
|
|
- Configured type checker for better error detection
|
|
|
|
|
- Optimized linting rules for development workflow
|
2025-10-29 10:44:29 -07:00
|
|
|
- **Intelligent Synergy Builder**: Analyze multiple builds and create optimized "best-of" deck
|
|
|
|
|
- Scores cards by frequency (50%), EDHREC rank (25%), and theme tags (25%)
|
|
|
|
|
- 10% bonus for cards appearing in 80%+ of builds
|
|
|
|
|
- Color-coded synergy scores in preview (green=high, red=low)
|
|
|
|
|
- Partner commander support with combined color identity
|
|
|
|
|
- Multi-copy card tracking (e.g., 8 Mountains, 7 Islands)
|
|
|
|
|
- Export synergy deck with full metadata (CSV, TXT, JSON files)
|
|
|
|
|
- `ENABLE_BATCH_BUILD` environment variable to toggle feature (default: enabled)
|
|
|
|
|
- Detailed progress logging for multi-build orchestration
|
|
|
|
|
- User guide: `docs/user_guides/batch_build_compare.md`
|
|
|
|
|
- **Web UI Component Library**: Standardized UI components for consistent design across all pages
|
|
|
|
|
- 5 component partial template files (buttons, modals, forms, cards, panels)
|
|
|
|
|
- ~900 lines of component CSS styles
|
|
|
|
|
- Interactive JavaScript utilities (components.js)
|
|
|
|
|
- Living component library page at `/docs/components`
|
|
|
|
|
- 1600+ lines developer documentation (component_catalog.md)
|
|
|
|
|
- **Custom UI Enhancements**:
|
|
|
|
|
- Darker gray styling for home page buttons
|
|
|
|
|
- Visual highlighting for selected theme chips in deck builder
|
2025-10-19 13:29:47 -07:00
|
|
|
|
|
|
|
|
### Removed
|
|
|
|
|
_None_
|
|
|
|
|
|
|
|
|
|
### Fixed
|
2025-11-04 10:08:49 -08:00
|
|
|
- **Template Quality**: Resolved HTML structure issues
|
|
|
|
|
- Fixed duplicate ID attributes in templates
|
|
|
|
|
- Removed erroneous template block tags
|
|
|
|
|
- Corrected structure for HTMX fragments
|
2025-10-31 10:11:00 -07:00
|
|
|
- **Code Quality**: Resolved type checking warnings and improved code maintainability
|
|
|
|
|
- Fixed type annotation inconsistencies
|
|
|
|
|
- Cleaned up redundant code quality suppressions
|
|
|
|
|
- Corrected configuration conflicts
|
2025-10-19 13:29:47 -07:00
|
|
|
|
|
|
|
|
### Performance
|
2025-10-28 08:21:52 -07:00
|
|
|
- Hot reload for CSS/template changes (no Docker rebuild needed)
|
|
|
|
|
- Optional image caching reduces Scryfall API calls
|
|
|
|
|
- Faster page loads with optimized CSS
|
2025-10-28 16:17:55 -07:00
|
|
|
- TypeScript compilation produces optimized JavaScript
|
2025-10-17 16:17:36 -07:00
|
|
|
|
2025-10-18 21:32:12 -07:00
|
|
|
### For Users
|
2025-10-28 08:21:52 -07:00
|
|
|
- Faster card image loading with optional caching
|
|
|
|
|
- Cleaner, more consistent web UI design
|
|
|
|
|
- Improved page load performance
|
2025-10-28 16:17:55 -07:00
|
|
|
- More reliable JavaScript behavior
|
|
|
|
|
|
2025-10-19 13:29:47 -07:00
|
|
|
### Deprecated
|
|
|
|
|
_None_
|
|
|
|
|
|
|
|
|
|
### Security
|
|
|
|
|
_None_
|