Commit Graph

287 Commits

Author SHA1 Message Date
Guangcong Luo
e1c06311f7 Support side-by-side battles on lower res
Previously, battles required 955 pixels each to appear side by side. Now,
we still guarantee 955 (well, 956 now) pixels for the left battle, but
we'll show a mini (320px) battle on the right side if it fits.
2016-03-05 21:44:49 -06:00
Teremiare
39a43db971 Add link visited to dark mode 2016-03-05 13:08:23 +01:00
Guangcong Luo
da3d78628a Make roomlist hover effect more visible 2016-02-16 20:42:49 -05:00
Richard Liang
97c210e1c5 Teambuilder validation eligibility tweaks
Disable Validate button until the user has at least one pokemon on their team
2016-02-10 13:29:02 +08:00
Guangcong Luo
337132bbd0 Add a focus style to buttons
Button-class buttons previously looked the same in and out of focus.
This gives them a similar focus class to textboxes.
2016-02-05 14:36:54 -05:00
Guangcong Luo
605fad27fd Make Watch Battles a room
PS rooms and PS popups apparently share a lot of code, making this
transition surprisingly easy.

Anyway, Watch Battles makes more sense as a room in the end. It also
fixes a lot of UI weirdness; modal popups are really the wrong control.
2016-02-05 14:36:54 -05:00
Guangcong Luo
b5ac1f5892 Improve Dark Mode
- Popups are now dark
- Topbar username outline is now black
- Teams and team/format selects are now darker
- Code and spoiler blocks are now dark
2016-02-05 14:36:54 -05:00
Guangcong Luo
1357a1da0d Fix teambuilder in dark mode 2016-01-30 07:08:13 -05:00
Guangcong Luo
1889c5e7b3 Improve roomtab close button alignment 2016-01-24 01:54:15 -05:00
Guangcong Luo
8854ef6af4 Fix tournaments in dark mode 2016-01-24 01:48:24 -05:00
Guangcong Luo
84ffec485f Fix PM window colors in light mode 2016-01-24 01:48:24 -05:00
panpawn
3b1ed8d0a0 Make darkmode's .message-error orange colored
This makes it much easier to read while in darkmode.
2016-01-23 21:16:05 -05:00
Guangcong Luo
776f679488 Improve Dark Mode
- The CSS layout is slightly better
- Improve textbox colors slightly
- Make PM boxes semitransparent like chat
- Fix chatroom list colors
- Fix |unlink| revealed text colors
2016-01-23 03:29:39 -05:00
Guangcong Luo
e81c021756 Widen PM windows 2016-01-22 18:30:24 -05:00
Guangcong Luo
0efc0e93b8 Dark mode: Improve textbox and PM colors 2016-01-22 04:42:30 -05:00
Guangcong Luo
4bd4dd61a3 Improve Dark Mode
This adds various improvements to ladder headers, tournaments, chat,
and teambuilder in dark mode.
2016-01-22 03:14:54 -05:00
Guangcong Luo
0a39ebf140 Use .textbox for teambuilder textboxes
Teambuilder textboxes used to have their own CSS. They've been updated
to use the regular textbox CSS. This also makes them dark in Dark
Mode.
2016-01-21 20:49:17 -08:00
Guangcong Luo
04e96af909 Dark mode (beta)
Exactly what it says on the tin.

Most things aren't particularly dark, but at the moment there aren't
any parts that look particularly ugly, so I consider this a mild
success.

More changes planned.
2016-01-21 02:34:26 -08:00
Guangcong Luo
700067c9aa Change close-roomtab button to button
There's a reason why close-roomtab buttons are <a> tags right now, and
I think it has to do with compatibility with some obscure browser like
IE9 or something.

