Commit Graph

29172 Commits

Author SHA1 Message Date
Shubham Dhama 990d7fb37d narrow: Remove `narrow_activated.zulip` event trigger. 2018-11-29 12:36:00 -08:00
Shubham Dhama 654c3240e4 narrow: Remove `narrow_deactivated.zulip` event trigger. 2018-11-29 12:36:00 -08:00
Shubham Dhama 42f1d2a33b tab_bar: Make explicit call of narrow change handle function. 2018-11-29 12:36:00 -08:00
Shubham Dhama b726cd4b3e typing_events: Make explicit call of narrow change handle function. 2018-11-29 12:36:00 -08:00
Shubham Dhama e908da7831 narrow: Remove some `narrow_deactivated.zulip` event handling. 2018-11-29 12:36:00 -08:00
Shubham Dhama 209dd6dd37 narrow: Extract processes needed to be executed after narrow deactivate. 2018-11-29 12:36:00 -08:00
Tim Abbott 83b127cec1 server_events: Extract functions for managing connection errors.
This cuts a bit of code duplication.
2018-11-29 12:31:08 -08:00
Shubham Dhama 01927fb470 message view: Fix hiding of connection-error message on narrowing streams.
When there is some error in connecting to server(more specifically to the
tornado server) the "Unable to connect to Zulip" connection error message
gets cleared as Django server could send the response of "get" request of
old messages and hence get_old_messages_success hides the error message
even though the connection is not properly established.

Fixes: #5599.
2018-11-29 12:26:41 -08:00
Vishnu Ks 2889de6d90 populate_db: Extract subscribe_users_to_streams function. 2018-11-29 12:15:58 -08:00
Vishnu Ks f3033207b9 emails: Cover all LDAP cases when emailing login details.
This provides a nice user experience for folks where we do know what
their LDAP credentials are.

Though we need to fix #10917 before the content in the email with be
correct.
2018-11-29 12:14:22 -08:00
Tim Abbott 7a2d93ed6e show_admins: Add assertion to make mypy happy. 2018-11-29 11:51:39 -08:00
Tim Abbott 8a60ab7314 show_admins: Rewrite to use management library.
This makes this command more standardized, and helps avoid future bugs
like the one fixed in the last commit.
2018-11-29 11:40:17 -08:00
Tim Abbott d828eba2f6 show_admins: Fix buggy realm parsing. 2018-11-29 11:40:17 -08:00
Rohitt Vashishtha c4e50a34d3 bugdown: Refactor get_user to get_user_by_name.
Also adds a warning against the use of this function.
2018-11-29 10:19:08 -08:00
Hemanth V. Alluri 6b1d724f5c zerver: Add bugdown rendering for text custom profile fields.
This is the first step of letting users use Zulip markdown in their
SHORT_TEXT and LONG_TEXT custom profile fields, so that they can
include emphasis, links, etc.

This doesn't include any frontend logic yet, however.
2018-11-29 09:47:32 -08:00
Rishi Gupta 5fdc2e5161 billing: Ensure seat_count is always 8 in billing tests. 2018-11-28 23:08:27 -08:00
Rishi Gupta f3ecb05762 billing: Rename stripeToken to stripe_token.
When we started the billing system we started by following conventions used
in the Stripe documentation, but in hindsight it makes more sense to follow
conventions used in the Zulip codebase.
2018-11-28 22:29:29 -08:00
Rishi Gupta d302fae31b billing: Rename self.quantity to self.seat_count in tests. 2018-11-28 22:29:29 -08:00
Rishi Gupta 10d3d94a2a billing: Use common pathway for upgrading in tests. 2018-11-28 22:29:29 -08:00
Rishi Gupta b3b1b47fb0 billing: Remove references to legacy stripe_fixtures.json. 2018-11-28 22:29:29 -08:00
Rishi Gupta 053778fdd7 billing: Update test_billing_quantity_changes_end_to_end to use mock_stripe. 2018-11-28 22:29:29 -08:00
Tim Abbott 02f09e2473 settings: Fix linter errors with user profiles. 2018-11-28 19:29:33 -08:00
Anders Kaseorg 8a6158c663 Position sidebars with top instead of margin-top.
This should make no visible changes.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:53:49 -08:00
Anders Kaseorg 10fb3539ae Position top-messages-logo statically.
This should make no visible changes.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:53:49 -08:00
Anders Kaseorg ed0292629b zulip_tools.run: Remove shell=True support.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:48:23 -08:00
Anders Kaseorg d581ad82ca scripts/upgrade-zulip-from-git: Avoid shelling out for mkdir, ln.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:48:23 -08:00
Anders Kaseorg a61eebd9e3 scripts/lib/unpack-zulip: Avoid shelling out for rm, mv, mkdir, ln.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:48:23 -08:00
Anders Kaseorg 9bad4003c6 scripts/lib/upgrade-zulip-stage-2: Avoid shelling out for ln.
The original code was actually broken, in that it checked the wrong
path, but it didn't matter because it used `ln -nsf`.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:48:23 -08:00
Anders Kaseorg 0bfcd2294e tools/update-prod-static: Avoid shelling out for mkdir, cp, mv, rm.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:28:17 -08:00
Anders Kaseorg 19bdf54f33 tools/setup/emoji/build_emoji: Avoid shelling out for touch, rm, mkdir, cp.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:28:17 -08:00
Anders Kaseorg 1d15d72775 zerver/lib/export.py: Avoid shelling out for cp, rm, ln.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:28:17 -08:00
Anders Kaseorg a694c3cafd scripts/restart-server: Avoid shelling out for ln.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:26:54 -08:00
Anders Kaseorg d60b697cc5 scripts/lib/create-production-venv: Avoid shelling out for ln.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:25:01 -08:00
Anders Kaseorg 33a4d12101 scripts: Add zulip_tools.overwrite_symlink function to replace ln -nsf.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:24:59 -08:00
Anders Kaseorg 1597511de0 install: Check whether universe repository is enabled on Ubuntu.
Fixes #10417.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-11-28 17:18:43 -08:00
Tim Abbott e39ebb7358 settings: Fix "Preview profile" button.
This was apparently broken in the refactoring in
a394778cde.
2018-11-28 16:46:15 -08:00
Yashashvi Dave fe3270d2b9 input pills: Fix modal gets closed when user click on remove-pill-btn.
This commit fixes bug: When user clicks on remove-user-pill-btn,
it closes the parent modal instead of removing user pill from input.
This happens because button has class `exit` and there is click
event listener on all `exit` class buttons, which closes modal.

