Commit Graph

23334 Commits

Author SHA1 Message Date
Tim Abbott e9b3ac3f34 travis: Remove now-unnecssary items from apt-mark hold lists.
This seems to have been causing the travis production suite to fail.
It's a direct consequence of removing travis' giant library of apt
sources.list files; now that those are gone, there aren't copies of
all these extra packages available anyway.
2017-11-30 14:56:36 -08:00
Brock Whittaker 2a7ea5ca53 dark-mode: Change star color to be lighter.
This changes the star color to be lighter and visually softer to be
easier to spot in the page.
2017-11-30 14:40:28 -08:00
Brock Whittaker 5735f8251b dark-mode: Make typeaheads dark mode compatible.
This makes the typeaheads dark-mode compatible by changing to the
background to be dark and the text to inherit from the body text
(rather than bootstrap’s default of #333).
2017-11-30 14:40:28 -08:00
Brock Whittaker 9d255ac7de dark-mode: Respect ".no-style" attr on buttons.
This respects the ".no-style" declaration on buttons and sets
the background back to transparent in dark mode (from a slightly
darkened background).
2017-11-30 14:40:28 -08:00
Brock Whittaker 6d5835773e Informational-overlays: Change "Search Operators" red to better red.
The color of red it was was pretty terrible, so this changes it to a
better shade that also just happens to look good with dark mode.
2017-11-30 14:40:28 -08:00
Brock Whittaker 525e8e36d7 dark-mode: Fix tab list stream to not inherit color.
The streams can be light and if it inherits the white text color they
will not be readable. It should default to dark text with the exception
of when the tab is is `.dark-background`, in which case then it should
revert to inheriting the white color.
2017-11-30 14:40:28 -08:00
Brock Whittaker 03c15fd9dc dark-mode: Change edit notice medium grey to translucent.
This changes the font color from a medium grey to the base font color
plus an opacity of half.
2017-11-30 14:40:28 -08:00
Brock Whittaker 675cb8599d message-feed: Increase font weight of "(EDITED)".
This increases the font weight from 300 to 400 to increase visibility
of the edit notice in messages.
2017-11-30 14:40:27 -08:00
Brock Whittaker a48568ebbe message-edit-history: Update to new button default style.
This updates an old button to the new button style.
2017-11-30 14:40:27 -08:00
Brock Whittaker 180dee5c5e message-feed: Remove unnecessary text shadow on date row.
This removes an unnecessary text shadow from the message feed date rows
that doesn’t show on white backgrounds and looks unreadable on dark
ones.
2017-11-30 14:40:27 -08:00
Brock Whittaker f6bbc1f274 dark-mode: Change date row from medium grey to translucent.
This changes the color from a medium grey to a translucent that
inherits the base text color.
2017-11-30 14:40:27 -08:00
Brock Whittaker 4f81bdd0a6 message-edit-history: Make dark mode compatible.
This makes the edit history overlay dark mode compatible by changing
the background to the dark blue along with changing the highlight
colors to work with white text and dark backgrounds.
2017-11-30 14:40:27 -08:00
Brock Whittaker 625c163ba0 dark-mode: Convert medium grey to translucent base color.
This changes the message time from a medium grey to something that is
translucent base color instead.
2017-11-30 14:40:27 -08:00
Brock Whittaker b2194e860b message-feed: Reduce animation time for date.
This reduces the animation time for the message date to about half.
2017-11-30 14:40:27 -08:00
Brock Whittaker 80b68c3e2b message-edit-history: Increase font weight of author.
This increases the font weight of the author to be a normal font weight
rather than a thin one since it’s already too faint to see on many
monitors.
2017-11-30 14:40:27 -08:00
Brock Whittaker 7883897165 muted-topics: Enable dark mode for mute notifications.
This enables dark mode by changing the background to a dark color
in the stream/topic mute notifications.
2017-11-30 14:40:27 -08:00
Brock Whittaker afce6b18bf muting: Change muting overlay to use standard buttons.
This changes the overlay “Unmute” button to use the default `.button`
style.
2017-11-30 14:40:27 -08:00
Brock Whittaker bc11b0f1e8 Revert "dark-mode: Remove unnecessary CSS and fix dark mode bugs."
This reverts commit 64381b6e38.

It turns out we actually needed this for inline code blocks to work.
2017-11-30 14:40:19 -08:00
Brock Whittaker 30475ba4c4 Sidebars: Add border radius to hovered <li>.
This adds a border radius the the <li> to make the selections and
hover areas look a bit more polished and clean.
2017-11-30 14:34:31 -08:00
Tim Abbott e50f036a99 travis: Remove all travis sources.list files early.
This fixes most of the current Travis CI failures, and should help
prevent future ones from cropping up, since we're just deleting Travis
CI's giant library of apt sources up front.

The production build is still failing, since apparently some of the
packages we were doing `apt-mark hold` on no longer exist.
2017-11-30 14:19:47 -08:00
Rohitt Vashishtha 10618157a2 typeahead: Refactor typeahead tests to include cursor position. 2017-11-30 13:23:46 -08:00
synicalsyntax 6e353a0550 hotkeys: Clear compose box warnings with escape key.
Fixes #7531.
2017-11-30 11:55:50 -08:00
cPhost 6e5dab6a1e node tests: Cover set_compose_defaults. 2017-11-30 06:25:36 -08:00
Brock Whittaker e0236646bf night-mode: Add custom CSS through JS.
This adds custom CSS through JavaScript for things that do not
scope well and will override other inherited styles.

This should ONLY be used for problematic CSS that has no obvious
or easy CSS-only solution.

(Specifically, we need this for the "default link" styling, which is
hard to override because we don't want to start winning ties due to
specificity that we would not have won in the light theme).
2017-11-29 23:06:11 -08:00
Tim Abbott 6d887dc6ee test-backend: Require 100% test coverage on confirmation code. 2017-11-29 22:20:06 -08:00
Rishi Gupta 7d1c88f0fb invitations: Limit realms to 100 invites per day.
To guard against using zulip invites as a vector for spam. Stopgap measure
until we figure out something better.
2017-11-29 22:18:05 -08:00
Rishi Gupta 8dc0adbed8 confirmation: Add Confirmation.realm. 2017-11-29 22:18:05 -08:00
Rishi Gupta 93abac7952 confirmation: Fix mypy annotation in create_confirmation_link. 2017-11-29 22:18:05 -08:00
Rishi Gupta 7c9694077e confirmation: Move check_prereg_key_and_redirect to registration.py. 2017-11-29 22:18:05 -08:00
Tim Abbott 6e8f4ffc77 test_signup: Expand tests for invalid confirmation links.
We'll need the expanded test coverage when we move
check_prereg_key_and_redirect to zerver/views/registration.py to avoid
test failures, and these are also tests we should really have anyway.
2017-11-29 22:18:05 -08:00
Rishi Gupta 3675d97870 confirmation: Refactor views.confirm to be clearer.
Also gives more appropriate error messages for expired user_registration and
invitation links.
2017-11-29 22:03:09 -08:00
Rishi Gupta 331a9bee6b confirmation: Add Confirmation.REALM_CREATION.
Does not change any behavior. Groundwork for adding a realm field to
Confirmation.
2017-11-29 22:03:09 -08:00
Rishi Gupta 0f5c0ea92b confirmation: Add comment explaining RealmCreationKey. 2017-11-29 22:03:09 -08:00
Rishi Gupta dc244bd27e confirmation: Fix time enforcement in check_key_is_valid.
The previous code gave the user an extra day past
REALM_CREATION_LINK_VALIDITY_DAYS. Also rewrote it to match the parallel
logic in get_object_from_key.
2017-11-29 22:03:09 -08:00
Greg Price 4926228071 rabbitmq: Do a better job of retrying failed connections.
Empirically, the retry in `_on_connection_closed` didn't actually work
-- if a reconnect failed, that was it, and the exception handler
didn't get run.  A traceback would get logged, but all its frames were
in Tornado or Pika, not our own code; presumably something magic and
async was happening to the exception.

Moreover, though we would make one attempt to reconnect if we had a
connection that got closed, we didn't have any form of retry if the
original attempt at connecting failed in the first place.

Happily, upstream offers a perfectly reasonable bit of API that avoids
both of these problems: the on-open-error callback.  So use that.
2017-11-29 16:56:29 -08:00
Greg Price 7ac2b58584 rabbitmq: Reorder a bit to group our reconnect logic together. 2017-11-29 16:56:29 -08:00
Greg Price c32b16715d tornado: Use spiffy new `call_later` rather than `add_timeout`.
This method was new in Tornado 4.0.  It saves us from having to get
the time ourselves and do the arithmetic -- which not only makes the
code a bit shorter, but also easier to get right.  Tornado docs (see
http://www.tornadoweb.org/en/stable/ioloop.html) say we should have
been getting the time from `ioloop.time()` rather than hardcoding
`time.time()`, because the loop could e.g. be running on the
`time.monotonic()` clock.
2017-11-29 16:56:29 -08:00
Greg Price 73886f57d2 zerver/lib/queue: Clean up import order. 2017-11-29 16:56:29 -08:00
Greg Price 3c4e4c14c9 rabbitmq: Add on-close callback atomically in creating the connection.
Adding it afterward is inherently racy, and upstream's API is quite
reasonable for avoiding that -- just like we can pass an on-open
callback up front, we can do the same with the on-close callback.

This is a more thorough version of 4adf2d5c2 from back in 2013-04.
2017-11-29 16:56:29 -08:00
Greg Price e88c2a7ee4 rabbitmq: Cut redundant `stop_ioloop_on_close` parameter.
The default value of this parameter is already False upstream.
(It was already False in pika version 0.9.6, which we were
supposedly using when we introduced this in 4baeaaa52; not sure
what the story was there.)
2017-11-29 16:56:29 -08:00
Brock Whittaker e7ec21b4cf dark-mode: Add pigments support for dark mode.
This adds support for dark mode pygments that are good syntax
highlighting colors to be seen on a dark background.
2017-11-29 16:44:43 -08:00
Brock Whittaker a7c2258e12 dark-mode: Change drafts container to be dark.
This changes the drafts container to be dark.
2017-11-29 16:44:43 -08:00
Brock Whittaker 387bdd34c7 dark-mode: Change top-of-messages colors for dark mode.
Make it a white background with the “Z” in the same dark grey/blue
color as the background.
2017-11-29 16:44:43 -08:00
Brock Whittaker d883f3308c dark-mode: Refactor top-of-messages logo to have CSS styles.
This changes the fill and stroke styles to be in CSS rather than
inlined in the SVG, making it easier to change and override elsewhere.
2017-11-29 16:44:43 -08:00
Brock Whittaker a2729c52d0 dark-mode: Fix incorrect hover colors on `.stream_label`.
The headers on some dark stream labels would turn dark and and on some
light turn light. This makes sure that does not happen.
2017-11-29 16:44:43 -08:00
Brock Whittaker 6d8d5f7e95 invite-users: Change buttons to new style.
Some of the buttons in the footer are still the `.btn` class, so these
have been converted to the `.button` class.
2017-11-29 16:44:43 -08:00
Brock Whittaker 618455c7aa dark-mode: Fix invite overlay to have a dark background and borders.
This changes the modal background to be dark and changes the header
border to be darker instead of lighter like the subs and settings ones
are.
2017-11-29 16:44:43 -08:00
Brock Whittaker 836bfd8f45 dark-mode: Refactor gear-menu icon to be translucent.
This makes the gear-menu icon translucent rather than medium grey and
black (which isn't even our base text color) to be half opaque (approx)
and base text color.
2017-11-29 16:44:43 -08:00
Brock Whittaker e37838c926 dark-mode: Refactor compose icons to be translucent.
This makes the compose icons translucent rather than medium grey
and black (which isn't even our base text color) to be half opaque
(approx) and base text color.
2017-11-29 16:44:43 -08:00
Brock Whittaker edffa56c51 dark-mode: Style alerts to be darker red.
This styles the alerts to be a darker red that blends more with the
blue dark mode theme.
2017-11-29 16:44:43 -08:00