Commit Graph

26981 Commits

Author SHA1 Message Date
Anupam Dagar c8024cec5c hotkey: Close deprecation notice on Enter keypress. 2018-06-03 09:33:16 -07:00
Anupam Dagar 528d2c6b28 hotkey: Edit comment which refers to deprecated hotkey '*'.
This commit is related to issue #9613.
2018-06-03 09:33:00 -07:00
Shubham Dhama 4483e33102 digest: Make newly registered users data inaccessible to guest users.
The new can_access_all_realm_members function is meant to act as a
base function for guest users and Zephyr realm users regarding the
accessibility of the information of other users in the realm.
2018-06-03 09:30:59 -07:00
Max Nussenbaum 7f32c26731 portico: Update landing page tour.
This moves the tour on the landing page to the top of the page,
and makes a number of other minor fixes.
2018-06-03 09:01:01 -07:00
Yashashvi Dave 7c2f053f0f custom fields: Fix buggy behaviour of trash icon in choice type of field.
In admin UI for creating new choice type of custom field, the behavior
of trash icon for removing choice field is buggy.
When admin clicks on trash icon it disappears, but the row does not
and admin end up being unable to create the field.

Fix this by selecting proper element to find and delete choice row.
2018-06-03 08:22:29 -07:00
Shubham Padia 8883107a7f streams: Allow cross-realm bots to post to announcement_only streams.
This fixes an issue where if you make #announce (the default
announcement stream) announce-only, then creating a new stream will
throw an exception (because notification-bot can't send there).

Fixes #9636.
2018-06-02 10:36:29 -07:00
Steve Howell 47b4dd6bdb slash commands: Refine /day and /night.
These two slash commands now use zcommand to talk to
the server, so we have no Message overhead, and if you're
on a stream, you no longer spam people by accident.

The commands now also give reasonable messages
if you are already in the mode you ask for.

It should be noted that by moving these commands out of
widget.py, they are no longer behind the ALLOW_SUB_MESSAGES
setting guard.
2018-06-02 09:40:12 -07:00
Steve Howell 4b2e8b83c4 slash commands: Add /ping command (via zcommand).
This adds a /ping command that will be useful for users
to see what the round trip to the Zulip server is (including
only a tiny bit of actual server time to basically give a
200).

It also introduce the "/zcommand" endpoint and zcommand.js
module.
2018-06-02 09:40:12 -07:00
Steve Howell 87ba752758 refactor: Extract compose.do_post_send_tasks(). 2018-06-02 09:40:12 -07:00
Rhea Parekh b47bc0e082 docs: Remove customprofilefield from caveats in slack import doc.
This was added in #9035
2018-06-02 09:01:55 -07:00
Rhea Parekh f8e53511ea slack import: Add support for bold-italics formatting.
Fixes #8927
2018-06-02 09:01:55 -07:00
Anupam Dagar 0e8081093b hotkey: Add deprecation notice for '*' hotkey. 2018-06-02 08:59:42 -07:00
Tim Abbott 18702b0d71 actions: Document validate_user_access_to_subscribers_helper.
This function is important, carefully optimized, and hard to read, so
it deserves a long docstring.
2018-06-02 08:46:58 -07:00
Shubham Dhama 8e2337509d streams: Hide public streams & subscribers from guest users.
The main change here is making can_access_public_streams
2018-06-02 08:39:39 -07:00
Shubham Dhama ca02143074 test_subs: Fix typos in test_previously_subscribed_private_streams. 2018-06-02 08:06:45 -07:00
Joshua Pan 0f6211fbc3 node tests: Use run_test helper in templates.js. 2018-06-02 06:10:34 -04:00
Joshua Pan f4b341c2d4 node tests: Use run_test helper in user_pill.js. 2018-06-02 06:10:34 -04:00
Joshua Pan c9c06ae13c node tests: Use run_test helper in topic_data.js. 2018-06-02 06:10:34 -04:00
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