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.
Implements basic functionality of the ignore commands. I also added the ^ (prize winner) rank to the ignorable ranks since the inability for this rank to be ignored has been reported as a bug.
Minor
- Redesign battle room tabs in vertical tab mode (they're now
two-liners), kind of like in the original 2011 client
- Redesign roomtab tags (they're now smaller and bold)
- Fix scrolling to left when focusing textbox in Chrome Android
- This was a huge mess. If scroll snap weren't such a horrible mess
without CSS, I'd probably just give up and do it in JS. But given
that that's much worse, here we are working around tons of Chrome
and Safari bugs.
- Update replay watching UI to match modern PS
- "Play/Pause" button has constant width
- "Switch viewpoint" instead of "Switch sides"
- "Last turn" -> "Prev turn"
- Disable "First turn" and "Prev turn" when already at first turn
- modern button arrangement
- Battle controls: align to bottom in mobile UI
Trivial
- rename `PS.closePopupsUntil` to `PS.closePopupsAbove`
- fix `<a href=".">` links to Home
- Fix ranks in DM userlist
Chrome makes it much harder to grab keys now. I've set up a way to
make it easy (since we're going to be doing it once a week).
Chrome did make it hard on purpose, so I'm a little paranoid, but
I think probably these warnings will be enough. If we develop a
phishing problem I'll revisit this.
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
- Stop sending the server empty `/cmd userdetails`
- User search popup uses the server username instead of the searched
name
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
Moderate:
- Fix double messages when being DMed (and otherwise joining a room
server-side)
- Refactor PSModel to support passing a value with updates, so
PSStreamModel is explicitly about tracking an update backlog.
- Work on supporting AFD mode (it doesn't seem to work yet)
- Fix music still playing after closing a battle
- Show username (with capitalization and spaces) in DM titles
- Don't let people try to search for battles without choosing a username
Minor:
- Remove random BOM that made it into some files?
- Correct date Preact client started (I mistook the date testclient was
created)
- Refactor updateLayout
It's finally here and it's beautiful! I've had this design in my mind
for around ten years, ever since I first started working on a Preact
client.
The idea is that on small screens, you'd just scroll left to get to
the menu, instead of needing to press the menu button. This turned out
to work surprisingly well and I'm pretty happy with it.
This also exposed a number of bugs. It turns out most of our popups are
not written with horizontal scrolling in mind, so I had to fix
popup rooms as well as BattleTooltips.
There's still plenty of improvements possible, but I'm already really happy
with what I've done so far.
- Rename RoomType to PSRoomPanelSubclass (so it doesn't conflict with
the other RoomType)
- Support message notation in popups
- Support searching for battles
- Fix Terastallizing in battles
- Fix cancelling challenges
- Support the games list
- Topbar now shows format name rather than ID
- Fix rejoining battles in progress
- Chats and battles: Focus on any click
- Retain chat/battle history when moving rooms in/out of mini-windows
- Real news (instead of just testclient placeholder)
- Add "Tournaments" and "Friends" main menu links
- Use new icon in upper left
- Use dark main menu groups
- Fix pref loading
- Support `/nick`
- Rename `room.handleMessage` to `room.handleSend` for clarity
- Rename `room.queue` to `room.backlog` for clarity
- Fix DM userlist after renames
- Darken chat logs in dark mode
- Refactor focusing text boxes on background panels
- Esc to close popups and hide rooms panel
- Fix joining hidden rooms by link
- Support renaming rooms
- Support searching the format dropdown
- Fix focus clicking in battle rooms
- Always use right panel URL if left panel is Main Menu
- Always use left panel URL if right panel is Rooms
- Add ARIA label for rooms tab
- Battles: Hide "Back" button when it's redundant with "Cancel"
- Support placeholders in new text boxes
- Hide Username box in DMs
- Show "Connecting..." in userbox until fully connected
- Refactor Ladder
- Fix bug where the last ladder category wasn't shown
- Rooms: Show Official/Chat/Hidden sections
- Blur backgrounds in dark mode high-readability sections
* Clientside javascript to collapse and expand datasearch results
* Fix results expanding when clicking a link in the results
* Remove for of syntax
---------
Co-authored-by: WifiLatency <michaelweger5053@gmail.com>
- custom room info is now in `room.args`
- rooms not compatible with URLs can be marked with `noURL`
- PMs renamed to DMs, and are now `dm-[userid]` instead of
`pm-[userid1]-[userid2]`
- custom popups now supported
- find-user popup now supported
- popups no longer come with padding, making them behave more like
other panels
- Don't clear PM contents when rearranging
- Don't show "Chat self" on others' usercards while not logged in
- Direct usercard URLs to Preact client
- Fix mini window collapse/expand
- Fix dark mode mini window and focused mini window styles
- Set titles for more readable history
- Stub PS.alert / PS.prompt
- Document RoomOptions
- Infer parentRoomid from parentElem
- Fix room focus issues
- Fix browser back/forward history
- Keep default format up to date
Unfortunately it seems like the console is the new hot place to say
hi to devs, rather than the source, but we're actually using the
console. So it's gotta be here.
ASCII art circle was outlined with
https://www.asciiart.eu/ascii-draw-studio
and the exclamation mark was done by tracing the old one. The rest,
including the anti-aliasing was entirely by hand, though.
- New subroom link style
- New-style format list button
- Fix router (accidentally deploying Preact client to
play.pokemonshowdown.com)
- Support omitting redundant `data-name` on username elements
Also fixes a whole bunch of bugs related to dragging rooms around.
Also renames:
- `activePanel` to `panel`
- `leftRoom` to `leftPanel`
- `rightRoom` to `rightPanel`
- `leftRoomWidth` to `leftPanelWidth`
Which should hopefully make the relationship between `panel` and
`leftPanel` more intuitive.
- 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
There's no easy way to enter a command in PS if you're not logged in.
This adds one.
This also standardizes the room ID for the console as `pm-`.
I'm still mulling whether `pm-[userid1]-[userid2]` should be the roomid,
or `pm-[pmtarget]`. Arguably it's nice for PMs to have the same roomid
for both sides of the conversation, but also arguably it's nice for
PMs not to change roomid when you change your own name (it'd still
change if your PM target changed name).