Commit Graph

35 Commits

Author SHA1 Message Date
Mia
cd82eaae61 Replay manager: Adjust search index table when updating privacy 2025-07-22 15:40:20 -05:00
Guangcong Luo
09440e78e4 Replays: Add help text for multi-user search
Closes #1307
2025-05-04 11:51:06 +00:00
Guangcong Luo
94a1876f61 Support non-full builds in testclient
Non-Preact testclients don't deal well with non-full builds anymore,
now that battledata includes data/text.js. This fixes it so that
they're usable (although no longer being able to edit battle-dex etc
without an initial full build still sucks, it's unavoidable).
2025-04-26 06:02:06 -07:00
Guangcong Luo
e68993813d Preact: Improve screenreader support
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
The page should be a lot more accessible now.

All the aria-hiddens may be distracting; the most important change is
role="tab" and role="tabpanel" for panels, and role="dialog" for
popups.
2025-04-25 11:38:45 +00:00
Guangcong Luo
b39b27747f Fix replay testclient to load local play.* files
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-22 08:42:34 -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
8a01113f3e Update replay download link
In practice this link should never go through, but I figure it should
have some sort of message for it to make sense at all...
2025-04-13 08:12:44 +00:00
Guangcong Luo
bd94b60ed2 Split off replays-index.tsx
Mostly for easier maintenance.
2025-04-09 01:36:52 +00:00
Guangcong Luo
d8cd5d6d9f Replays: Support easier ways of getting inputlogs 2025-04-06 17:58:29 +00:00
Guangcong Luo
4bb0242872 Restore switched-viewpoint featured replay links
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-04 14:43:38 +00:00
John Adams
4044099b9b
Added a volume slider to the replay client (#2344)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-03 17:04:58 -07:00
Guangcong Luo
f673603011 Improve Replays testclient documentation 2025-04-03 16:38:44 +00:00
Guangcong Luo
03c16b09a0 Add a testclient for Replays 2025-04-03 09:33:25 -07:00
Guangcong Luo
5a1cec202b Redesign website top navigation
The topbar in pokemonshowdown.com (and all not-in-sim pages)
has gotten revised in three ways:

1. Ladder has been replaced with Strategy, a link to the Smogon
   Strategydex.
2. Strategy and Forum now open in new tabs, because they don't
   share top nav with PS.
3. Strategy and Forum are now purple, to signal that they lead
   to Smogon and open in new tabs.

I'm way more a fan of the new look than I expected to be. Purple
and blue matches the "Horizon" art used on the main page quite
well, it turns out.

Ladder was always kind of useless - there's a better Ladder button
in-sim that keeps way more up-to-date with tier additions/removals,
and finding users can be done by clicking on the "X users online"
button.
2025-04-01 18:21:04 +00:00
Guangcong Luo
2d7a9c81d4 Improve directory indexes and 404 pages
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
We now have a custom look for directory indexes, so you can go dig
through PS's back closets in style:

https://play.pokemonshowdown.com/sprites/

Additionally, the 404 page everywhere is now as nice as the custom
404 page in Replays.

https://pokemonshowdown.com/404
2025-03-29 13:11:44 +00: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
Karthik Bandagonda
dd392d9fa9
Replays: Load custom colors JSON file (#2268) 2024-07-24 21:45:53 -05:00
Guangcong Luo
0774605f3a Fix crash in Replays 2024-07-07 09:08:22 +00:00
Karthik
63d2a1f7f1
Replays: Fix More Replays button on mobile (#2255) 2024-06-25 22:33:50 -07:00
Mia
138986672b Replays: Restore edit function
Apparently that's why that was broken.
2024-02-15 16:41:41 -06:00
Mia
3515fdd024 Replays: Properly error out if user isn't logged in 2024-02-15 16:32:19 -06:00
Mia
d91b6aef79 Replays: Always check CSRF in the manager 2024-02-15 16:29:48 -06:00
Mia
99ddb79f1b Fix typo 2024-02-15 16:06:26 -06:00
Mia
918bf7eced Replays: Fix manager 2024-02-15 16:05:27 -06:00
Guangcong Luo
a9c6e7b965 Make the source of replay pages more readable
Yes this is literally just to make it so "View source" gives you a very
readable log and inputlog, just like in the old days.
2023-12-17 04:07:37 +00:00
Guangcong Luo
708dc8dd1f Restore Replays search APIs
Fixes #2193
2023-12-17 04:07:37 +00:00
Guangcong Luo
b6a0f088f4 Update Replays for new database format
This is still a WIP, but it works and it's what we have so far.
2023-12-07 23:02:21 +00:00
Guangcong Luo
d66b080873 Move replay-config to config/
I'm trying to centralize config.
2023-11-16 23:49:33 +00:00
Guangcong Luo
5b97740c80 Fix overlooked paths from directory reorg 2023-11-16 22:51:31 +00:00
Guangcong Luo
cc9f6ae7df Make Replays work better on database failures
I haven't done anything about the database issues, yet, but this
makes it so database issues don't screw up the UI, and also gives
a slightly nicer error message.
2023-11-15 23:57:42 +00:00
Guangcong Luo
ed36b96882 Replays: Add Dark mode selector
Also makes sure Speed doesn't get desynced when switching between
battles.

I'm not particularly happy with how much UI space this gets, but
I guess it's a net positive.
2023-11-10 00:59:11 +00:00
Guangcong Luo
dc8e6cf254 Replays: Correct link previews
This should make Google search results and Discord link previews
for replays work correctly.

This actually involved a ton of work, but at least this work also
makes replays load faster.
2023-11-10 00:59:11 +00:00
Guangcong Luo
57e8302147 Replays: Support "music off, effects on" sound mode 2023-11-10 00:56:05 +00:00
Guangcong Luo
3a8a793478 Support old replay search API
I completely missed that this was being used...
2023-11-07 20:56:33 +00:00
Guangcong Luo
7a2b323eaf Deploy New Replays
The idea is to eventually move all client parts to their domain name
subdirectory, for clarity and better organization. New Replays is
just first.

Anyway, yeah, minor updates to New Replays, but otherwise it's just
getting deployed as-is, straight to

https://replay.pokemonshowdown.com/

The old URLs are getting taken down; they were only used for
development anyway.
2023-11-05 23:37:14 +00:00