6617 Commits

Author SHA1 Message Date
Guangcong Luo
e47b8be410 Fix build
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2026-09-11 22:51:35 -07:00
Guangcong Luo
b83967e980 Preact minor updates batch 48
- Fix parsing of bolded text in battles
- Fix teambuilder result issue
- Fix Register button
- Fix Pursuit activation message grouping
- Fix base species name in Teambuilder
- Fix build error
2026-09-11 22:22:14 -07:00
Guangcong Luo
1e3b209011 Update for new server TL system
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
Update for https://github.com/smogon/pokemon-showdown/pull/12299
2026-09-09 15:48:10 -07:00
André Bastos Dias
afa9d4ae64 Teambuilder: Fix header's Ability column to match whether abilities are shown in result rows (#2750)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-09-08 06:46:30 -07:00
Guangcong Luo
eeaec53202 Preact minor updates batch 47
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- Show a "Language room" section for the current language, above
  all other chatrooms.
- Cachebust translations
- Properly fall back to English when translations don't exist
- Fix an oldclient translation regression
- Fix Options popup width bouncing around because of the overlay's
  scrollbar
- Support better article contraction for European languages
- Fix topbar overflowing on mobile layout
- Bump cookie expiration
2026-09-04 09:50:38 +00:00
HiZo
122b015ff6 Remove auto-0 Atk IVs for No Holds Barred (#2747)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-09-02 01:05:13 -06:00
Guangcong Luo
951cc1580b Support translating Preact client (#2742)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
Client-side counterpart to https://github.com/smogon/pokemon-showdown/pull/12259

Basically everything important is translatable now.

This involved a ton of refactors for translatability.

This also changes the client so it defaults to the browser's default language,
instead of defaulting to English.

Actual translations coming in a separate PR (for ease of reviewing).
2026-08-31 17:54:11 -07:00
Karthik99999
44a0ccde82 Fix old unboost -fail messages
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-08-27 11:59:41 -07:00
Guangcong Luo
8aac6055f1 Support translated battles (#2740)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-08-22 20:34:58 -07:00
Guangcong Luo
ac7d535b28 Fix "lines from user hidden" in wrong place
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
They could show up in places like the turn counter.
2026-08-22 11:51:10 +00:00
shrianshChari
8037bf4943 Rename poisonwisp to purplewisp (#2738)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-08-21 14:06:39 -07:00
Guangcong Luo
daa28cfeb1 Preact minor updates batch 45
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- Support new Team Preview choice protocol
- Fix contentEditable cursor reset on blur+refocus
  - (Unfocusing and focusing would reset the textbox cursor position)
- Fix horizontal movement having precedence over selection and sliders
  in mobile
  - (You couldn't modify selections or drag sliders because it would
    slide open the menu instead)
- Fix build error
  - (Replays no longer has a custom build path)
- Don't apply "Zoom out forms" setting to import/export tab
2026-08-15 08:29:35 +00:00
fish
ce0f0d36fd Round HP percentage up for formats with HP Percentage Mod (#2726)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-08-11 11:44:43 -07:00
QuiteQuiet
218cc77951 Update OLT ladder id (#2727)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-08-02 08:34:06 -04:00
Guangcong Luo
c24f883a5b Preact minor updates batch 45
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- Fix unknown sprite orientation
  - Apparently some people care more about the facing direction than
    the backwards question mark. I remember fixing it in the past but
    apparently someone reverted it without telling me, because of
    complaints?
- Fix team dropdown
  - Fix widths
  - Don't show boxes, only real teams
- Fix Revival Blessing UI
- Add tests for the Revival Blessing and earlier choice parsing changes
- Improve battle UI
  - Change "Back" button and `/undo` to go "back one step" instead of
    cancelling everything
  - Improve Team Preview UI
    - now says how many pokemon you need to pick
    - chosen team is shown on one line
    - chosen team isn't disabled (clearer that it's clickable)
  - Fix "Side by side, overlay controls" width
- Consistently use `errorReply` for command errors
2026-07-28 09:25:00 +00:00
Guangcong Luo
aa8445fca5 Support config/servers.json and news.json
This is the first step in replacing them (#2723). Since this step
doesn't involve any breaking changes, I'm just pushing it directly.

At some point, you will want to run:

    php build-tools/config-to-json.php

to migrate your own files over. It only needs to be run once, at any
time, though.
2026-07-28 09:12:03 +00:00
Guangcong Luo
94ebd6bcde Migrate replay management to New Replays
This involved redesigning the left-right scroll system on low-height
displays a little bit
2026-07-28 01:11:02 +00:00
Guangcong Luo
11deab22f6 Preact minor updates batch 44
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- Fix `/user` command
- Fix notification count including currently focused room
- Normalize error messages (Firefox doesn't include them in error.stack)
- Destroy rooms after leaving them (fixes a Showdex compat issue)
- Fix notifications when unloading
- Fix battle width when set to mobile layouts
2026-07-27 00:54:14 +00:00
Guangcong Luo
10737b6a96 Preact: Fix battle state notifications
- Battles should keep the notification up even after focus, as long as
  you still need to make a choice in your battle.
- Battles should not notify unless there's actually something for you
  to do.
- Support |sentchoice|
2026-07-27 00:43:39 +00:00
Marty-D
d2a8daf9d7 Add new avatar credits 2026-07-26 20:42:20 -04:00
PartMan
5df874d5b3 Preact: Don't hop rooms with alt+shft+arrow if there's something typed (#2722)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2026-07-25 15:36:23 -07:00
Guangcong Luo
2a51330880 Fix Teams
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- Fix Replay link
- Fix team display
- Fix lint issues
- Make Back button easier to click
2026-07-23 23:41:16 +00:00
Guangcong Luo
079dfb3739 Migrate teams/replays away from .template.html
(`wrapper.inc.template.php` remains, because that's from the old
replays/manage, and I'm gonna just rewrite that soon.)
2026-07-23 19:55:08 +00:00
Mia
0de9c6a79b Teams: left-align sprites, add home sprites option 2026-07-23 19:44:23 +00:00
Guangcong Luo
c708f90ea3 Preact minor updates batch 43
- Automatically open newly created teams
2026-07-23 01:06:04 +00:00
Guangcong Luo
98ebe25f14 Update cachebusting system for Replays/Teams 2026-07-23 01:06:04 +00:00
Karthik99999
92c3832c49 Tooltips: Fix speed ranges in Random Doubles Battle
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-22 10:14:54 -04:00
Guangcong Luo
2d2a39387a Preact: Redesign user moderation buttons
Supersedes #2662
2026-07-22 10:22:09 +00:00
Guangcong Luo
38c0608e30 Preact: Support old mobile battle layout
This isn't too hard to support and quite a few people have been asking
for it, so...
2026-07-22 07:11:20 +00:00
Guangcong Luo
d15e7a50f7 Preact: Improve teambuilder
- Make team tiles as wide as old teambuilder
- Add compact/comfortable chooser
- Add zoomed out option on mobile
- Adjust teambuilder width for slightly more space
- Fix trailing spaces getting trimmed while inputting team name
- Make drag-rearranging easier to see
- Fix scrolling long lists of teams on older browsers
- Fix copy/delete button alignment on mobile
2026-07-22 07:11:20 +00:00
Guangcong Luo
4d88e1df71 Preact minor updates batch 42
- Improve type icon readability
  - I can't believe `-webkit-text-stroke` has been Baseline since 2019
    and no one's bothered to standardize it
- Fix pasting in Firefox
- Fix text box height in older browsers
- Fix favicon notifying
- Fix custom avatars in replays
- Fix unknown avatars being horizontally flipped
- Move "Offer Tie" button to "This battle" section of Battle Options,
  and add a "Forfeit" button
- Fix select menu readability in Chrome Windows
- Fix color of "Add status" text box in light mode
- Fix clicking on filters in teambuilder search
- Fix Imprison preventing cancel in FFA
- Fix bandwidth usage when clicking yourself
- Fix uhtml notifying outside of DMs
2026-07-22 07:11:20 +00:00
Guangcong Luo
082b834351 Update Replays for new loginserver endpoints
This should drastically help with server performance, considering these
are the URLs that keep getting hammered by scrapers.
2026-07-18 23:17:35 +00:00
Guangcong Luo
d663b732e7 Redesign team tiles
Team names are now below pokemon icons. Yeah, I know, it's going to be
an annoying adjustment.

In my defense:
- "text below icon" is how basically everything works
- this works a lot better in dark mode, because the text prefers a dark
  background and the pokemon prefer a light background

Anyway. I've also been fiddling with dark mode icons.

This all started when I tried to give battle-log.css access to the
`.select` class. Which meant that my Preact client changes had to get
propagated to oldclient. Which meant suddenly _everyone_ had lots of
opinions about how teams look in dark mode.

So, yeah. This is my current design. More people have said they like
it than dislike it. So we're doing this, I guess.
2026-07-18 23:17:35 +00:00
Guangcong Luo
7291292487 Preact minor updates batch 41
- Fix team selector
- Add connection state to panel debug menu
- Make battle logs semitransparent (like chat logs)
- Update how connection errors are displayed
- Update chat log scroll position on resize
- Fix zooming in on Safari causing flickering
- Fix popup positioning (again)
- Fix tournament team alignment
- Add `/news` as an alias for `/j news`
  - (Parity with oldclient)
- Fix avatar persistence
- Make pokemon in dark mode team selectors more readable
- Fix inputlog warning in Replays
- Lazy windowing in teambuilder (should improve perf for people with
  tons of teams)
- Bump cookie expiration
- Center tournament banners
2026-07-18 02:57:19 +00:00
Mia
085dfabd9b Remove privacy toggle in immediate team upload button
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-16 23:21:54 -05:00
Mia
685e5018ce Add a toggle for syncing remote teams to device 2026-07-16 22:14:06 -05:00
Mia
3daddad0bf Use data-select to define button type instead of type attr
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-13 00:06:19 -05:00
Guangcong Luo
036901eacd Preact minor updates batch 40
- Redesign selects - all selects now look like the format/team selects
  - This should help them look different from buttons. I'm mulling a
    further redesign that makes them look more like textboxes
  - Format/team selects also have been redesigned in dark mode to look
    more actually dark
- Fix reconnecting after initial connection failed
  - There are several fixes here from logic errors, the big one being:
  - Redesign how we store connection state. room.canConnect and
    room.connectWhenLogged in, as well as a lot of what was in
    room.connected, are now combined into a new room.connectMode.
- Remove the unnecessary Room model in the Resources room
- Teambuilder: Don't redo search when blurring/refocusing
- Stop opening context menu or selecting text when long-tapping a
  pokemon on mobile to open a tooltip
- Support scrolling when dragging any part of the battle on mobile
- Fix UI jumping around when opening an on-screen keyboard
  - This prevented chatting in battles in mobile
  - Caused by using `window.inner*` everywhere
- Fix incorrect focused room when opening DMs from user popups
  - Could lead to Esc closing the wrong thing
- Unify the debug commands into `/debug`
  - Also add a panel state debugger
- Fix dark mode avatar chooser
- Add new `textbox-singleline` and `textbox-subtle` classes
  - `textbox-subtle` looks like regular text until moused over or
    focused, at which point it looks like a textbox
  - `textbox-singleline` makes a textarea that expands horizontally
    as well as vertically
- Redesign status editing experience
- Fix support for dead keys in text editor
- Fix crash when opening replays inside PS
- Fix support for <formatselect> as used in <<view-teams-searchpublic>>
2026-07-13 05:00:29 +00:00
iforgetwhyimhere
0696269f77 Assume neutral Natures in Random Battles (#2718)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-10 16:09:01 -05:00
Guangcong Luo
08f276ac44 Preact minor updates batch 39
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
- Fix Firefox height
- Fix moves being incorrectly disabled in doubles
- Fix accepting challenges with custom rules
- Correctly calculate chat box width
- Fix a bunch of bugs around battle reconnecting
  - This involved a refactor of how `room.connected` is treated
- Fix layout width calculation
  - This fixes popups being in the wrong place
- Change thresholds for which layouts are used
  - We no longer use always-visible vertical tabs at any width, width
    is just too precious. It's still used for very low heights, though.
- Change Options to say what the automatic layout would be
- Fix horizontal tab layout to show the overflow in the right place
  - Now tabs stretch all the way to the left side of your username
- Make horizontal tab layout stretch over the username in the userbar
  - Maximum space for all your tabs!
- Don't wrap the nav preview in text boxes
2026-07-10 10:09:38 +00:00
Guangcong Luo
24b86547c0 Preact: Support low-height screens
We now have like six possible battle layouts depending on the exact
height and width of your screen. You can also manually choose them.

The original low-height screen UI ("overlay controls") have been
completely redesigned, and the controls are now centralized in the
bottom right, much like the modern games. It should be much nicer
to play in horizontal phone mode now.

A variety of other resolutions are also supported now, including some
very weird ones.
2026-07-10 09:43:04 +00:00
Guangcong Luo
2f397246a7 Preact: Stop using new export format
It was a really nice dream. But the new export format was unable to
justify itself, so we're going back to the old one.
2026-07-09 09:06:39 +00:00
Guangcong Luo
68b7a81d6a Preact: Drop CSS scroll snap and contentEditable
CSS scroll snap is no longer used at all. I'm keeping the code around
for now, but the scroll snap is now being implemented 100% in
JavaScript, which basically every mobile browser likes at least a
little better.

We are no longer fighting tons of browser bugs every time we focus a
text box, and I actually haven't found even a minor usability issue
with lots of testing on Android and iOS.

contentEditable is no longer used on mobile. Even in 2026
contentEditable is too buggy on mobile for me to keep around.
2026-07-09 09:06:39 +00:00
Guangcong Luo
f202d9bfed Preact minor updates batch 38
- Remove code for wizard editor
- Refactor more code into dex-search and searchresults
- Fix a focus bug in testclient
- Rename client.css -> oldclient.css
- Fix insecure.psim.us #2652
- Fix Firefox sending mouseover events for taps on other things
- Fix immunity tooltips for Gen 1
- Fix forms sent from the server
- Fix modal popup positioning
- Teambuilder: Fix result list windowing at boundary conditions
- Teambuilder: Improve keyboard accessibility for windowing
  - In theory this should improve screenreader support
2026-07-09 09:06:39 +00:00
ShivaD173
c91d191803 Champions: Add Natures from OTS to tooltips (#2705)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-08 15:10:50 -05:00
ry
2b45bf167b Fix weather ball display (#2709)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2026-07-03 06:57:40 -07:00
Alex Párraga Ferrer
f789748b2f Battles: Disable autocomplete on username-prefix search (#2716) 2026-07-03 06:53:34 -07:00
Guangcong Luo
7f412980e0 Preact minor updates batch 37
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
- Teambuilder: Support folders on mobile
- Teambuilder: Fix needing two clicks to select item/ability/move
- Teambuilder: Importing set before selecting species
- Teambuilder: Fix set list -> set editor animation
- Teambuilder: Refactor more stuff into dex-search and searchresults
- Support joining replays from server message
- Fix battle width on mobile being wrong when switching rooms
- Fix forfeit dialog when leaving expired room
- Improve phrasing in battles
- Support dismissing locked tooltips with Esc or clicking outside them
- Move Battle Options and Timer buttons, so that the Timer button
  doesn't cover up anything important on mobile
2026-07-03 03:40:47 +00:00
Guangcong Luo
969654a714 Preact: Improve scroll location for team copy/move
This makes it so when you click the copy/move button, the team you
copied/moved will stay in the same place, so it's easier to orient
yourself for where you want to move things to.
2026-07-01 12:20:58 +00:00
Guangcong Luo
1d6489fce6 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
2026-07-01 12:19:52 +00:00