Commit Graph

15 Commits

Author SHA1 Message Date
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
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
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
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
Waleed Hassan
e032688406
Preact: Support timestamps (#2361)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-15 23:25:52 -07:00
Guangcong Luo
0740eb5148 Preact: Refactor client commands
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
At this point we've probably outgrown the "huge switch" pattern. So
instead, here's a client command syntax a lot like server's.

I've also added an `add` command that works more like server's and
2013 client's, as the default way to respond to client commands.
2025-04-14 03:12:22 +00:00
Guangcong Luo
39ddd15510 Preact update batch 7
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
I've been batching all my non-huge Preact updates approximately once a
day and I intend to keep that up, but I should probably number them so
it's not just "misc updates" every time. Anyway: I went back and
counted. This is batch 7.

Major
- Update Options popup
  - Layout options
- Topbar in vertical tabs mode now contains a username/options button
- If you click on a button for a popup (like Options or a trainercard)
  while the popup is already open, it will be closed.
	- Also if you click on a popup already open somewhere else, it will
	  open correctly.
- Fix clicking on readmores, spoilers, and buttons inside links
- Make the vertical tabbar scrollable
- Reliably title <<rooms>> "Chat Rooms"
- Add a button to get to the vertical tabbar on mobile

Minor
- `users` in the URL now directs to Preact client
- refactor popup closing to never use while loops
- Fix capitalization for usercards for users with no user objects
- Migrate all `name="cmd"` buttons to `data-cmd`
- Migrate all `name="joinRoom"` buttons to `data-href`
- Fix left border thickness on home screen in vertical tabs mode
- Use `/play` for replaying battles
2025-04-12 10:38:31 +00:00
Guangcong Luo
f272d9526b Preact: Support logging in
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-07 20:04:49 +00:00
Guangcong Luo
0ace4b1b90 Refactor styling
- move big and small buttons to battle-log.css (so they can be used in
  custom HTML)
- sync Preact header styling with regular header (from the design
  refresh #2175)
- rearrange client.css and client2.css to move main menu and format
  dropdown styling out of the header section
- lighten light .button.cur to match header bar
- add active styling to blocklinks
2025-04-04 19:38:02 -07:00
FeluciaPS
3395c2ac7a
Add horizontal scroll bars to wide infoboxes on small screens (#2212)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-03-19 04:08:38 -07:00
Guangcong Luo
c724dae346 Preact: Support syntax highlighting in chat
This isn't actually too hard to backport to the old client, but I'll
leave that for someone else.

This is here partly as a tech demo of the syntax highligher, which I
plan to use in the teambuilder.
2024-08-30 13:36:05 -07:00
Guangcong Luo
946f699548 Improve dark mode checkboxes 2024-03-23 10:18:59 +00:00
FeluciaPS
28aa1e0167
Wrap long format names (#2211) 2024-01-19 15:55:02 -06: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