Still, though, the CSS is much nicer this way, especially for the
upcoming dark mode feature, so I'll just commit this and figure out a
different workaround for whatever problems come up.
2016-01-21 02:31:13 -08:00
Guangcong Luo
17e19ae7c4 Teambuilder: Update team dragging
New shadow is semitransparent instead of solid gray, to better match
how room dragging looks.
2016-01-19 20:26:44 -05:00
Guangcong Luo
ee3c3f2f70 Fix outdated credit link
The original credit wasn't even actually used in PS officially, it was
just used for part of the 0.9 beta.
2016-01-15 23:34:56 -05:00
Guangcong Luo
95f291730a Make show-locked-hidden-text button subtler 2016-01-15 23:34:35 -05:00
Guangcong Luo
306b95d632 Fix switch menu HP bar alignment 2016-01-01 18:36:58 -06:00
Guangcong Luo
ecca6ca295 Teambuilder: Fix item icon alignment 2015-12-31 00:43:45 -05:00
Guangcong Luo
74ef3fd560 Give a pointer cursor to every button 2015-12-30 16:12:08 -05:00
urkerab
aa5b9cf915 Avoid changing border width or padding on hover 2015-12-29 13:54:20 +00:00
Guangcong Luo
764cbf9921 Add more space between name and icons in team selector 2015-12-26 10:18:50 -05:00
Guangcong Luo
d2bccb20de Use XY models in teambuilder
This removes some gradients and shadows, but it's totally worth it.
2015-12-25 10:48:09 -06:00
Guangcong Luo
a9ab52c9c8 Support pressing Up/Down in teambuilder lists
It should now be a bit easier to select pokemon/moves/etc with the
keyboard.
2015-12-25 10:45:00 -06:00
Guangcong Luo
c0676957a9 Merge pull request #586 from Teremiare/patch-1
Change the teambuilder clipboard design
2015-12-25 01:12:43 +00:00
Teremiare
d02aa26ff9 Change the clipboard design
Moved the pokemon down and the clear button up so that it better fits with the new folders

Change the clipboard design

Move the title and paste button.
2015-12-25 01:16:47 +01:00
Guangcong Luo
3509b782f7 Use new-size pokemon icons in Switch menu
This also slightly redesigns the switch menu.
2015-12-24 17:07:29 -06:00
Guangcong Luo
7aaf8f3cdb Use new-size icons for team lists 2015-12-24 14:58:53 -06:00
Guangcong Luo
fa09ddcf8a Teambuilder: Use new icons in teambar 2015-12-24 12:38:30 -05:00
Guangcong Luo
7fa72c1d20 Convert teambuilder from utilichart.js to search.js
The teambuilder is now running on search.js! Not all new features I'd
like to be in are in, but we've now reached feature parity, and most
of the bugs I found during testing have been fixed.

New in search.js is on-demand DOM loading, which basically means
much faster performance because instead of trying to load every single
row of e.g. the pokemon list at once, we just load the part that's
visible, and load the rest only when you scroll it into view.

Also new in search.js is a dexsearch-like feature, replacing the old
details-search system. The new filter system is simpler and more powerful
and has the same API as /dexsearch, although not all the more advanced
dexsearch features are supported.

On-demand DOM loading makes teambuilder loading pretty much completely
instantaneous. There are other small differences in how selection of
pokemon/items/abilities/moves works, but it should overall make more
sense.
2015-12-22 00:06:27 -06:00
Guangcong Luo
11e3863aa7 Improve utilichart/search code
The utilichart-relevant code has been overhauled for simplicity.

Utilichart results and headers are now both 33 pixels tall, total.

Headers are slightly larger, to make them fill the space better. The
larger font size makes them more header-like, anyway.

Results are two pixels taller than before, giving them enough room for
gen 6 pokemon icons (not enabled in this commit), and in general
aiding performance slightly (fewer result rows on the screen at a
time).

Making them both 33 pixels allows height to be computed precisely
as 33*rows, which is relevant for result rows to be inserted into
the DOM on-demand.

On-demand DOM insertion has previously been implemented in pokedex.js,
but the new on-demand DOM code in search.js works slightly differently.
It makes stronger assumptions (that the only bottleneck is DOM
insertion speed, and that ctrl+f without scrolling to the bottom
doesn't need to be supported, and that result rows and result
headers are always 33 pixels tall), which makes for much simpler
code, and is presumably slightly faster because of this.

The new on-demand DOM code is surfaced by an "All results" button
in the pokedex (pokemonshowdown.com/dex/), for basic testing, but
the long-term plan is for it to be used in the teambuilder for
pokemon/etc selection, to massively increase performance.

Nearly two years after I wrote search.js to be a better utilichart
API than utilichart.js, we'll soon finally start using it in place of
utilichart.js in the main sim teambuilder!
2015-12-20 04:28:15 -05:00
urkerab
30e0324f7c Don't reset the whole border on hover 2015-12-19 19:12:53 +00:00
urkerab
b6597621e7 Avoid changing border width or padding on hover 2015-12-18 10:46:50 +00:00
Guangcong Luo
31d805f894 Minor style tweaks
- Separator line in teambuilder was appearing inconsistently
- We now give a default size for button, button big, and button small
2015-12-17 06:40:55 -05:00
Guangcong Luo
42ddd81c68 Teambuilder folder feature
In addition to format folders, we now support regular folders that
behave as you'd expect. These folders even map to actual
directories in the downloadable client!

