Tim Abbott
81b99782b9
docs: Clean up unfinished sentence in sending-messages doc.
2018-11-30 10:06:04 -08:00
Tim Abbott
df5475996f
docs: Add prod auth docs link to dev auth docs.
...
This should be helpful for folks working on things like a Facebook
OAuth2 integration.
2018-11-29 20:45:02 -08:00
Tim Abbott
a3b38d8402
docs: Document nginx configuration for development SSL.
...
This is a useful technique for developing OAuth integrations with Zulip.
2018-11-29 20:45:02 -08:00
Steve Howell
b827efb461
refactor: Extract maybe_reset_right_panel().
2018-11-29 20:09:24 -08:00
Steve Howell
c5b2cfd777
refactor: Extract get_search_params().
2018-11-29 20:09:24 -08:00
Steve Howell
8f915da2ca
refactor: Extract add_tooltips_to_left_panel().
2018-11-29 20:09:24 -08:00
Steve Howell
3190c3ffeb
refactor: Extract show_active_stream_in_left_panel().
2018-11-29 20:09:24 -08:00
Tim Abbott
d0f71881f4
docs: Add detailed documentation on the process for sending messages.
...
This has long been something missing from our suite of documentation.
2018-11-29 16:25:35 -08:00
Rohitt Vashishtha
82ea61a3cc
scripts: Cleanly exit manage.py when run with python2.
...
Fixes #10854 .
2018-11-29 14:20:27 -08:00
Tim Abbott
30e5b5fe55
docs: Increase highlighting of our linters in documentation.
2018-11-29 14:17:13 -08:00
Tim Abbott
4f022d3428
docs: Move zulip-specific tools earlier in the Git guide.
2018-11-29 14:03:29 -08:00
Steve Howell
d8c8fc1f03
streams: Optimize stream_data.create_sub_from_server_data.
...
This is definitely a micro-optimization, but avoiding
creating an extra object speeds up page loads by about
20ms per 1000 streams.
It's slightly sketchy to mutate the value in place, but
the original value never gets used again.
2018-11-29 13:29:17 -08:00
Tim Abbott
6781345b9b
message_fetch: Fix a linter error introduced on rebase.
2018-11-29 13:29:12 -08:00
Steve Howell
ba243416e3
stream_color: Make stream color assignment more efficient.
...
We now let color_data keep its own state for
unused_colors, so that we longer have to pass in
a large list of unused_colors every time we want
to assign a new stream color.
This mostly matters at startup, where we might
be cycling through 5000 streams. We claim all
the unused colors up front.
Each operation now has an upper bound of expensiveness,
where the worst case scenario is basically popping
off the first element of a list of <= 24 colors.
The algorithm is now deterministic, too, to make
it easier to test. It's unclear whether random color
assignment ever had much benefit, and it made unit
testing the algorithm difficult. Now we have 100%
line coverage.
Fixes part of #10902 .
2018-11-29 13:00:25 -08:00
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