Commit Graph

26763 Commits

Author SHA1 Message Date
Joshua Pan 53d482194a node tests: Move templates.render to global definition. 2018-06-02 06:10:34 -04:00
Joshua Pan 9b1e0bbf3d node tests: Use run_test helper in input_pill.js. 2018-06-02 06:10:34 -04:00
Joshua Pan 43ba3196ee node tests: Use run_test helper in general.js. 2018-06-02 06:10:34 -04:00
Joshua Pan 7214315e00 node tests: Use run_test helper in buddy_data.js. 2018-06-02 06:10:34 -04:00
Joshua Pan f74d298478 node tests: Use run_test helper in bot_data.js. 2018-06-02 06:10:34 -04:00
Joshua Pan dd453e8dbe node tests: Remove unnecessary function in activity.js. 2018-06-02 06:10:34 -04:00
Vishnu Ks a46af418d4 circleci: Add support for Ubuntu Bionic. 2018-06-01 18:02:50 -07:00
Greg Price f686d55fa0 push-to-pull-request: Broaden one error message.
I discovered this case just now while testing other changes.
2018-06-01 16:52:18 -07:00
Greg Price 954c71e90c push-to-pull-request: Use `jq -r` to simplify a test slightly.
This option (aka `--raw-output`) prints a string as itself, rather
than JSON-encoded; which makes it fit a bit better in a shell script,
saving us a layer of quoting.
2018-06-01 16:52:18 -07:00
Greg Price 8e81ca0fb2 push-to-pull-request: Fix regex usage in parsing remote.
This replaces ad4617c95 with a different fix for the same issue:
instead of stripping the `.git` off separately, we can just correct
the regex, using `+?` to fix our stepping in a classic regex pitfall.
2018-06-01 16:52:18 -07:00
Greg Price e891078d94 circleci: Bump the Xenial and Trusty base images to fresh builds.
This will save us a bit of time running apt upgrades at the start of
each build; looks like that's been about 15-20s for recent builds.
2018-06-01 16:52:18 -07:00
Tim Abbott 751c602a0b update-prod-static: Don't copy/minify templates and styles.
This is a performance optimization: Rather than copying these files
into the `prod-static` directory and then deleting them, we just don't
copy them over in the first place.

For styles, it might have once been the case that this did something,
but we've moved them all to being managed by webpack some time ago.

For the js directory, I think it was never useful to copy and then
delete them; these files were always compiled via tools/minify-js,
and the raw JS files weren't needed, anyway.
2018-06-01 16:39:35 -07:00
Tim Abbott cefdf6f6d4 update-authors-json: Pretty-print output with sorted keys.
This makes working with this file for debugging/etc. much nicer.
2018-06-01 16:39:04 -07:00
Tim Abbott 2a52b0c1e8 compilemessages: Use json.dump with sort_keys option.
This should help make these files stable over time.  Mostly useful for
diffing release tarballs.
2018-06-01 16:39:03 -07:00
Tim Abbott 60eae53327 push-to-pull-request: Provide better output for invalid PR.
Previously, we were very confusingly showing the error message for
permissions when the issue was a not-found error.
2018-06-01 16:00:27 -07:00
Tim Abbott ad4617c953 push_to_pull_request: Fix handling of .git.
This was throwing the "you can't access the repo" error for this
reason.
2018-06-01 16:00:27 -07:00
Eeshan Garg 52c3c00ea0 test-api: Test against generic fixtures.
In a few commits before this one, we just added de-duplicated
generic fixtures that apply to multiple API tests. The tests
needed to be modified to accommodate that change.
2018-06-01 14:06:26 -07:00
Steve Howell df9761391c node tests: Add narrow_local.js. 2018-06-01 12:45:02 -07:00
Tim Abbott 7d7d89e486 narrow: Clean up computation of then_select_offset.
We had a significant amount of code for handling what seemed to be 2
cases, but which were really just a single case (if we are trying to
narrow to a specific message ID, and we end up landing on it, restore
the previous offset; with the special case that the previous offset
might be passed in from the previous call).

This cleanup also fixes a very minor bug, where our background
auto-reload (`reload.initiate({immediate: true});` in the JS console)
would incorrectly reset the pointer position to match the a near:
message ID if that was present in the narrow.
2018-06-01 12:45:02 -07:00
Steve Howell baa691db7d narrow: Fix how we select ids for narrows.
This commit fixes a couple regression related to narrowing.

For a long time we've had bugs where we too aggressively
preserve the currrent selection on topic -> stream
re-narrows ("s" key) even when the wider narrow may
have unread messages before the selection.

Also, we recently introduced a bug so that when you used
a link from the "copy link to conversation" (aka a "near"
query), it would advance you to your first unread message
despite the near:999 specifier.  (The code would work for
subsequent "near" queries once you had fetched some of
your original messages).

This commit introduces a new data structure called id_info (replacing
the select_strategy data structure) in various functions and uses that
to track all the ids of relevance.

Significantly rewritten by tabbott to handle a few extra corner cases,
and add a ton of comments explaining why it works the way it does.