Folders are delimited by `/` in team names in all storage formats
(including export, and packed saving), and are stored in the
`.folder` field of team objects.

Because of this, `/` is no longer an acceptable character in team
names. This improves interoperability with teams and filesystems,
so we should probably have done this anyway.

I also added back a friendly message to the top of the teambuilder.
2015-12-17 06:40:55 -05:00
Guangcong Luo
c9febae91e Fix some bugs in recent teambuilder changes
- 'uncategorized' was sometimes in the wrong place
- Firefox Windows button alignment
- crash when creating new format folder
- gen 2 and gen 3 were mixed up
2015-12-17 06:40:54 -05:00
Guangcong Luo
c00e4088d7 Teambuilder: Support dragging teams onto folders
This was ridiculous, or, in other words, par for the course when
you're dealing with HTML5 drag-and-drop.

Folders are now clickable divs instead of buttons. This turned out
not to be necessary as it was a different issue that was causing
drag-and-drop to fail, but I'd already changed everything over when
I discovered the real bug. Oh well, some things are slightly nicer
this way.
2015-12-16 01:23:39 -05:00
Guangcong Luo
a8c3b54006 Tweak some button appearances 2015-12-16 01:23:39 -05:00
Guangcong Luo
e2ea9e5267 Tweak teambuilder appearance 2015-12-15 21:51:35 -05:00
Guangcong Luo
04246a51fb Redesign teambuilder folders
This didn't come out looking nearly as perfect as I hoped, but
honestly it looks pretty good and I don't know how to make it
better.
2015-12-15 20:01:05 -05:00
Guangcong Luo
b5647d409a Improve team selector
The team selector now hides teams that aren't for the format, by
default. Other teams can still be selected with a 'more' button.

There's now a Teambuilder button to be taken straight to making
or editing teams for that format.
2015-12-15 18:37:01 -05:00
Guangcong Luo
3a41c51c37 Basic teambuilder 'folders'
The folders are really just format filter views, but in theory, this
should be all people need.

This implementation is very basic but I'm pretty sure I've gotten all
the bugs out. On small screens, the folders simply don't appear, on
the assumption that this will only happen on mobile, where people
shouldn't be creating enough teams to need folders, anyway. (I'll
fully support mobile later.)

Third-party servers may need to re-style the Edit and Delete buttons,
since they're black on transparent, which may interact poorly with
certain edgy background styles.
2015-12-15 17:34:53 -05:00
Guangcong Luo
1bcc75e750 Use relative URIs in CSS where possible
This replaces the previous protocol-relative URIs, which should allow
testclient to work much better.
2015-12-13 13:25:41 -05:00
Guangcong Luo
ec05062525 Make sure disabled buttons stay light gray 2015-12-12 23:09:43 -05:00
Guangcong Luo
6924cf98d6 Make the main menu footer easier to see
It was kind of hard to make out on certain backgrounds.
2015-12-12 23:09:15 -05:00
Guangcong Luo
d429ea3797 New background popup
This replaces the old background dropdown with a background popup
that does everything the old one does, but fancier.
2015-12-12 04:04:10 -06:00
Guangcong Luo
6491a7dba6 Redesign 'Look for a battle' button 2015-12-11 23:34:04 -05:00
Guangcong Luo
3f7f4fbdfa Merge pull request #534 from urkerab/tooltip-ignore-mouse
Tooltips should be ignored by the mouse
2015-12-07 08:32:08 +00:00
Guangcong Luo
999cf4b3a6 Center main menu on small layouts 2015-12-01 12:47:23 -06:00
Guangcong Luo
b718a335a2 News tracking 2015-11-30 02:11:27 -05:00
Guangcong Luo
c218046b77 Better support for 'working offline'
PS's UI is now updated to make it clearer whether or not you're
connected to a server, and which features are and aren't
available while disconnected.

The Reconnect? popup's "close" button has been renamed "Work offline",
to make it clearer that it's for people who want to continue using
the teambuilder or whatever while disconnected.