Fix this by adding `e.stopPropogation` to remove-user-pill listener.
2018-11-28 16:33:08 -08:00
Yashashvi Dave 28c38a44c8 static/js/popover: Use predefine func to append user pills in field.
This commit remove repetitive code to append user pills in
custom field of user profile popover. And call already defined
function there.
2018-11-28 16:22:35 -08:00
Yashashvi Dave 20b6d08ef7 static/js/settings_account.js: Extract `append_custom_profile_fields`. 2018-11-28 16:22:35 -08:00
Yashashvi Dave b2aeffd947 static/js/settings_account.js: Extract `intialize_custom_user_type_fields`. 2018-11-28 16:22:35 -08:00
Yashashvi Dave cd8f4dfac0 statis/js/settings_account.js: Extract `initialize_custom_date_type_fields`. 2018-11-28 16:22:35 -08:00
Balaji2198 16967d6761 static/js/settings_streams.js: Refactor delete_default_stream method. 2018-11-28 16:17:21 -08:00
Nikhil Kumar Mishra 478674a6d6 analytics: Refactor to support more than one tooltip on same page.
While we don't actually need another tooltip on /stats right now, this
provides a clear approach for how to do that.  We've since added
tooltips in various other parts of the webapp, and that code is pretty
copy-pasteable, so I think it's reasonable to say this closes #4612.

Cleaned up by tabbott to remove a bunch of unnecessary changes.
2018-11-28 16:04:35 -08:00
Tim Abbott 0932a27647 docs: Move generic reverse proxy notes further down. 2018-11-28 15:53:54 -08:00
Igor Posledov 7aed0a2a66 docs: Add nginx reverse proxy basic config example. 2018-11-28 15:52:06 -08:00
Tim Abbott d28527b629 portico: Fix bulleted list styling on privacy page.
Fixes #10787.
2018-11-28 15:04:47 -08:00
Steve Howell 6035304619 Extract color_data.js.
This code is pretty distinct from all the color-picking UI,
and we want to get it to 100% coverage and optimize it
more.
2018-11-28 14:51:51 -08:00
Eeshan Garg 5ef86b6d22 webhooks/stripe: Handle customer.discount events properly.
Recent changes merged in #10877 didn't handle these events
correctly. The linkified_id function breaks for the `discount`
object in the JSON payload. A cursory glance at Stripe's docs
tells me that since a discount is associated with a customer
or a coupon, it makes sense for a `discount` object to not have
an ID that can necessarily be linked to. So, we can just link
to the associated coupon instead.
2018-11-28 14:16:33 -08:00
Rohitt Vashishtha 681368b937 bugdown: Refactor get_possible_mentions_info and related functions.
This commit changes the return type of get_possible_mentions_info  to a
list instead of a dict, thus disposing off the hacky logic of storing
users with duplicate full names with name|id keys that made the code
obfuscated.

The other functions continue to use the dicts as before, however, there
are minor variable changes where needed in accordance with the updated
definition of get_possible_mentions_info.
2018-11-28 14:07:52 -08:00
Tim Abbott e4946dd182 bugdown: Rename full_names to mention_texts.
This is another straight variable rename, which will help clarify the
upcoming commits.
2018-11-28 14:07:23 -08:00