Fixes #2091.
Fixes #9606.
2018-06-01 12:45:02 -07:00
Tim Abbott 0e354a4a23 api: Document BAD_EVENT_QUEUE_ID errors more completely. 2018-06-01 12:41:50 -07:00
Tim Abbott ba835e3511 api: Fix response fixtures for create-user. 2018-06-01 12:36:12 -07:00
Tim Abbott 9cbf6ad03b api: Fix response fixtures for delete_queue.
These were malformed.
2018-06-01 12:34:51 -07:00
Yashashvi Dave 3422766c25 create stream: Fix widget for changing privacy doesn't render initially.
When admin user create new private stream, widget for changing privacy
of stream doesn't render. Because we render subscription-settings
template partially on subscription-add event, so this case wasn't
handled.

Fixes #9469
2018-06-01 12:09:50 -07:00
Anupam Dagar 562f5387e3 analytics: Add "last 2 months" and "last 6 months" button.
This commit removes "last 30 months" button and includes some layout changes so as to accomodate rangeslider with extra introduced buttons.
2018-06-01 12:07:18 -07:00
Yago González f68fedd808 api docs: Make minor phrasing improvement. 2018-06-01 12:03:31 -07:00
Yago González 9f98002b76 tests: Allow testing our REST API against the OpenAPI docs. 2018-06-01 12:03:31 -07:00
Kurian Benoy bfcd7b0151 Vagrantfile: Fix typo in spelling of problems.
Fixes #9596.
2018-06-01 11:58:09 -07:00
Tim Abbott c37fe998d2 templates: Make zulip_default_context available in API endpoints.
This is mostly useful for advertising support_email, but some other
fields may by helpful over time.
2018-06-01 11:32:18 -07:00
Tim Abbott 95f1f1d363 mypy: Remove logic for linecoverage report. 2018-06-01 11:14:32 -07:00
Shubham Dhama ceae1a1c5f streams: Improve 'is-announcement-only' checkbox. 2018-06-01 10:05:13 -07:00
Shubham Dhama c03acaa078 streams: Improve and make stream_privacy_modal consistent with others.
Previously weren't registering modal properly, which gets fixed by
using open_modal. It further fixes closing of modal by using escape
and positioning of modal.

Fixes: #9590.
2018-06-01 10:05:13 -07:00
Anupam Dagar 9674a139bf hotkeys: Change * to Ctr+s for starring a message.
Fixes: #9613.
2018-06-01 09:53:15 -07:00
Eeshan Garg f5bfa4e793 css: Fix code block formatting issues in our Markdown docs. 2018-06-01 09:19:42 -07:00
Anupam Dagar 0f55b56398 analytics: Add a rangeslider to the "number of users" plot.
This also requires some layout/spacing changes, since the rangeslider
takes up some space.

Fixes: #9557.
2018-06-01 08:51:53 -07:00
Tim Abbott 0d84eb0a8b mypy: Clean zerver/views/users.py for strict-optional. 2018-06-01 08:48:17 -07:00
Tim Abbott 27e7770540 populate_db: Initialize the outgoing webhook bot properly.
Previously, we created the bot, but didn't initialize its service
object.
2018-06-01 08:48:17 -07:00
Tim Abbott 0a0ae5e703 users: Move add_service to zerver.lib.users so it is reusable. 2018-06-01 08:48:17 -07:00
Lyla Fischer 7fba0f1505 user docs: Update logging-in.md. 2018-06-01 01:39:45 -04:00
Lyla Fischer 2807189d87 user docs: Update join-a-zulip-organization. 2018-06-01 01:37:30 -04:00
Eeshan Garg 10523813fd webhooks/pagerduty: Update docs to conform to style guide.
A few things have changed on PagerDuty's end, so I thoroughly tested
this webhook with a local ngrok instance. Also, added a message
screenshot!
2018-05-31 23:48:42 -04:00
Eeshan Garg 1df6c22df0 webhooks/pagerduty: Fix small capitalization error in docs.
It is PagerDuty, not Pagerduty!
2018-05-31 23:42:07 -04:00
Vishnu Ks 69f8b7e8df circleci: Add a base image for Ubuntu Bionic. 2018-05-31 18:51:32 -07:00
Steve Howell ab9e348fab dead code: Remove narrow.by_time_travel(). 2018-05-31 17:13:50 -07:00
Tim Abbott 2d6993f6dc settings: Enable caching with webpack-loader. 2018-05-31 16:45:51 -07:00
Tim Abbott 5b5d1f3e87 update-prod-static: Rewrite to use the run() scripting tool.
This provides nice `set -x` style logging of which commands are
running when.
2018-05-31 16:45:51 -07:00
Tim Abbott c8db7b7dd7 node: Provide a default window object for the node tests.
This is preparation for our migration of our JS pipeline to webpack,
which includes as part of the process a hack of exporting globals via
the window object.
2018-05-31 14:55:28 -07:00
Tim Abbott 47824a97a4 ldap: Add return_data for the ldap_missing_attribute property.
This should make it possible in the future to do better error output
for this case.
2018-05-31 14:16:03 -07:00
Tim Abbott ecb3a2ccef ldap: Clarify outside_ldap_domain exception logic.
The previous logic made it look like catching ZulipLDAPException on
the authenticate() line was possible, but it isn't, because that
exception is actually being handled inside django-auth-ldap's
authenticate method.
2018-05-31 14:12:06 -07:00
Tim Abbott bab69a325f registration: Narrow try/exception block for LDAP usernames.
This just makes the code a bit more clear about where we expect that
exception to come from.
2018-05-31 14:04:47 -07:00