Commit Graph

12833 Commits

Author SHA1 Message Date
Sumana Harihareswara c3d3288b63 docs: Style & link text in prod maintenance guide.
Also fix line wrapping and some capitalization.
2016-10-20 11:53:46 -07:00
Sumana Harihareswara a4516bda7d docs: Fix security bug email address. 2016-10-20 11:53:46 -07:00
Tim Abbott 31b245eaea bugdown: Add tests for avatar/gravatar syntax. 2016-10-20 11:18:41 -07:00
K.Kanakhin 7bc0c7f0d5 bugdown: Fix patterns ordering in Markdown extension.
- Put 'modal_link' and 'link' inline patterns after avatar inline pattern
  to correct applying them to parsed text.

Fixes:  #1654
2016-10-20 11:18:41 -07:00
Tim Abbott 8f6a58f741 docs: Expand translating documentation a bit. 2016-10-19 15:34:31 -07:00
Tim Abbott 92b8ce32fc docs: Clean up translation resources discussion. 2016-10-19 15:32:28 -07:00
Sumana Harihareswara 8d4b32a13a Fix style and linewrapping & add links in translation doc. 2016-10-19 15:30:35 -07:00
Sumana Harihareswara 8d1e87cfff Add translations stream link to translation doc. 2016-10-19 15:30:35 -07:00
Brock Whittaker e463577f30 Fix language alert to display language name.
If you chose the same language as was already selected, the alert would
say “is now the default language!” where it omits the language name.

This is the fix so that the language name appears all the time.
2016-10-19 15:17:16 -07:00
Tim Abbott 50356cc325 event_queue: Eliminate buggy need_timeout heartbeat code.
As best I can tell, this option was completely confused in two ways:
* The name is confusing; it actually controls whether we _clear_ the
  timeout associated with the current handler
* It's not clear why one would not want it to be unconditionally true.

From reading the history, I'm pretty sure I had just misread the code
when I created this.

And this caused a real bug; a later refactoring caused us to basically
never cancel the timeouts, which in turn resulted in 90% of all events
traffic being hearbeats with a much lower frequency (~5s) than the
intended 45s.  Removing this code fixes that nasty bug.
2016-10-19 14:32:49 -07:00
Tim Abbott a6e779a56c events: Add event types to logging.
This should make it a lot easier to analyze our events traffic and
debug potential issues with it.
2016-10-19 14:32:16 -07:00
Sumana Harihareswara fe711208fb docs: Capitalize GitHub properly. 2016-10-19 12:36:20 -07:00
Vikas Parashar e962704c71 Add installation troubleshooting instructions in case of pip failure.
Add help for pip install failure during provisioning step of
initial vagrant up during developer environment installation.

Fixes: #1333.
2016-10-19 12:34:08 -07:00
Tim Abbott 08729d35ad README.md: Add mention of our blog and tweak intro. 2016-10-19 12:19:57 -07:00
Sumana Harihareswara 3b74ed20fa Add GSoC mailing list link to README.md. 2016-10-19 12:14:51 -07:00
Umair Khan e428f3feda Run apt-get update only if sources.list has changed.
Fixes: #2025
2016-10-19 16:23:21 +05:00
Rishi Gupta 83f902953a newsletter signup: Update merge_vars.
merge_vars is the user meta data we store in mailchimp. This commit changes
what we store from realm.domain to realm.id, since realm.domain is being
deprecated, and changes the OPTIN_TIME to a nicer format.
2016-10-18 19:29:12 -07:00
Steve Howell 4073ae09a1 streams: Use page_params.neversubbed_info client-side. 2016-10-18 17:33:58 -07:00
Steve Howell c4b2f6d816 docs: Say "Set up" instead of "Setup".
I think "setup" generally implies a noun.
2016-10-18 17:29:00 -07:00
Steve Howell 6a482a65d4 Document our "area:" labeling convention in README.md. 2016-10-18 17:12:06 -07:00
Steve Howell 9afc130f21 Use "area:<label>" for doc links in README.md. 2016-10-18 17:10:57 -07:00
Brock Whittaker 10f7146ddd Change Lightbox to Support YouTube Videos.
The lightbox will now distinguish between whether or not something is a
photo and a YouTube video by the class name of the message inline
preview. It embeds the YouTube video in the lightbox as an iFrame
rather than previewing the video screenshot.
2016-10-18 14:45:47 -07:00
Brock Whittaker 77233c7e3b bugdown: Distinguish between YouTube Videos and Image Previews.
This distinguishes between YouTube Videos and Image Previews by adding
a particular “youtube-video” class to the preview along with changing
the title to the video ID rather than the link. This serves to allow
the lightbox to ID when a lightbox preview should be treated like a
YouTube video rather than an image preview.

This also modifies the tests in bug down to expect a youtube-video class
along with the title to just be the video ID on YouTube rather than the
entire URL link.
2016-10-18 14:45:47 -07:00
Tim Abbott 0784c4b339 requirements: Install the Zulip API bindings by default.
Now that we're no longer using the --install-option feature of
requirements.txt, we can add this back in again.
2016-10-17 23:21:43 -07:00
Tim Abbott 497d1c1f4e twitter bots: Update to use current python-twitter.
It appears that twitter has changed several of its APIs.
2016-10-17 23:21:39 -07:00
Tim Abbott 56d0cc69e9 socket: Remove unused djsession_engine. 2016-10-17 23:19:28 -07:00
Mohsen Ibrahim bfe5787197 Fix Django.utils.importlib deprecation warnings.
This changes `from django.utils.importlib import import_module` to
`from importlib import import_module`, as `django.utils.importlib` will
be removed in django version 1.9.
2016-10-17 23:19:28 -07:00
Mohsen Ibrahim e9899e4dc9 bugdown: Fix some Python-Markdown deprecation warnings.
Python-Markdown changed how one is supposed to declare extensions
being used.
2016-10-17 23:13:41 -07:00
Christie Koehler 906587f474 Force LF line-endings except for binary file types. 2016-10-17 20:19:55 -07:00
Christie Koehler 2595b32165 Update with proper LF line-endings. 2016-10-17 20:19:55 -07:00
Steve Howell 7fd74c45d7 Clean up startup code for streams.
The startup code in subs.js used to intermingle data
stuff and UI stuff in a loop inside a called function,
which made the code hard to reason about.

