Commit Graph

6458 Commits

Author SHA1 Message Date
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
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
04f1fec177 Fix PM/News box alignment
In unclear cases, the minimize/close buttons would be too tall,
interfering with the rest of the window. Setting it one pixel shorter
solves this (a solution already in use in Preact client).
2025-05-01 16:44:44 +00:00
shrianshChari
3ceed77f49
Add teambuilder support for [Gen 3] ADV 200 (#2399)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
* Add teambuilder support for [Gen 3] ADV 200

* Fix tiering of Pokemon in ADV 200

* Satisfy linter
2025-05-01 10:44:33 -06:00
Kris Johnson
b0bf31074a Fix old gens LC teambuilder 2025-05-01 10:27:53 -06:00
shrianshChari
f2a8140375
Make Reg I formats Official ladder formats (#2398)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-30 23:23:24 -06:00
Guangcong Luo
b5630d3ff2 Preact: Improve teambuilder more
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
- New export format
  - NOT FINAL, wow did Twitter freak out when they saw this
  - I have not made a decision on whether to keep this new export format

- Stub details form
- Checkbox for old export format
- 510 EV limit
- Show full search results (with windowing)
- Choosing generations rather than specific formats
- Searching/filtering/sorting results
  - Reverse sorting filter columns (move types/categories and
    pokemon types/abilities) is now possible even on oldclient

Bugfixes:
- Gen 1 (no item) species selection
- "Add pokemon" button positioning
- Dark mode results
- Width (to fit the final column of results)
- Highlighted line width
2025-04-29 00:22:50 +00:00
Guangcong Luo
734ce0d71d Preact minor updates batch 16
Minor

- Light mode scrollbar in line with dark mode
  - OS default scrollbars all look ugly for some reason, unless you use
    macOS's hidden scrollbars, which are nice except they're hidden.
- Add Aurastic to credits
- Fix subtle notifications
- Fix "Copy" button and HTML popups
  - These are both for the replay upload popup.
- Fix escaping in teambuilder tables
  - They're escaped in Preact but raw HTML in old client, so using
    Unicode make them work correctly in both.
- Fix a weird issue where history.replaceState was being called too
  often
  - I don't know exactly why this is only recently became a problem,
    but it's easy enough to fix...

Trivial

- More ARIA roles (for blind users)
  - The accessibility tree looks great now.
- Fix an unnecessary closure in AvatarsPanel
- Fix non-ASCII in battle.ts
- Fix class="readmore" to work like class="details" (re: don't do
  expand/collapse hover effect if hovering over a link)
- Fix resizing from one-panel to two-panel mode
  - This was really just one bug in `focusRoom` left over from an old
    architecture where mini-rooms could be panels in vertical tab mode.
  - But I took the opportunity to refactor a bunch of panel code to be
    clearer.
- Slightly redesign open team sheets
- The yellow and black "construction" message no longer needs nested
  divs
2025-04-29 00:22:44 +00:00
Guangcong Luo
b7a953930b Make Leftovers healing animate simultaneously
Weather/status damage already animate simultaneously, but I forgot
about healing. This brings them on par, which should make Gen 2-3
games animate noticeably faster.
2025-04-27 02:58:30 +00:00
Aurastic
b26709a0a0
Preact: Add battle options and timer (#2395)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-04-26 17:51:36 -07:00
André Bastos Dias
68d04c131a
Make team box height flexible (#2391)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-26 06:48:07 -07:00
Guangcong Luo
8ba60e45b2 Refactor avatar popup 2025-04-26 06:04:33 -07: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
2ec10bc172 Preact: Improve teambuilder
- Add format chooser
- Show team name in title
- Support selecting species/item/ability/move from menu
- Clicking species/item/ability/move selects the text for easy replace
- Add Stats menu
- Add placeholder Details menu
- Add types and item icon
- "Add Pokemon" button

It's still a very long way to go, but it's starting to look properly
like the vision I have in my mind.

Minor
- Refactor
- Fix cachebuster for teambuilder CSS
- Improve teambuilder resources HTML
2025-04-25 11:38:45 +00:00
Guangcong Luo
bee9e8e629 Preact minor updates batch 15
Minor
- Fix `/help` for server commands
- Fix multiline DMs
- Redesign collapsed userlists
- Refactor topbar to use display:table and inline-blocks, instead of
  floats and manual margin calculations
  - I nearly used flexbox, but fake tables work just as well so I
    figure why not. The old client actually manually calculates margin
    to do the thing where the right tabbar expands to the right and
    then to the left and it's nice to not to need that anymore.
- Document `.gray` in STYLING
- Convert all buttons that make sense as links to <a class="button">
  - That would be all the main menu links, plus the
    usercount/battlecount in Rooms.
- Fix dismissing popups in iOS Safari
- Add an icon for being disconnected

Trivial
- Fix stars in the old client format dropdown
- Use "Cmd" instead of "Ctrl" on Macs in the chat formatting panel
- Fix some code style in panel-popups
- Update supported browser list in README
- Add Preact keys where they make sense
  - For the most part I think requiring keys is too strict. I still
    think they're unnecessary or actively detrimental for any list
    that isn't long/complex and also rearranged ever.
- ESLint: Set no-shadow to warn
2025-04-25 11:38:45 +00:00