Commit Graph

6243 Commits

Author SHA1 Message Date
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
Aurastic
90917c4d4f
Add groupchat-* to routes (#2396) 2025-04-25 03:27:44 -07:00
Kris Johnson
0abc1ef7ad
Preact: Support hovering over roomtabs with notifications (#2394)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-04-23 13:09:28 -07: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
Mia
bb601a6d04
Preact: Support forms that send commands (#2388)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-04-21 06:25:41 -07:00
Guangcong Luo
04bfc03d6b Add .details CSS and improve old CSS
1:

We now have some new CSS for details elements. Simply use
`<details class="details">` to make them look nicer.

It also has a lot of neat features (since it was designed for
expandable dexsearch). It's fully documented in STYLING.

https://play.pokemonshowdown.com/style/STYLING.html

2:

Links are now styled, with hover effects. It's just a slightly nicer
blue (and a slightly nicer purple for visited links). I haven't done
this before because it interferes with other CSS too much, but the
new(ish) `:where` selector makes it easy to cheat specificity problems.

3:

Subtle buttons are no longer different from subtle links. I've
introduced ilink buttons which behave like the old subtle buttons,
and new subtle buttons simply work exactly like subtle links.

4:

Infoboxes in dark mode are now slightly easier to see.
2025-04-21 13:16:39 +00:00
Guangcong Luo
9019a0769e Preact minor updates batch 14
Minor
- Don't allow reconnects (force refresh) after a day of uptime
- Don't toggle <details> when selecting text
- Preserve bottom-scroll position when expanding <details>
- Prevent certain kinds of overscroll on mobile
  - Scrolling on mobile should now be "less wobbly". Also, swiping
    down to refresh no longer happens inside rooms like a chat room
    or the main menu (although you can still do it intentionally by
    swiping down in the left menu).
- Fix selection in the old newish dexsearch responses

Trivial
- Add Date.now polyfill
- Linter: `no-constant-condition` is now a warning
- Support `PS.confirm` and `PS.prompt`
- Make close buttons in the left sidebar bigger
- Add a `Net.formData` function to get form data
2025-04-21 13:16:26 +00:00
dot-Comfey
2c6f962d8f
Preact: Fix auto-show spoilers (#2389)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-20 23:35:23 -07:00
Mia
48cb201300
Preact: Support custom colors (#2385)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-20 15:48:55 -07:00
Aurastic
dbff485823
Preact: Support tabcomplete (#2382)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-04-20 08:00:08 -07: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
Guangcong Luo
9f94c7ef5f Preact: Support reconnects
This adds support for reconnecting to the server after being
disconnected, without needing to refresh.

This is a little dangerous at the moment - one reason we've never done
this in the past is to enforce that everyone's using the newest client
version. This is fine in Preact Alpha but at some point we'll need to
find some way to enforce refreshing at a certain point.
2025-04-20 12:10:38 +00:00
Guangcong Luo
ab44f2de45 Fix dragging teams from teambuilder to computer
Apparently this was broken in the loginserver refactor because we all
forgot it existed...
2025-04-20 12:10:38 +00:00
Aurastic
157dc18cbe
Preact: Add afd, showdebug and other commands (#2378) 2025-04-20 05:04:54 -07:00
Mia
df017fba87
Preact: Add format resource loading to teambuilder (#2384)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
For parity with current builder.
2025-04-19 22:20:35 -07:00
Marty-D
12913f445a Add new avatars
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-19 12:09:38 +00:00