fix: add status message element and fix column resizing bug
This commit fixes two bugs: 1. Issue #7: Missing status message DOM element - Added #status-message div to index.html - Added CSS styling with type-based classes (info, success, error) - Enhanced showMessage() to apply type classes for visual styling - Messages auto-hide after 3 seconds with fade-in animation 2. Column resizing visual bug: - Changed grid-template-columns from flexible (1fr 3fr 1fr) - To fixed minimum widths: minmax(200px, 250px) minmax(600px, 3fr) minmax(200px, 250px) - Prevents columns from resizing when content changes (captured pieces, move history) - Maintains stable layout throughout gameplay Tests: - Added status-message.test.js with 10 test cases - Added column-resize.test.js with 8 test cases - Tests verify DOM element existence, CSS styling, auto-hide behavior, and layout stability 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
e4af7d3e53
commit
fb96963b48
@@ -245,6 +245,9 @@ class ChessApp {
|
||||
console.warn('Status message element not found, using console:', message);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add type class for styling
|
||||
statusMessage.className = `status-message ${type}`;
|
||||
statusMessage.textContent = message;
|
||||
statusMessage.style.display = 'block';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user