Merged
Conversation
…eanup, etc; tweaks to image loading and caching
…e bugs identified through tests
Owner
Author
- Replace game/DLC-dependent color theming with a light/dark theme system that defaults to respecting the user's browser/OS preference (auto mode) - User can manually toggle between auto/light/dark modes via the new theme toggle button in the header - Refactor monolithic CSS into separate files (base, header, tables, components) with proper CSS custom property definitions - Add header colors and table header styling that works correctly in both light and dark modes - Add OS preference change listener for real-time theme updates in auto mode - Remove color customization from gameVersions, dlcOptions, and characters - Update HTML structure to have proper semantic header with theme toggle
- User's first load respects OS preference (auto mode) - First click enters explicit light or dark mode (opposite of current OS pref) - Subsequent clicks toggle cleanly between light and dark - Never cycle back to auto mode after user clicks - Button icon now consistently shows moon for light, sun for dark - Fixes 'inconsistent toggle' issue where icon would stay same between auto and light
…lumn visibility - Add ingredient selector sorting with 6 options (Default, Name, Health, Hunger, Sanity, Perish) - Save sort preferences to localStorage per picker - Improve ingredient selector UX: - Add max-height (400px) with scroll to prevent screen overflow - Increase spacing between items (6px gap + subtle shadows) - Redesign clear button as × in top-right corner - Enhance empty slot visuals with + icon over background texture - Add click-to-focus behavior for empty slots - Fix Discovery tab + slot to always appear at end (not stay in place) - Implement conditional Mode column visibility: - Hide Mode column in DST unless Warly is selected - Always show Mode column in other game modes - Add shouldShowModeColumn() and getAutoHideColumns() helper functions
…lity updates - Move shouldShowModeColumn() and getAutoHideColumns() to module level - Add updateAutoHide() method to tables for dynamic column config updates - Update modeRefreshers to refresh column visibility when mode changes - Fixes runtime error: 'getAutoHideColumns is not defined'
- Replace Icons/Names toggle button with Display Mode dropdown - Options: Display: Names, Display: Icons, Display: List - List mode shows one item per line with icon + name - Saves preference to localStorage per picker - Fix dropdown positioning using fixed positioning and getBoundingClientRect - Sort dropdown now properly aligns below sort button - Display mode dropdown aligns below its button - Filter type dropdown alignment improved - Improve control button styling: - Consistent padding (4px 8px) and border radius (3px) - Better opacity transitions (0.7 to 1.0 on hover) - Unified styling for all control buttons - Improved spacing (8px left margin) - Add list mode CSS styling: - Block display for one item per line - 24x24px icons with 8px right margin - 6px vertical padding for better touch targets - Enhanced dropdown styling: - Position fixed with z-index 10 - 4px 12px shadow for better depth - Smooth hover transitions
Contributor
There was a problem hiding this comment.
Pull request overview
This is a major v1.0.0 refactoring focused on improving maintainability, adding comprehensive test coverage, and modernizing the codebase infrastructure. The changes include splitting CSS into modular files, implementing a sprite sheet system for performance, refactoring the mode/character selection system, adding extensive test coverage, and establishing proper tooling (ESLint, Prettier, TypeScript checking).
Changes:
- Added comprehensive test suite covering recipe matching, consistency validation, and mode utilities
- Refactored mode system to separate game versions, DLC toggles, and character-specific mechanics using bitmasks
- Implemented sprite sheet generation for efficient image loading
- Split CSS into modular files (base, header, tables, components) with dark mode support
- Added development tooling: ESLint, Prettier, TypeScript checking, and CI/CD workflows
Reviewed changes
Copilot reviewed 27 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | TypeScript configuration for type checking JavaScript files |
| tests/recipe-matcher.test.js | Tests for recipe matching logic and accumulateIngredients function |
| tests/recipe-consistency.test.js | Validation tests for recipe requirements vs test functions |
| tests/mode-utils.test.js | Tests for mode/character selection and stat multipliers |
| scripts/server/hooks.json | Webhook configuration for automated deployment |
| scripts/server/deploy.sh | Deployment script for syncing to server |
| scripts/generate-sprites.js | Sprite sheet generator for optimized image loading |
| package.json | Added dev dependencies and npm scripts for development workflow |
| html/utils.js | Refactored image handling to use sprite sheets, exported accumulateIngredients |
| html/style/tables.css | Extracted table styling with sticky headers and sorting support |
| html/style/main.css | Now imports modular CSS files |
| html/style/header.css | Header and navigation styling with responsive design |
| html/style/components.css | Component styles for ingredient picker, filters, and buttons |
| html/style/base.css | Base styles, CSS variables, and dark mode support |
| html/style/background.svg | Removed (replaced with cleaner background approach) |
| html/mode-utils.js | New module for mode/character selection logic with bitmask filtering |
| html/index.htm | Restructured with semantic HTML and improved accessibility |
| html/functions.js | Added JSDoc types and modernized syntax |
| html/food.js | Implemented multi-mode system with @mode suffixes and overrides |
| html/constants.js | Reorganized constants and added character/version definitions |
| html/.http-server.json | Configuration for local development server |
| eslint.config.js | ESLint configuration focusing on code quality over formatting |
| .vscode/settings.json | VS Code tab size configuration |
| .prettierrc.json | Prettier formatting configuration |
| .prettierignore | Files to exclude from Prettier formatting |
| .gitignore | Simplified gitignore with essential entries |
| .github/workflows/deploy.yml | GitHub Actions workflow for deployment |
| .github/workflows/ci.yml | GitHub Actions workflow for CI checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main goals are to make the code base more maintainable, find possible bugs, and explore other improvements.