Purpose
- Remove unused components, fix one code smell which looks like an unused component because of it
Objectives
Less unused code lines.
Description
Remove 3 unused components and their now-unused imports, fix 1 code smell
google-ad (GoogleAdElement.ts) — deleted
Direct Google AdSense integration that predated the Playwire RAMP migration. No code in the current codebase references adsbygoogle, <google-ad>, or GoogleAdElement — zero traces of AdSense remain. All ad serving goes through Playwire's window.ramp API (spaAddAds, addUnits).
matchmaking-button (Matchmaking.ts) — deleted
An unused Lit component sitting alongside the active matchmaking-modal in the same file. The actual ranked flow is:
- "Ranked" button rendered in
GameModeSelector.ts:228-232 (desktop) and :147-151 (mobile)
- Click calls
openRankedMenu() (:248) → window.showPage("page-ranked") → opens <ranked-modal>
- Clicking 1v1/2v2 dispatches
open-matchmaking → opens <matchmaking-modal> directly
MatchmakingButton was never imported or instantiated anywhere.
news-button (NewsModal.ts) — deleted
An unused Lit component alongside the active news-modal. The actual News button is in DesktopNavBar.ts:78-84 and MobileNavBar.ts:101, both with data-page="page-news" which routes to <news-modal> via the modal router. NewsButton was never imported, instantiated, or placed in the DOM.
main-radial-menu (MainRadialMenu.ts) — fixed code smell
Extended LitElement with @customElement("main-radial-menu") but had no render() method — all rendering was delegated to a separate RadialMenu Controller. Never used as a DOM custom element (no template usage, never dynamically appended). Only ever instantiated via new MainRadialMenu(...) in GameRenderer.ts:301 and used through the Controller interface. Removed the LitElement/@customElement baggage since they were misleading dead weight.
Removals from LangSelector.ts
Both "matchmaking-button" and "news-button" were listed in the components array used for i18n re-rendering (:287-293). Since these elements never exist in the DOM, querySelectorAll returned empty for them — harmless but misleading. Removed.
Assignment
tryout33
Purpose
Objectives
Less unused code lines.
Description
Remove 3 unused components and their now-unused imports, fix 1 code smell
google-ad(GoogleAdElement.ts) — deletedDirect Google AdSense integration that predated the Playwire RAMP migration. No code in the current codebase references
adsbygoogle,<google-ad>, orGoogleAdElement— zero traces of AdSense remain. All ad serving goes through Playwire'swindow.rampAPI (spaAddAds,addUnits).matchmaking-button(Matchmaking.ts) — deletedAn unused Lit component sitting alongside the active
matchmaking-modalin the same file. The actual ranked flow is:GameModeSelector.ts:228-232(desktop) and:147-151(mobile)openRankedMenu()(:248) →window.showPage("page-ranked")→ opens<ranked-modal>open-matchmaking→ opens<matchmaking-modal>directlyMatchmakingButtonwas never imported or instantiated anywhere.news-button(NewsModal.ts) — deletedAn unused Lit component alongside the active
news-modal. The actual News button is inDesktopNavBar.ts:78-84andMobileNavBar.ts:101, both withdata-page="page-news"which routes to<news-modal>via the modal router.NewsButtonwas never imported, instantiated, or placed in the DOM.main-radial-menu(MainRadialMenu.ts) — fixed code smellExtended
LitElementwith@customElement("main-radial-menu")but had norender()method — all rendering was delegated to a separateRadialMenuController. Never used as a DOM custom element (no template usage, never dynamically appended). Only ever instantiated vianew MainRadialMenu(...)inGameRenderer.ts:301and used through theControllerinterface. Removed theLitElement/@customElementbaggage since they were misleading dead weight.Removals from
LangSelector.tsBoth
"matchmaking-button"and"news-button"were listed in thecomponentsarray used for i18n re-rendering (:287-293). Since these elements never exist in the DOM,querySelectorAllreturned empty for them — harmless but misleading. Removed.Assignment
tryout33