Akki-jaiswal / Akki-jaiswal/pong-game

theme selection does not change UI; duplicate theme systems in code

オープン
#207 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
22
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

説明

Changing the Theme selector does not reliably update the UI. The codebase contains two different theme systems in the same module (class-based body classes and variables-only manager). They conflict and the main game page doesn’t consistently initialize a single theme manager.

Steps to Reproduce

Open the game.

Change the Theme dropdown to Neon Retro, Dark Mode, or Ocean Blue.

Expected Behavior
Body class/variables update and the canvas/control styles change immediately; choice persists across reloads.

Actual Behavior
Theme does not change or changes inconsistently.

Root Cause

theme.js defines two managers and two exports; both attempt to control theming.

The main page imports only the game script and may not initialize theming first
Proposed Fix

Choose one approach and remove the other (recommend keeping class-based manager that toggles body classes, aligned with themes.css).

Ensure index.html loads the theme script before the game script.

Keep localStorage persistence and sync selector value on load.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。