Commit Graph

20000 Commits

Author SHA1 Message Date
neiljp (Neil Pilgrim) 116b8dd9c9 mypy: Set assign_queue() parameter queue_type to not be Optional. 2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim) 24cc14c10d mypy: Refer to default_stream in if statement, allowing type inference. 2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim) 982c0481d0 mypy: Mark log_file as Optional[str] in test_server.py. 2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim) 60baedcab9 mypy: strict-optional fixes for Trello integration. 2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim) d9e36c8156 mypy: strict-optional fixes in zerver/tornado/socket.py. 2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim) b7103752dc mypy: Add assertions relating to Popen.stdout with subprocess.PIPE use. 2017-08-07 21:27:50 -07:00
Greg Price b6d90808a5 prod: Make `cp` copy a directory to its target, not into it.
This was causing `language_options.json` and the `django.mo` files
never to get updated by `upgrade-zulip-from-git` after first deploy.
The stale `django.mo` files meant that any message string which wasn't
in the original from-tarball installation of the server would never
get translated.

The same bug exists in several other spots in this file.  Some of
our repetitive-yet-subtly-different uses of `cp` should probably
turn into just a list of arguments to one `rsync -R` command.
Also this should probably really use `rsync --delete` -- for example,
in prod on zulipchat.com we still have lying around a `locale/zh_CN`
directory, even though in a freshly-built static tree there's only
`locale/zh_Hans` instead.
2017-08-07 19:23:27 -07:00
Vaida Plankyte cd560a80f2 settings.py: Add GOOGLE_OAUTH2_CLIENT_ID to DEFAULT_SETTINGS.
Allows the command-line help text to appear for Google
authentication, rather than a traceback.
2017-08-07 18:38:06 -07:00
Greg Price 8ccd8a7d27 settings: Wait for i18n setup before rendering settings nav.
Much like the parent commit and 038a2c769, but this time for the
"Settings"/"Organization" nav at the upper-left of the settings overlay.
2017-08-07 18:22:51 -07:00
Greg Price ee3ead2744 ui: Wait for i18n setup before rendering hotkeys help.
Much like 038a2c769, but for the three tabs at the top of the
`?` help overlay for keyboard shortcuts.
2017-08-07 18:22:51 -07:00
Greg Price 8ab213e3e4 locale: Update Japanese strings. 2017-08-07 16:58:10 -07:00
Pweaver (Paul Weaver) a20e1298ab webpack: jQuery and underscore should be compilied normally to make errors readable.
We will use the normal compliation process so we can understand errors in development and production.
2017-08-05 19:53:56 -07:00
Jack Zhang 4ba5b2f364 docs: Create hotspots subsystem documentation. 2017-08-05 18:32:37 -07:00
Jack Zhang d9c1ad5db2 hotspots.py: Add SEND_ALL flag.
Used to view all hotspots in development.
2017-08-05 18:32:37 -07:00
Jack Zhang c69b5d7d65 hotkey: Add support for hotspots on enter. 2017-08-05 18:32:37 -07:00
Jack Zhang 04fda9e51f hotspots: Decrease default hotspot icon z-index to 100.
This keeps hotspot icons positioned at the front of the message
viewport but behind sidebars (i.e. the left sidebar has a z-index
of 103). Hotspots associated with elements outside of the message
viewport should be individually adjusted at the bottom of hotspots.css.
2017-08-05 18:32:37 -07:00
Jack Zhang 1e40665e51 hotspots: Debounce hotspot placement on UI updates by 10ms.
A small delay to ensure that the event (i.e. a click) has completed
and the UI has updated before hotspot icon and popover placement
is recomputed.
2017-08-05 18:32:37 -07:00
Jack Zhang 5ce0db9f43 hotspots: Add friendly whale illustration to popover. 2017-08-05 18:32:37 -07:00
Jack Zhang bbe8f73c23 popovers: Reimplement compute_placement.
compute_placement utilizes the dimensions of the viewport, viewport location of
an element, and dimensions of an element to determine if a popover will fit
horizontally and/or veritically given its orientation. The default placement
is now viewport_center, which displays the popover, without an arrow, in the
fixed center of the viewport.

