Skip to content

Refactor UI and optimize CSS for legacy and modern support#76

Merged
L3P3 merged 14 commits into
masterfrom
wip
May 10, 2026
Merged

Refactor UI and optimize CSS for legacy and modern support#76
L3P3 merged 14 commits into
masterfrom
wip

Conversation

@L3P3

@L3P3 L3P3 commented May 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 10, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the in-game UI layout/styling to better support both modern and legacy rendering paths, adds SSR/legacy environment flags, and updates the build pipeline to use Bun while producing additional legacy/SSR artifacts.

Changes:

  • Refactored multiple UI components (window, menus, touch controls, inventory, terminal, bar/messages) to use new layout/styling and pass viewport dimensions through the UI tree.
  • Added LEGACY/SSR environment flags and legacy fallbacks (e.g., fetch_ XHR fallback, message rendering tweaks).
  • Updated build/docs to use Bun, generate legacy/SSR outputs, and simplified dependency list.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/os/c_window.js Adds SSR short-circuit path and shifts window positioning to left/top + viewport size propagation.
src/game/m_world_store.js Replaces rename-tracking globals with world_rename tuple for UI selection continuity.
src/game/m_game.js Improves pointer lock error handling and adds obsidian to placement restrictions.
src/game/c_touch.js Reworks touch controls markup/layout and sizes controls based on viewport width.
src/game/c_terminal.js Extracts static terminal UI and sizes input based on viewport width; adjusts menu classing.
src/game/c_settings.js Restructures settings UI into table layout; adds disabled/version display; uses Promise_resolve.
src/game/c_messages.js Adds legacy-specific message rendering/backdrop and adjusts filtering logic.
src/game/c_menu_start.js Major worlds menu refactor (table layout, inline world actions, blur/backdrop behavior, SSR handling).
src/game/c_inventory.js Reworks inventory UI to table layout, adds responsive sizing/centering using viewport dimensions.
src/game/c_game.js Introduces Surface component for canvas init and adds backdrop + viewport prop plumbing.
src/game/c_bar.js Converts hotbar to table layout and sizes/centers it based on viewport width.
src/game/c_app.js Threads viewport dimensions into MenuStart/Game and adds backdrop for settings view.
src/etc/locale.js Adds locale_disabled and consolidates version locale string.
src/etc/helpers.js Adds fetch_ legacy fallback, scrollIntoView_settings, and restores typed-array fill polyfill.
src/etc/env.js Adds LEGACY and SSR flags and reorders exported env constants.
src/etc/constants.js Adds ITEM_PALETTE_ROWS.
src/app.js Uses SSR env flag and refines key handler behavior for input focus.
src/app.css Large CSS refactor: adds blur/backdrop/window styling, rewrites menu/touch/messages/bar styling (with nesting).
README.md Updates setup/build instructions to Bun and updates tooling list.
package.json Bumps version, switches build script to Bun, removes CSS tooling deps.
locales/uk.csv Adds disabled and consolidates version key.
locales/tr.csv Adds disabled and consolidates version key.
locales/ru.csv Adds disabled and consolidates version key.
locales/hi.csv Adds disabled and consolidates version key.
locales/en.csv Adds disabled and consolidates version key.
locales/de.csv Adds disabled and consolidates version key.
build.js Moves CSS build to Bun.build, expands build matrix (legacy/SSR), tightens exec error handling, updates env generation.
app-prod-legacy.html Adds a legacy production entry HTML pointing at app-en-legacy.js and shared CSS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/game/c_game.js
Comment thread src/game/c_menu_start.js
@L3P3 L3P3 merged commit 1d2c507 into master May 10, 2026
1 check passed
@L3P3 L3P3 deleted the wip branch May 10, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants