Commit Graph

31 Commits

Author SHA1 Message Date
pyuk-bot
7f4f9755e8
Preact: Update nature after applying optimizer (#2557)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Untested, but I think it’s pretty obvious that this is why the optimizer isn’t changing nature currently when applied. The function above is basically the same function, but with this extra line.
2025-12-03 04:34:43 -08:00
Guangcong Luo
64e79f49eb Preact minor updates batch 28
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
Most of these were found by andrebastosdias (thanks!)

Teambuilder
- SpA/SpD columns weren't appearing in gen 2
- buggy behavior with EVs in gen 1-2 or Let's Go
- save teams after doing things (Fixes #2493)
- import old box syntax

UI
- layout breaking when resizing
2025-11-10 16:05:34 +00:00
Guangcong Luo
d054bba780 Preact: Implement team copy/move
The clipboard can now handle teams as well as sets. The functionality
is pretty complex under the hood, but it should work basically as
expected.

If you copy sets into the team list, they'll become a new team
containing all the sets.

If you copy teams into the set list, all the sets inside the teams
will be added to the set list.
2025-10-25 10:17:30 +00:00
ShivaD173
288a072f8f
Do not set Gimmighoul-Roaming Atk IVs to 0 by default (#2490)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-09-06 15:25:10 -05:00
Guangcong Luo
ea95464008 Preact: Support backing up teams
(Restoring backups not yet implemented)
2025-08-19 00:31:26 +00:00
Guangcong Luo
1aa237de65 Use PSIcon in battle-team-editor
(I was being dumb by trying to not have it as a dependency. I don't
want panels as a dependency but I'll probably move PSIcon out of
panels whenever it comes up.)
2025-08-18 19:16:03 +00:00
Dieter Reinert
7bea778223
Preact: Support box sets in teambuilder (#2491)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-08-07 06:39:55 -07:00
Guangcong Luo
4e19006b9e Preact: Support copying/moving sets in teambuilder 2025-08-04 14:04:19 +00:00
Guangcong Luo
27fb646e94 Preact minor updates batch 27
Minor
- Don't close popups when receiving `|init|`

Trivial
- Update teambuilder if teams updated elsewhere
- Bump cookie expiration
- Code style in PHP
- Improve documentation of `Team`
2025-08-04 14:04:19 +00:00
Dieter Reinert
a3ecfed7e3
Preact: Support smogon sets in teambuilder (#2466)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-07-31 13:48:09 -07:00
Dieter Reinert
4b5830ff39
Preact: Support cosmetic formes (#2461)
---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-06-19 11:49:12 -07:00
Guangcong Luo
775743cd33 Preact minor updates batch 26
- Don't cut off joinLeave batch for uhtml changes
- Don't autoclose expired rooms
- Fix crash when importing/exporting certain teams
- Fix room focus when closing popups
- Don't highlight for `/uhtml` and `/uhtmlchange`
2025-06-07 17:25:35 +00:00
Dieter Reinert
df0188bbfb
Preact: Fix pressing Enter in teambuilder with invalid results (#2451) 2025-06-04 19:54:27 -07:00
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
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
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
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
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
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
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
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
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
pyuk-bot
847af4578d
Preact Teambuilder: Fix changing a move in text mode (#2414) 2025-05-09 18:11:33 -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
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
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
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