Commit Graph

6273 Commits

Author SHA1 Message Date
Guangcong Luo
e2c8eb3db5 Preact minor updates batch 23
- Add panel-example.js
- Fix windowing (perf) when sorting teambuilder results
- Fix some comments
2025-05-24 10:14:24 +00:00
Guangcong Luo
30fa1f243d Preact: Fix confirmleaveroom on overflow tablist
Fixes #2433
2025-05-23 21:01:26 +00:00
bingingem
2747808d6b
Preact: Trim command targets (#2439) 2025-05-23 10:31:27 -07:00
André Bastos Dias
917855a0ec
Add Home sprites (#2430)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-22 17:41:30 -07:00
Guangcong Luo
b5865585e4 Preact: Refactor mobile support
Scrollable width is now set on `<html>` (and is inherited by `<body>`).

It's my hope that this fixes some scroll snap bugs on mobile.

We're also now looking at pointer events to decide whether to autofocus
text boxes.

Fixes #2419
2025-05-22 23:53:43 +00:00
Kris Johnson
07217f22ba Teambuilder: Fix headers appearing with no Pokemon under them 2025-05-22 13:25:23 -06:00
Kris Johnson
033472e091 Fix old gens NatDex Doubles teambuilder 2025-05-22 13:07:19 -06:00
shrianshChari
29d2a24d37
Preact Teambuilder: Fix the team textbox placeholder on Firefox (#2438) 2025-05-21 20:04:57 -07:00
Guangcong Luo
00abcf7c6b Preact minor updates batch 22
- Refactor PS.send
  - No longer wants the leading `|` (omitting it is a common bug),
    making it work more like `room.send`.
- Intercept links to teams and replays
- Support replay fallback if battle room not found
- New CopyableURLBox (for replays and teams)

Teambuilder
- Select species/ability/item/move text when clicking into them
  - (Regression from the upload button leak fix)
- Don't let nicknames stop us from detecting teams unchanged since
  upload
- "Compare" button for comparing local vs uploaded team
- "Revert" button for reverting to uploaded team
- View team page
- Hide extraneous buttons from gen 1-2
- Improve right-click and left-click behavior on import/export screen

Trivial
- `readonly` -> `readOnly` on TeamEditor, to match JSX
- Refactor `connected`
- Fix "Dynamax Level 10" appearing on imported teams
2025-05-21 03:14:29 +00:00
Guangcong Luo
e4c192317f Support CompoundWordNames
Previously, compound words (for dex searching) were hardcoded into
`build-indexes`. This moves them to server's data/aliases, where it
should be easier for people to see when they're updating aliases.
2025-05-21 02:44:51 +00:00
André Bastos Dias
0d10f6180a
Skip animation during fainted forme regression (#2434) 2025-05-20 17:07:47 -07:00
Guangcong Luo
fc6d963912 Strongly type Config
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
(Also remove a bunch of global types)
2025-05-19 13:40:12 -07:00
Aurastic
de13c8c5d4
Preact: Fix tab complete in battles (#2431)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-19 00:54:35 -07:00
pyuk-bot
fbd905acb9
Tooltips: Add a locking animation (#2411) 2025-05-18 21:46:46 -07:00
Daniel Chen
16c7bab0b2
Preact Teambuilder: Improve link importing (#2425)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
* Make link import change team title & format
* Also adds a placeholder msg to the team textbox.

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-18 11:48:12 -07:00
Guangcong Luo
4b8260b077 Preact minor updates batch 22
- Tab complete can now complete offline users
  - This actually improves performance, too, because the userlist is
    now cached instead of needing to be re-sorted every update.

Battles
- Add `aria-disabled` to "disabled" buttons
- Make disabled buttons look more disabled

Teambuilder
- Textbox mode: Fix inner focus location when adding first pokemon
- Fix species display in certain cases
- Consistently use Dex.resourcePrefix for icons for testclient support
2025-05-18 16:54:16 +00:00
pyuk-bot
8f5894ef9f
Preact: Fix text styling of disabled move buttons (#2428)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-17 12:36:00 -07:00
Aurastic
89d19a6fb0
Preact: Add offer tie button in battle options (#2429)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-17 10:15:55 -07:00
Daniel Chen
38534cfd52
Preact: Fix some team textbox bugs (#2426)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-17 10:12:24 -07:00
Guangcong Luo
aeedbe34b9 Fix build errors
I ran `npm test` a few times after that Teams refactor, but apparently
I forgot to run it after everything else...
2025-05-17 16:56:03 +00: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
André Bastos Dias
b423277bbe
Silent detailschange (#2427)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-16 10:26:07 -07:00
Aurastic
3bee9d422a
Preact: Improve and fix challenge/search flow (#2423)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-15 19:19:04 -07:00
Aurastic
9ef5da134f
Preact: Rooms panel: Support category list and keyboard nav (#2424)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-15 16:36:26 -07:00
Guangcong Luo
a35a62cfce Preact minor updates batch 20
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Battles
- Fix render issues on mobile layout
- Fix join/leave batching
- Support disabled buttons

Teambuilder
- Redesign upload UI to be clearer
- Support scrolling tab bar for Boxes in focus editor
- Don't overwrite local team with remote team
- Improve Defensive Coverage ability support
- Support importing from pokepaste (fixes #2422)
2025-05-15 06:20:26 +00:00
pyuk-bot
924400bba7
Fix old client player controls when maxMoves aren't in request (#2421)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-14 16:59:20 -07:00
pyuk-bot
fcbd70e9a0
Preact: Fix PP display on buttons for moves with no max PP (#2420)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-14 13:42:48 -07:00
pyuk-bot
c7a9d18585
Fix max move conversion for type-changing moves (#2418) 2025-05-14 08:32:48 -07:00
André Bastos Dias
73ea84c0d0
Don't force Tera types because of Hackmons (#2324)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-13 14:45:16 -07:00
Guangcong Luo
bfb2813c72 Preact minor updates batch 19
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Battles
- Fix move types in battle controls
- Warn about Gen 1 Substitute self-KOs in tooltips
- Hide controls until animations are finished

Teambuilder
- Implement uploading teams
- Fix adding pokemon in teambuilder text mode
- Uploaded team management
- Automatic Atk/Spe IVs
  - IV spread chooser also has an auto button

Trivial
- Constrain teambuilder width better
2025-05-13 18:56:16 +00:00
Alex "Mathy
f77b3fd7dc
Tooltips: Add RBY Recover failure indicator (#2010)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Thanks!
2025-05-12 14:50:28 -07:00
pyuk-bot
44a3879b0f
Preact: Hide unsearchable formats where appropriate (#2417) 2025-05-12 14:48:08 -07:00
pyuk-bot
cf4ff8ca05
Preact Teambuilder: Set default abilities and items (#2413)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-12 09:19:58 -07:00
Aurastic
11fff6adbe
Fix support for old client in BattleLog (#2416) 2025-05-12 07:21:01 -07:00
pyuk-bot
c914bb0d8a
Preact Teambuilder: Display forme names correctly in search results (#2415)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-05-09 19:31:37 -07:00
pyuk-bot
847af4578d
Preact Teambuilder: Fix changing a move in text mode (#2414) 2025-05-09 18:11:33 -07:00
pyuk-bot
487c7a52ed
Preact: Fix targeting options in 4-player formats (#2410) 2025-05-09 17:23:02 -07:00
Guangcong Luo
92942c505a Preact: Add most remaining Teambuilder features
- support Boxes
- add visible indicator for uploaded teams
  - also add share URL
- Validate button
- new shiny icon
- readonly mode
- fix crash when deleting last time
- redesign Details panel
- show Hidden Power type in Details box when relevant
- Undo Delete button in inner focus
- support Add Folder and Add Format Folder buttons
- add hover effects
  - last time, hover effects had to be removed because of HTML5 drag
    bugs. hopefully this time goes better.
- redesign the clutter at the end of the team
- Team drag and drop
- use buttons rather than divs
  - testing on Firefox and Chrome did not reveal any bugs so hopefully
    that's just fixed now.
2025-05-09 23:03:47 +00:00
dot-Comfey
07bf165c3c
Preact: Fill out Details panel in Teambuilder (#2412)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-08 16:19:04 -07:00
Mia
ba9f3a529e
Preact: Support remote teams (#2390)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-07 20:34:08 -07: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
Aurastic
33f78c413f
Preact: Add highlight, receivepopup etc (#2406)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-07 02:10:03 -07:00
Guangcong Luo
45f8880807 Preact teambuilder: Defensive coverage overview
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-05-06 15:59:30 +00:00
Guangcong Luo
e5c25bbb97 Preact minor updates batch 17
Teambuilder
- Show "EVs" when a set has no EVs, so it's clear what the Stats button
  is for
- Fix dragging slider clearing Nature
- Fix teams not being clickable on iOS
- Minor layout tweaks
- Use four moves on compat mode exports, too

Minor
- Add a "PSIcon" component
- Update README
- Fix Team Preview in doubles/etc
- Fix move choice preview
- Fix `/avatar`
- Fix display of formats with custom rules in the format dropdown
- Support "Register" button from winning a battle
- Support "More" button from `/rank`
- Fix target choosing in multi battles
- Fix switching in more slots than unfainted pokemon (in doubles+)
- Add `/senddirect` command to bypass client command parser
- Fix notifications for mini-rooms (they should highlight the mainmenu
  tab)
- Set tooltip long-tap delay to 1 second, to make it harder to
  accidentally long-tap

Trivial
- move FormatResource stuff out of teamdropdown
- refactor battle-choices a little
- make team tabs less tall in teambuilder wizard individual set view
- support `/choose default` or `/choose auto`
2025-05-06 15:59:06 +00:00
Aurastic
6c80aa25a2
Preact: Fix users list not updating on autoreconnect (#2407) 2025-05-06 08:24:20 -07:00
Aurastic
d92db3b07b
Preact: Fix user options panel (#2397) 2025-05-06 03:06:15 -07:00
Aurastic
ccab1ba613
Preact: Support trapping/locking/disabling in battles (#2403)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-05-05 07:27:36 -07:00
Guangcong Luo
94f5aed2a0 Preact: Pass clicked button to commands
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Because commands are frequently called from buttons as well as
textboxes, passing the clicked button is useful.

The textbox is also passed if the command is typed rather than from
a button. Mostly this just lets us spawn popups closer to where users
are already looking, which I've been wanting to do for `/nick` for
a while.
2025-05-05 01:07:07 +00:00
Guangcong Luo
f52e4b2aad Fix ladderhelp documentation
We did a whole refactor to TypeScript but #2289 is still right:

15666f8711/src/ladder.ts (L329)

Fixes #2289
2025-05-04 11:56:35 +00:00
Guangcong Luo
09440e78e4 Replays: Add help text for multi-user search
Closes #1307
2025-05-04 11:51:06 +00:00