From 1d6489fce61885f199302742f98b60f63f1faf33 Mon Sep 17 00:00:00 2001
From: Guangcong Luo
Date: Mon, 29 Jun 2026 14:50:03 +0000
Subject: [PATCH] Preact minor updates batch 36
- Fix oldclient textbox size
- Highlight changed lines in "Compare" popup
- Update README to prioritize Preact client
- Fix importing uploaded teams
- Fix room width calculation
- Resizing incorrectly calculated width sometimes
- Now hardcodes specific breakpoints for re-rendering everything
- Fix scrolling on older WebKit
- Fix radio button keyboard accessibility
- Left/Right now change radio buttons
- Fix support for bad server code around bad room IDs
- At this point, `view-[not a room ID]` needs to be treated as a
valid room ID for anything to work correctly :(
- Support `|cantleave|` and `|allowleave|` in custom roomgames
- Work around Showdex using the deprecated `semimodal-popup`
room-location type
- Teambuilder: Improve form readonly mode
- Teambuilder: Fix styling on Firefox
- Teambuilder: EV slider on mobile
- Teambuilder: Add +/- nature buttons on mobile
---
README.md | 26 +++---
.../src/battle-team-editor.tsx | 72 ++++++++++++---
play.pokemonshowdown.com/src/client-main.ts | 60 ++++++++++---
play.pokemonshowdown.com/src/panel-battle.tsx | 12 ++-
play.pokemonshowdown.com/src/panel-chat.tsx | 2 +-
.../src/panel-mainmenu.tsx | 1 +
play.pokemonshowdown.com/src/panel-popups.tsx | 2 +-
.../src/panel-teambuilder-team.tsx | 90 ++++++++++++++++++-
.../src/panel-teambuilder.tsx | 18 +++-
play.pokemonshowdown.com/src/panel-topbar.tsx | 6 +-
play.pokemonshowdown.com/src/panels.tsx | 11 ++-
play.pokemonshowdown.com/style/battle-log.css | 7 +-
play.pokemonshowdown.com/style/battle.css | 2 +-
play.pokemonshowdown.com/style/client.css | 1 +
play.pokemonshowdown.com/style/client2.css | 6 --
.../style/teambuilder.css | 35 ++++++++
16 files changed, 287 insertions(+), 64 deletions(-)
diff --git a/README.md b/README.md
index ac02c2e5c..2c54e509e 100644
--- a/README.md
+++ b/README.md
@@ -45,18 +45,15 @@ New client
Development is proceeding on the client rewrite! The live version is
available at https://play.pokemonshowdown.com/beta
-You can contribute to it yourself using the same process as before, just
-use `testclient-new.html` rather than `testclient-old.html`.
-
-Testing (the old client)
-------------------------------------------------------------------------
-
Client testing requires a build step! Install the latest Node.js (we
require v20 or later) and Git, and run `node build` (on Windows) or `./build`
-(on other OSes) to build.
+(on other OSes) to build after each change.
+
+(This will do a fast build with no checks. For tests, linting, and
+typechecking, you'll want to do `npm test` separately.)
You can make and test client changes simply by building after each change,
-and opening `play.pokemonshowdown.com/testclient-old.html`. This will allow you
+and opening `play.pokemonshowdown.com/testclient-new.html`. This will allow you
to test changes to the client without setting up your own login server.
### Test keys
@@ -65,9 +62,8 @@ For security reasons, browsers [don't let other websites control PS][5], so
they can't screw with your account, but it does make it harder to log in on
the test client.
-The default hack makes you copy/paste the data instead, but if you're
-refreshing a lot, just add a `config/testclient-key.js` file, with the
-contents:
+If you need a logged-in account, add a `config/testclient-key.js` file, with
+the contents:
const POKEMON_SHOWDOWN_TESTCLIENT_KEY = 'sid';
@@ -78,21 +74,19 @@ grab it from:
Make sure to put it in `config/` and not `play.pokemonshowdown.com/config/`.
-(This is the only supported method of logging in on the beta testclient.)
-
[5]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
### Other servers
You can connect to an arbitrary server by navigating to
-`testclient-old.html?~~host:port`. For example, to connect to a server running
-locally on port 8000, you can navigate to `testclient-old.html?~~localhost:8000`.
+`testclient-new.html?~~host:port`. For example, to connect to a server running
+locally on port 8000, you can navigate to `testclient-new.html?~~localhost:8000`.
**NOTE**: Certain browsers will convert `'?'` to `'%3F'` when reading files off
of the local filesystem. As a workaround, try using a different browser or
serving the files locally first (ie. run `npx http-server` from the
directory this README is in, then navigate in your browser to
-`http://localhost:8080/testclient-old.html?~~localhost:8000`).
+`http://localhost:8080/testclient-new.html?~~localhost:8000`).
### Limitations
diff --git a/play.pokemonshowdown.com/src/battle-team-editor.tsx b/play.pokemonshowdown.com/src/battle-team-editor.tsx
index 516d9f061..5ac160e14 100644
--- a/play.pokemonshowdown.com/src/battle-team-editor.tsx
+++ b/play.pokemonshowdown.com/src/battle-team-editor.tsx
@@ -2501,7 +2501,7 @@ class TeamWizard extends preact.Component<{
Undo delete