The button is a slight misnomer since some features, like the
Ladder, don't work without an internet connection.
2015-11-29 20:16:26 -05:00
Guangcong Luo
41326c5232 Support multiline buttons in Formats menu 2015-11-29 04:39:30 -05:00
Guangcong Luo
69e0b5fdc3 Nicer looking horizontal rules
They now look Web 2.0 instead of Web 1.0! ...namely, they're just
horizontal gray lines instead of weird attempts to look embossed.
2015-11-29 04:37:12 -05:00
Guangcong Luo
8264fea7d2 Add Meloetta icons to roomlist
2.7ish years ago, when I redesigned PS, PS's mascot was Meloetta,
and in the old design, there was a Meloetta-P icon on "Look for a
battle" and a Meloetta-A in the backgroud of the chat room.

The new design was built around custom backgrounds, and there
wasn't really room to fit Meloetta back in.

Well, now, I've finally fit Meloetta back in next to the user count
and battle count, and it actually looks pretty good there. Now more
people can be aware that PS has a mascot!
2015-11-28 04:36:41 -05:00
Guangcong Luo
f8ec5b9142 Redesign Mega Evolution checkbox 2015-11-19 06:55:22 -05:00
MasterFloat
a6291fe315 menugroup button - disabled state color change
When you looks for a battle you get this grey color which doesn't really suite the red button: http://prntscr.com/8z9e9g
So I changed it to the border's color (a bit darker): http://prntscr.com/8z9hx4
2015-11-05 12:00:41 +01:00
urkerab
fc5f5a0c9e Tooltips should be ignored by the mouse 2015-11-01 21:48:36 +00:00
Guangcong Luo
3533bc9ac2 Merge pull request #515 from urkerab/tour-elimination-highlight-user
Highlight the current user in elimination tournaments
2015-10-28 19:38:49 -05:00
Pedro Cardoso da Silva
685ddab60e Fix Team Import/Export barely visible > 640px width
Yeah, you could still drag the resizer down, but this make it less worse.
2015-10-28 10:04:18 -02:00
urkerab
6717c5f11f Highlight the current user in elimination tournaments 2015-10-20 11:25:21 +01:00
Ivo Julca
4bcc23dd50 User popups: visually indicate if the user is in the room/battle 2015-10-16 01:46:52 -05:00
urkerab
88f86589c6 Don't let room names overflow the tablist popup 2015-10-05 00:38:22 +01:00
Guangcong Luo
bdcbded0bb Update Font Awesome to 4.4.0
Font Awesome 3 -> 4 was a backwards-incompatible change, so this
update is pretty invasive. I tested everything we use it for and it
still works, though. Including supporting both Font Awesome versions
in battle.js.
2015-09-25 02:46:34 -05:00
Guangcong Luo
bb6b73b2dc Merge pull request #483 from urkerab/userlist-button-firefox
Firefox has magic button overflow
2015-09-24 14:56:42 -05:00
urkerab
42642f39b4 Firefox has magic button overflow 2015-09-24 09:52:34 +01:00
Guangcong Luo
447d11bd8a Improve visual appearance of PM header
Specifically, provide visual feedback that clicking it expands
and collapses PMs.
2015-09-23 20:23:01 -04:00
The Immortal
511cae6cf2 Merge pull request #475 from sobolews/teambuilder-validate
Add a validate button to the teambuilder
2015-09-19 21:12:28 +04:00
Carl Sobolewski
6855770aa6 Add a validate button to the teambuilder
The validate button sends the current team and a validation request to the
server. The server will respond with a positive acknowledgement for valid teams,
or else a list of problems (the same list as when seeking a battle).
2015-09-19 01:19:13 -06:00
urkerab
d54911cfe2 Preview your username colour as you type 2015-09-18 21:41:28 +01:00
urkerab
034b31ea52 Make teambuilder most resistant to zoom changes 2015-08-28 12:16:14 +01:00
urkerab
bd8dd3bf45 Make teambuilder more resistant to zoom changes 2015-08-26 14:37:31 +01:00
Guangcong Luo
099e5bcf68 Only show revealed Pokemon in main area
PS now tracks a lot more information about what information your
opponent does and doesn't know about you, for ease for keeping
track of things.
2015-07-26 03:43:53 -04:00
Guangcong Luo
d4ccabebef Redesign room join page
User and battle count are now buttons! Also, tables for layout,
but to be fair, the data is sort of tabular, and this is
basically the best option for this layout. Flexbox supposedly
fixes this, but we support plenty of browsers that don't
support flexbox, and I'm pragmatic enough to use tables here.
2015-07-24 03:18:32 -04:00
Guangcong Luo
7e4aa56313 Improve tournament UI
Some wording/layout is changed to look less ugly. This does come
with one major change, though: The team dropdown is now visible
at all times after clicking 'Join', and your selected team will
stay selected throughout the entire tournament.
2015-07-20 05:45:53 -04:00
Guangcong Luo
faf9ec33ce Support in-battle chat in low res 2015-07-17 14:41:30 -04:00
Guangcong Luo
99ae3f700d Zoom out teambuilder in mobile
The teambuilder honestly isn't great in mobile, but since it's
impossible to zoom out in mobile, it's better to start zoomed out
and let the user zoom in, than start zoomed in and not give the
user a choice.
2015-07-17 14:40:03 -04:00
Guangcong Luo
ba0a7e72ff Improve tab overflow button
With the tab overflow menu being perfect, I might as well fix the
button that opens it. It used to use default browser styles, which
was mostly fine in OS X but ugly on other systems, and nearly
unusable in iOS. The new one looks lovely on all OSes.
2015-07-17 14:40:03 -04:00
Guangcong Luo
ebd0bfef58 Fix disappearing Close button on tab overflow menu 2015-07-17 14:40:03 -04:00
Guangcong Luo
451a63348f Low-res topbar
We now support a new topbar optimized for low resolutions.
2015-07-17 03:10:57 -04:00
Guangcong Luo
59e01485a7 Nicer-looking tab overflow menu
.button styling has been consolidated in CSS, and the tab overflow
menu has been adjusted to use button styling, which is the "more
improvements in the future" mentioned by 69524e935b.

