Commit Graph

16 Commits

Author SHA1 Message Date
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
Guangcong Luo
883e2043af Preact: Refactor uploads to use handleDrop
All the old client's supported drag/drop types are supported now.
2025-06-10 07:10:15 +00:00
shrianshChari
29d2a24d37
Preact Teambuilder: Fix the team textbox placeholder on Firefox (#2438) 2025-05-21 20:04:57 -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
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
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
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
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
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
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
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
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
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
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
5d41f3ec93
Reorganize directories (#2187)
Files meant to be served have been moved into
`play.pokemonshowdown.com/` and `pokemonshowdown.com/`.

We now have three directories for the three subdomains handled by this
repo:

- `pokemonshowdown.com/`
- `play.pokemonshowdown.com/`
- `replay.pokemonshowdown.com/`

Naming them after the subdomains will make it much easier to tell where
the files for each go.

The diff is probably useless; it'll be easier if you just look at the
new tree:
https://github.com/smogon/pokemon-showdown-client/tree/reorganize
2023-11-16 03:39:29 -08:00