Commit Graph

21 Commits

Author SHA1 Message Date
Mia
fa99d0ee25
Add a resource page indexing all public commands (#2477)
* Add a resource page indexing all public commands

* Add preact
2025-07-22 13:51:10 -05:00
Guangcong Luo
0990e13c2d Preact minor updates batch 21
- Fix Rooms state when pressing Enter after searching
- Fix (workaround, but still) opening popups on testclient
- Fix team menu in challenge/search
- Change "Preact Alpha" to "Preact Beta"
- Support side servers

Teambuilder
- Fix Upload button and teambuilding links leaking through focus editor
- Use `inputmode="numeric"` for better number keyboard in phones
  - You can't type `+` or `-` on EVs on phones, but oh well, the Nature
    dropdown is good enough. I think it's worth it for easier EV inputs.

Trivial
- Align main menu battle search labels to the left
- Fix flicker when searching Rooms
- Hide "Open battles in right panel" option when it doesn't do anything
- Get rid of PSTeambuilder.*packTeam/export* in favor of Teams
2025-05-17 16:19:58 +00:00
Guangcong Luo
96fb9a314a Preact minor updates batch 18
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Minor
- Change long tap time to 500 (Fixes #2408)
  - A compromise between the old 350ms and the briefly newer 1000ms
  - long clicks are also back at 700ms

Teambuilder
- Redesign defensive coverage chart
- Fix in testclient
- Fix pop-outs in text editor
- Improve move selection
2025-05-07 18:04:00 +00:00
Guangcong Luo
5e3e017773 Preact: Add a new "wizard" teambuilder
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Major
- Team editor is now its own file, so that it can be used outside of PS.
- New wizard editor (more like old teambuilder)
- Text editor now supports undo
- Don't let species be cleared
- Finish pokemon/ability/item/move lists
  - Currently selected options are highlighted
  - Keyboard navigation
- Mobile support!
- Text editor now uses big icons on desktop
- With only a few remaining issues, we have reached parity with the old
  teambuilder.

Minor
- Fix links to abilities and moves
- New <ul class="tabbar"> CSS. Unfortunately not backportable, so it'll
  have to wait until Preact client is released before it can be used.
- Two-tone stats bar chart
- EV editor stub mobile support
2025-05-04 09:32:43 +00:00
Guangcong Luo
9df60bcb57 Preact minor updates batch 13
Minor
- Load UI before BattleLog (and thus Caja)
  - Remove BattleLog dependencies from panels and panel-mainmenu
  - We now have Preact as our only dependency for the first load
    - Load times should be really fast now.
    - I remember thinking about what the load screen would look like
      but how many people would even see it?
- Don't navigate chat history when cursor isn't on the first/last
  character
- Make the main menu sticky
  - This involved refactoring most of main menu's HTML. It's very
    different now.
- Support notification coloring in mini windows
- Fix a variety of button propagation bugs
  - Most noticeably, canceling a challenge would immediately send a new
    challenge
- Fix a volume slider regression on regular client (Fixes #2383)
- Fix a Firefox issue where sending messages didn't reset the cursor
  position
- Add a `/closeand` command, mostly for buttons (Fixes #2386)

Trivial
- Refactor ChatTextEntry for readability
  - `setValue` should be impossible to use incorrectly now
- Make mini-window minimize/maximize/close buttons slightly bigger
- Remove resize handle from teambuilder text editor
2025-04-20 12:37:55 +00:00
Aurastic
157dc18cbe
Preact: Add afd, showdebug and other commands (#2378) 2025-04-20 05:04:54 -07:00
Guangcong Luo
64cf8dd361 Preact client minor update batch 12
Minor
- Fix "[Gen 6]" appearing in wrong places for the last time
- Fix a bunch of bugs in back/forward history
- Support short links (`news` can't be supported because it conflicts
  with the mini-window)
- Support `no-panel-intercept`
- Fix Z-move alignment
- Speed up loading by not using SockJS in newer browsers
- Fix backgrounds
  - Uploads required pressing Done, but it's supposed to be a close
    button
  - Random backgrounds weren't working
- Support ctrl+clicking and shift+clicking links
- Adjust main menu padding
  - Mini windows are now 20px wider
- Fix mini-window minimize buttons in Safari
- Add a maximize button to mini windows
- Stop special-casing News mini-window CSS
- Support mini-windows in vertical tab mode
  - PMs still default to being full tab, but News is now a mini-window
    on screens of any size, because the full tab is actually pretty
    unergonomic
- Fix highlight notification room in chat rooms
  - This is also refactored to be better code now
- Fix tab overflow
  - Give 180px space for userbar instead of 165px
  - Fix calculation of when to overflow
  - Improve tab list design
  - Add checkbox to switch to vertical tabs
- Fix race condition leading to connection failure

Trivial
- Options is now a semimodal
- Fix crash in load tracker
- Remove unused `update = forceUpdate` code in Popups
- Use the redesigned dark mode popups from the design refresh #2175
2025-04-19 11:58:16 +00:00
Aurastic
991eff5e5c
Preact: Support change background and other options (#2373) 2025-04-18 04:11:25 -07:00
Guangcong Luo
5971e5151a Preact minor update batch 11
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Minor
- Unhide right panel when choosing "Two panels" layout option
- Refactor focusing
  - Correctly focus next room when closing currently active room
  - Correctly focus room when joining new room
- Use strict mode on all compiled files
- Fix router when started on `/` (it previously required starting on a
  non-empty room ID, which wasn't noticeable back when the URL needed
  to be `/preactalpha`)
- Update teambuilder sidebar CSS, to make it easier to add regular text
  - This is mainly for the "Tournaments" button in the main menu,
    which shares the CSS
- Fix new tournament elim tree text in Safari
- Update new tournament elim tree highlighted links to reliably
  link every still-playing game
- Remove latest gen from format name displays everywhere
  - Previously, they would only be removed from the format dropdown,
    but now they're also gone from the Ladder tab, battle tabs, and
    `/rank`
- Support async d3 loading
  - This allows chatrooms to be loaded way before all our dependencies
    are fully downloaded
- Remove "[Gen 9]" from format names everywhere (previously it was only
  removed from the format dropdown)
  - Also add "[Gen 6]" to unlabeled formats in `/rank` (Gen 6 was the
    last time we didn't have format generation as part of format names)

Trivial
- Stricter JSX linting
  - (unfortunately, most of the JSX style enforcement I actually want
    isn't possible in @stylistic)
- Make room.subscribeTo's second parameter optional
- Rearrange and comment loading order
- Rename hiddenInit -> focusNextUpdate (clarity)
- Rename PSMain -> PSView (clarity)
- Fix button spacing in Change Password
- Add `touch-action: manipulation` to <a> tags
- Refactor `nodeSize` in elim tour trees
2025-04-18 05:47:58 +00:00
Guangcong Luo
079c7d2dd7 Preact: Support tournaments
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Missing features:
- Popping out brackets
- Showing the bracket after the tournament ends
- Disable validate button for random teams

New and improved:
- Hover effect on tournament bar (also backported to 2013 client)
- Slightly better animations for expanding/collapsing tours
- Better scrolling around a bracket
  - "Grab" cursor
  - Selecting text is no longer completely banned (although it's still
    hard to do on desktop because of the whole drag scrolling thing)
  - Completely native scrolling on mobile
  - Scroll bars appear as normal, and regular methods of scrolling like
    arrow keys and scroll wheel also work as normal
2025-04-15 08:13:09 +00:00
Guangcong Luo
c3301aabea Fix testclient to work without a full build 2025-04-12 10:53:31 -07:00
FeluciaPS
36ccc1a80b
Preact: Add utilichart.css (#2349) 2025-04-12 03:21:50 -07:00
Guangcong Luo
0eeed0d7ce Preact: Add vertical header layout for mobile
It's finally here and it's beautiful! I've had this design in my mind
for around ten years, ever since I first started working on a Preact
client.

The idea is that on small screens, you'd just scroll left to get to
the menu, instead of needing to press the menu button. This turned out
to work surprisingly well and I'm pretty happy with it.

This also exposed a number of bugs. It turns out most of our popups are
not written with horizontal scrolling in mind, so I had to fix
popup rooms as well as BattleTooltips.

There's still plenty of improvements possible, but I'm already really happy
with what I've done so far.
2025-04-11 07:55:41 +00:00
Guangcong Luo
a476ded769 Preact: Split off panel-popups.tsx from topbar 2025-04-10 05:01:49 +00:00
Guangcong Luo
7a00e5f610 Preact: Misc fixes
- Rename RoomType to PSRoomPanelSubclass (so it doesn't conflict with
  the other RoomType)
- Support message notation in popups
- Support searching for battles
- Fix Terastallizing in battles
- Fix cancelling challenges
- Support the games list
- Topbar now shows format name rather than ID
- Fix rejoining battles in progress
- Chats and battles: Focus on any click
- Retain chat/battle history when moving rooms in/out of mini-windows
- Real news (instead of just testclient placeholder)
- Add "Tournaments" and "Friends" main menu links
- Use new icon in upper left
- Use dark main menu groups
- Fix pref loading
- Support `/nick`
- Rename `room.handleMessage` to `room.handleSend` for clarity
- Rename `room.queue` to `room.backlog` for clarity
- Fix DM userlist after renames
- Darken chat logs in dark mode
2025-04-09 17:22:50 +00:00
Guangcong Luo
f272d9526b Preact: Support logging in
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-07 20:04:49 +00:00
Guangcong Luo
4dcecc9fc8 Preact: Make client usable again
A few updates seem to have made the Preact client stop working, but this
restores it to working state again.
2025-04-03 18:56:51 -07:00
Guangcong Luo
a10821ab8b
Update to ESLint 9 (#2326)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
This finally removes the tslint dependency and switches to eslint.

There are a lot of other changes here, too, to bring the codebase up to
server standards. TSLint never had much in the way of indentation
enforcement.

Not very happy about eslint splitting itself up over 6 dependencies,
or its documentation over three websites, nor how poorly documented the
new flat config is, but I mean, eslint's gonna eslint. Customizing
would be even harder if we tried to use Biome or something. They mostly
seem to go full Prettier.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed (except in ES3
  code). We otherwise now consistently use template strings for this.
2025-02-25 20:05:32 -08:00
Guangcong Luo
c724dae346 Preact: Support syntax highlighting in chat
This isn't actually too hard to backport to the old client, but I'll
leave that for someone else.

This is here partly as a tech demo of the syntax highligher, which I
plan to use in the teambuilder.
2024-08-30 13:36:05 -07:00
Guangcong Luo
04fd0d8ecf Bump jQuery version 2023-12-02 20:28:01 +00:00
Guangcong Luo
5d41f3ec93
Reorganize directories (#2187)
Files meant to be served have been moved into
`play.pokemonshowdown.com/` and `pokemonshowdown.com/`.

We now have three directories for the three subdomains handled by this
repo:

- `pokemonshowdown.com/`
- `play.pokemonshowdown.com/`
- `replay.pokemonshowdown.com/`

Naming them after the subdomains will make it much easier to tell where
the files for each go.

The diff is probably useless; it'll be easier if you just look at the
new tree:
https://github.com/smogon/pokemon-showdown-client/tree/reorganize
2023-11-16 03:39:29 -08:00