I now declare the tab overflow menu officially out of beta. Now
for the rest of PS!

The Ladder now also uses the new button styling, but it's not out
of beta yet, I just wanted to see how it looked.
2015-07-17 03:10:57 -04:00
Guangcong Luo
f91a6478ee Darken tab mouseover effect 2015-07-16 05:14:33 -04:00
Guangcong Luo
5a7acd09a9 Slightly faster tournament open/close animation 2015-07-15 19:04:28 -04:00
Guangcong Luo
838d855c72 Tweak chat appearance
- Highlighted messages now span the entire width of the chat.
- Highlighted and personal messages are more vertically centered.
- Links and code are again properly hidden by spoilers
2015-07-15 18:01:40 -04:00
Guangcong Luo
31c035abcb Make highlight background semitransparent 2015-07-15 06:03:22 -04:00
Guangcong Luo
1fdc52cbe7 Fix battle layout on iOS and old Android 2015-07-15 00:53:00 -04:00
Guangcong Luo
c63c75651a Improve teambuilder in low-res
This isn't a great improvement, and it involves horizontal scrollbars,
but it's still better than how it worked before.
2015-07-15 00:39:58 -04:00
Guangcong Luo
b96077039f Fix low-res userlist
The userlist in low-res mode now scrolls to top before collapsing,
which fixes the issue where it might not display the user-count
and toggle button.
2015-07-15 00:32:48 -04:00
Guangcong Luo
cce2fa5019 Responsive battle UI
Instead of our previous minimum width of 640px, the new battle UI is
now responsive down to 320px.

Screenshot: http://d.pr/i/17UYD/1V6IYX2T
2015-07-14 19:00:58 -04:00
Guangcong Luo
69524e935b Improve tab overflow menu
It might need more improvements in the future, but for now it's
already pretty good for switching between rooms.
2015-07-14 19:00:58 -04:00
Guangcong Luo
ccf73e7be9 Make PM/News close button easier to hit 2015-07-14 19:00:58 -04:00
Guangcong Luo
7d144dd411 Resize teambuilder clipboard
Old one was awkwardly wide
2015-07-14 19:00:58 -04:00
Guangcong Luo
ad692c2b6f Fix footer-mainmenu overlap on low res 2015-07-14 15:08:51 -04:00
Guangcong Luo
924ccd19fc Nicer tab overflow menu 2015-07-14 15:08:05 -04:00
Guangcong Luo
ebd77434d6 Show minimized userlist in low resolutions
Previously, the userlist would be completely hidden in low
resolutions, but now a user count is displayed in the top left
corner. When clicked, the entire userlist appears.
2015-07-14 15:07:38 -04:00
Ivo Julca
d2ccb0530a Remove deprecated message styles from client.css 2015-07-10 06:50:59 -05:00