Now there is a clear separation of concerns, with these methods
being called in succession:

    stream_data.initialize_from_page_params();
    stream_list.create_initial_sidebar_rows();

The first method was mostly extracted from subs.js, but I simplified
some things, like not needing to make a copy of the hashes
we were passed in, plus I now garbage collect email_dict.  Also,
the code path that initialize_from_page_params() mostly replaces
used to call create_sub(), which fired a trigger, but now it
just does data stuff.

Once the data structure is built up, it's a very simple matter
to build the initial sidebar rows, and that's what the second
method does.
2016-10-17 19:58:23 -07:00
Steve Howell d26942e72d Extract stream_list.create_sidebar_row().
This replaces add_stream_to_sidebar(), which was kind of a misleading
name, and it also adds a couple lines of code that were always
called right after calling add_stream_to_sidebar().
2016-10-17 19:58:23 -07:00
Steve Howell 869a124d7d Extract stream_data.get_streams_for_settings_page().
This function will make it easier to unit test upcoming
changes related to stream counts.

This was mostly moving code, but one change is that we
don't call create_subs() in subs.js any more (which would
have been kind of circular dependency), since the only thing
that it did besides calling a more appropriate function
in stream_data.js was to generate a trigger that was
subsequently ignored and possibly a UI trap, as we don't
want to be messing with the stream sidebar when we go into
the stream settings page.

We now simply call exports.create_sub_from_server_data() for
newly encountered unsubscribed streams (which don't belong in
the sidebar anyway.)
2016-10-17 19:58:23 -07:00
Steve Howell 965c6047db Move add_admin_options() to stream_data.js.
This function used to live in subs.js.  It's mostly a code move,
but I simplified the logic to determine whether it's subscribed
not to do a lookup into the same data structure that the sub
already came from.

I also added some tests.
2016-10-17 19:58:23 -07:00
Steve Howell cf08f04dbc Move receives_*_notifications() to stream_data.js.
This moves these functions from subs.js to stream_data.js:

    receives_desktop_notifications
    receives_audible_notifications

This makes notifications.js no longer dependent on the
bloated subs.js.
2016-10-17 19:58:23 -07:00
Steve Howell e25b67af26 Remove subs.sub_pinned_or_unpinned(). 2016-10-17 19:58:23 -07:00
Steve Howell 5dd1c2d55f Remove subs.stream_id(). 2016-10-17 19:58:23 -07:00
Steve Howell 2676083b94 Add introduction to docs on node tests.
Also, de-emphasize the process for creating new test modules,
as this is an advanced task that we can further document later
and generally handle as part of code review.
2016-10-17 19:46:17 -07:00
Tim Abbott 63a49be09e event_queue: Import tornado.ioloop correctly.
We actually use tornado.ioloop, not the root tornado module, and while
the current code does work, it causes mypy errors with the incremental
cache.
2016-10-17 17:57:46 -07:00
Sumana Harihareswara 6323494f37 docs: Properly capitalize GitHub. 2016-10-17 19:31:50 -04:00
Christie Koehler 23df7913d5 docs: Add Git and GitHub Guide.
Fixes #783, #1754.
2016-10-17 16:18:16 -07:00
Steve Howell ff6404cb3c Add comment about /json/subscriptions/exists endpoint.
We should remove this endpoint.  For now I'm just adding
the comment to the code explaining why we should do that.
2016-10-17 16:11:04 -07:00
umkay 906a4e3b26 analytics: Add performance and transaction logging to counts.py.
For each database query made by an analytics function, log time spent and
the number of rows changed to var/logs/analytics.log.
In the spirit of write ahead logging, for each (stat, end_time)
update, log the start and end of the "transaction", as well as time
spent.
2016-10-17 16:10:03 -07:00
Tim Abbott 4a4664d268 mypy: Remove a bunch of now-unnecessary type: ignore annotations.
Since mypy and typeshed have advanced a lot over the last several
months, we no longer need these `type: ignore` annotations.
2016-10-17 11:48:34 -07:00
Tim Abbott 3b0b65c2d0 management: Fix recent argument parsing regressions.
Fixes a regression introduced in
fbdf539bf2.
2016-10-16 20:36:33 -07:00
Tim Abbott a5a03c2e0b zulip_ops: Include zulip::apt_repository.
This replaces the old wheezy configuration.
2016-10-16 20:13:35 -07:00
Tim Abbott 8c68c6f09b zulip_ops: Remove wheezy apt repo.
Nobody uses wheezy anymore, and the configuration wasn't even
conditional on the OS version.
2016-10-16 20:13:35 -07:00
Tim Abbott 5210b0a6a4 zulip_ops: Cleanup old redis configuration.
One can now just use the improved configuration we've merged into the
main Zulip repo.
2016-10-16 20:13:35 -07:00
Tim Abbott 869f0724ce zulip_ops: Remove humbughq.com nginx configuration.
The humbughq.com name hasn't been the product's name since 2013, and
it's nice to finish clearing it out of the repository.
2016-10-16 20:13:29 -07:00
Tim Abbott 29448fb47b zulip_ops: Remove old Zulip, Inc. trac configuration.
This isn't useful to anyone.
2016-10-16 19:23:47 -07:00