This should be particularly useful for hotspots on mobile or large popovers
that contain a lot of content. The property hotspot.location.popover can be
optionally set to fix the orientation of a popover (most likely to
VIEWPORT_CENTER).
2017-08-05 18:32:37 -07:00
Vaida Plankyte 4b728eda1b frontend: Fix unnecessary aria-hidden assignments in informational overlay modals.
Fixes #6024.
2017-08-05 18:11:27 -07:00
Vaida Plankyte ca19cb6900 frontend: Fix stream-creation aria-label assignment. 2017-08-05 18:11:27 -07:00
Vaida Plankyte ee23e6f118 frontend: Fix default_language_modal aria-hidden assignment. 2017-08-05 18:11:27 -07:00
Harshit Bansal 5a5072730c realm_emoji: Don't accept animated realm emoji with unequal dimensions.
Fixes: #3654.
2017-08-05 18:07:21 -07:00
Brock Whittaker 4321f1f2b4 /help/: Remove "| User Documentation" string in narrow windows.
This responsively moves the header so that it doesn’t push the login,
registration nav options to the next row.
2017-08-05 17:57:07 -07:00
Brock Whittaker ef3131c77b help: Change .header nav to be on top of page elements.
WARNING: This change affects all portico pages, but it looks better.
This makes the nav sit on top and have a subtle box shadow.
2017-08-05 17:57:03 -07:00
Brock Whittaker 22eb102a8e help: Change .markdown .content to be white. 2017-08-05 17:57:02 -07:00
Brock Whittaker 3f550a940b help: Impose a max width for the .markdown .content. 2017-08-05 17:57:00 -07:00
neiljp (Neil Pilgrim) aefc256f23 mypy: Upgrade mypy beyond release 0.521 to mypy commit on Aug 3 2017. 2017-08-05 17:53:23 -07:00
neiljp (Neil Pilgrim) 334348cbca mypy: Use namedtuples for request objects in test_messages.py. 2017-08-05 17:53:18 -07:00
neiljp (Neil Pilgrim) 6ac6d6ff5d mypy: Add note re mypy supporting only global type aliases.
https://github.com/python/mypy/issues/3145
2017-08-05 17:53:18 -07:00
neiljp (Neil Pilgrim) 6bed9da353 mypy: Amend flock contextmanager to accept Union[int, IO[Any]]. 2017-08-05 17:53:18 -07:00
Tim Abbott fc0144f6e4 test_decorators: Annotate fake Request as HttpRequest. 2017-08-05 17:53:18 -07:00
Tim Abbott 4bb979d869 test_helpers: Fix annotation for avatar_disk_path. 2017-08-05 17:53:18 -07:00
Tim Abbott 0d5cd2d5b7 tools: Remove obsolete print-all script.
This is an old script that could be used to literally print the Zulip
codebase to a PDF.  It hasn't been run since ~2013, and probably never
will be used again.  Since it's probably not interesting enough to be
its own open source project, we should just delete it.
2017-08-05 17:53:17 -07:00
Tim Abbott 52100e0b3b run-mypy: Remove requirement to be inside a Zulip venv.
It can be nice to just install+run mypy from outside.
2017-08-05 16:49:51 -07:00
Tim Abbott c657db77e8 lightbox_canvas: Fix use of unsupported const. 2017-08-05 16:47:11 -07:00
Tim Abbott f7cfd76403 run-mypy: Check PROVISION_VERSION.
Since new mypy versions frequently break old versions, this check is a
useful way to help prevent problems where mypy output is wrong.

We could probably tighten this by checking explicitly the expected
mypy version from requirements.txt, but that's work.

Replaces #5026.
2017-08-05 16:18:48 -07:00
Brock Whittaker e22920bef6 Fix lightbox zoom issues.
This fixes the lightbox zoom issues that occurred on some browsers
due to the units of `deltaY` being in lines rathern than pixels,
making it incredibly slow to zoom.
2017-08-05 15:47:34 -07:00
Pweaver (Paul Weaver) 48815204e4 Changes node_modules to default to the same args for generate_sha1sum.
Since we can use both perfer_offline=True and False in a since build
prefer_offline shouldn't be used as a cache key or it will confuse the
cleanup script. Since yarn install (if successful) should be idempotent.
This will probably be ok.
2017-08-05 12:29:16 -07:00
Pweaver (Paul Weaver) 1afaa67c7c deps: Change npm to yarn for reliablity, security, and speed. 2017-08-05 12:29:06 -07:00
Pweaver (Paul Weaver) f444c68b62 Indent install-node code block in preperation for yarn migration. 2017-08-05 12:18:47 -07:00
neiljp (Neil Pilgrim) 3ca34bebdc mypy: Use Callable as parameter for simulated_queue_client.
Previously the type was annotated as 'type'.
2017-08-05 12:08:59 -07:00
neiljp (Neil Pilgrim) 6717f361ec mypy: Amend tornado_redirected_to_list calls to use Mapping. 2017-08-05 12:08:59 -07:00
neiljp (Neil Pilgrim) 353f6fdb88 mypy: Hoist RuleList type alias out of function. 2017-08-05 12:08:59 -07:00
Tim Abbott 27b79e7189 populate_db: Fix duplicate test data when run multithreaded.
The previous implementation resulted in each of the 10 threads using
the same random seed and thus same messages.

Fixes #6028.
2017-08-05 11:22:11 -07:00
Rishi Gupta 4bf8ac2498 generate_test_data: Replace source with non-Gutenberg text.
It's hard to find literature with the community tone we're going for, that
is consistent with the Zulip code of conduct, etc.

This commit removes the special tooling for Gutenberg plays, and changes the
text to be some mixture of scigen, Communications From Elsewhere,
chat.zulip.org, and various books from the public domain.
2017-08-05 11:04:35 -07:00
Rishi Gupta 4350b52740 generate_test_data: Fix remove_line_breaks algorithm. 2017-08-05 11:04:35 -07:00
Tim Abbott dd49bec93c Fix changing email addresses back after email change.
We apparently were not correctly clearing the user_profile's email
address from caches when changing email addresses, which meant that
trying to look up the old email in the user_profile caches would still
work.

Fixes #6035.
2017-08-05 10:49:44 -07:00
Rishi Gupta 251bd3e577 registration.py: Remove first_in_realm from accounts_register.
The parent commit implies first_in_realm == realm_creation.
2017-08-05 10:17:14 -07:00
Rishi Gupta ddbf8b9c3c management: Remove create_realm.py.
This no longer does the correct thing (in terms of onboarding emails,
default streams, etc), and is tempting for new server admins to use.

Once we remove it we'll also have the invariant that we can't have a realm
without a user, which will simplify accounts_register a bit.
2017-08-05 10:17:14 -07:00