Commit Graph

16372 Commits

Author SHA1 Message Date
Steve Howell cde1861655 typing indicators: Validate PM emails. 2017-03-22 07:01:20 -07:00
Steve Howell 1ec392a18e Extract compose.get_invalid_recipient_emails(). 2017-03-22 07:01:20 -07:00
Steve Howell 84b31a5532 typing indicators: Limit to PM conversations.
We now only send outbound typing indicators if we are
composing a private message.
2017-03-22 07:01:20 -07:00
Steve Howell 642be6ad18 Revamp state tracking for outbound typing indicators.
This change moves most of the logic related to starting and
stopping outbound typing indicators to a new module called
typing_status.js that is heavily unit tested.

While this was in some sense a rewrite, the logic was mostly
inspired by the existing code.

This change does fix one known bug, which is that when we
were changing recipients before (while typing was active), we
were not stopping and starting typing indicators.  This was
a fairly minor bug, since usually users leave the compose
box to change recipients, and we would do stop/start under
that scenario.  Now we also handle the case where the user
does not leave the compose box to change recipients.
2017-03-22 07:01:20 -07:00
Steve Howell 8c0a1bddb0 linter: Deprecate ui.report_success/error(). 2017-03-22 06:57:23 -07:00
Steve Howell f89c9d6629 Avoid deprecated report_success() call.
We are moving to ui_report to break dependencies.
2017-03-22 06:53:21 -07:00
Tim Abbott 2076338eaa mark_subscribed: Add a blueslip check for color code path.
This code path might be unused, and it seems worth verifying, since if
it is, we can delete some extra complexity.
2017-03-21 23:36:47 -07:00
Tim Abbott 01904385a4 Fix thrashing color when resubscribing to a stream.
Previously, we would let the backend pick a color and send it to the
frontend; then the frontend would ignore that color and pick a
different color and send it to the backend, which would in turn resync
to us.

Fixes #3572.
Fixes #3858.
2017-03-21 23:35:50 -07:00
Tim Abbott 832aa398b0 subscription_settings: Move email address into toggled area. 2017-03-21 23:09:32 -07:00
Tim Abbott 1ad0d35966 subs: Clean up ancient collapsing logic. 2017-03-21 23:09:32 -07:00
Tim Abbott bfc67f6602 subs: Toggle notification settings on subscribe. 2017-03-21 23:09:32 -07:00
Tim Abbott dfddea77b7 subscriptions: Show stream settings after toggling checkbox.
Based on Aakash Tiyagi's work in #4026.

Fixes #3971.
2017-03-21 23:09:32 -07:00
Tim Abbott 9347fc4742 subs: Move show_stream_row earlier in file. 2017-03-21 23:09:29 -07:00
Tim Abbott a7610c8b7e subs: Clarify show_stream_row arguments. 2017-03-21 23:07:28 -07:00
Tim Abbott e70bf13bef subs: Extract setup_subscriptions_stream_hash. 2017-03-21 22:17:50 -07:00
James Wang c13809c83f invite: Display and check default streams in invite modal.
This fixes two bugs:

* If a user is not subscribed to a default stream, he or she would not
  be have the option to invite users to that default stream.
* The initial streams checked in the invite modal were the
  non-invite-only streams the user was subscribed to, not their
  default streams.

Fixes: #4209.
2017-03-21 20:56:34 -07:00
digi0ps a765b6e781 settings: Fix user edit form not being shown.
Added an if condition to checks whether person is a bot before fetching
information about bot owner in *static/js/admin.js*.
2017-03-21 20:52:11 -07:00
Cynthia Lin 1dfac12c4b hotkeys: Add arrow key navigation in streams/subscriptions menu.
Fixes #4198.
2017-03-21 20:32:28 -07:00
Saumya Bhatnagar 1a6efc9705 README: Update GSoC section to mention android plan. 2017-03-21 20:16:27 -07:00
Eeshan Garg b8f71c5d24 Document how to set up an Asana integration via Zapier.
Fixes #3948.
2017-03-21 19:56:47 -07:00
Steve Howell f6c8f4de43 Upgrade jquery to 2.2.3.
We were at 1.12.1.  Versions 1.12 and 2.2 have the same API, and
2.x basically removes some compatibility for old browser versions.
2.2.3 was the last bug release for 2.2, and it was released in
April 2016.
2017-03-21 18:57:03 -07:00
Steve Howell bd04ea02d3 Use new JS data layer for typing notifications.
The old code may have had some subtle bugs related to sorting of
ids or stringification or failed Dict lookups.  The new data
layer should be more robust.  We had some tracebacks recently
from the old code, and they should go away now.
2017-03-21 17:24:40 -07:00
Steve Howell 67a2094ed1 Add typing_data.js, which can track users who are typing.
(A subsequent commit will actually integrate this into the app.)
2017-03-21 17:24:40 -07:00
Tim Abbott 8b9e78e486 compose: Extract and test get_focus_area. 2017-03-21 17:24:40 -07:00
Tim Abbott 82ec083066 compose: Fix new topic button behavior in home view. 2017-03-21 17:24:40 -07:00
Yago González 34a9e1ae11 markdown: Add TeX typesetting support.
Co-authored-by: Reid Barton <rwbarton@gmail.com>

Fixes #2056.
2017-03-21 16:40:00 -07:00
Rishi Gupta caef5332d5 mailchimp: Fix error in add_users_to_mailing_list.py.
Old behavior is a holdover from development testing.
2017-03-21 16:13:00 -07:00
Tim Abbott 993276b882 test_upload: Add tests for realm icon URL scheme. 2017-03-21 16:12:04 -07:00
Tim Abbott 8775a22663 avatar: Fix buggy avatar URL scheme with S3 backend.
Also adds tests for the avatar URL scheme.
2017-03-21 16:12:04 -07:00
Ayush Jain bddcfb1c96 Add realm-level settings to control inline image and url preview.
This gives users more control in case they don't want previews,
especially for the "previews of linked websites" feature.

Fixes: #2640.
2017-03-21 15:46:17 -07:00
Brock Whittaker a27f8f2f30 Fix up YouTube embed issues and styling.
This fixes the styling to stay on the screen of most reasonably sized
monitors along with extending the JavaScript code to allow for the
video to be keyed to in the lightbox.
2017-03-21 14:28:13 -07:00
Brock Whittaker 1b31f9be38 Move lightbox events to lightbox.js from clickhandlers.js.
This consolidates lightbox logic to lightbox.js.
2017-03-21 14:28:13 -07:00
Brock Whittaker 9c38dc84a7 Change two console.log statements to one with prefixed newline.
The console.log statement that is empty can be replaced with just a
single newline.
2017-03-21 14:28:13 -07:00
Brock Whittaker 920b082e08 Fix animation speed bug with > going at a different pace than text.
The issue is that stacking the two transitions appears to make the
::after pseudo-element slower for some reason than its parent. This
visually appears to fix it.
2017-03-21 14:10:27 -07:00
Yago González 0c6251e58d docs: Add reference to tilde-fenced code blocks. 2017-03-21 13:58:40 -07:00
Brock Whittaker 5e0a906f84 Fixes for /integrations/ page.
This fixes the hubot text that still stays when you transition to
integration details along with fixing the first animation that is
choppy and previews briefly before fading in.

Fixes #4210.
2017-03-21 13:55:59 -07:00
adnrs96 b3cbb13a79 linter: Add support for automatic checking for 4 space indents in CSS.
In this commit we modify our CSS parser not only to render the text from
a given CSS tokens produced but also enforce 4 space indentation on it.
Also we enforce some basic rules we would like our CSS to follow such as
* Always have "\n" in between the starting of body({) and body itself
  and ending of the body and the closing of body(}).
* Use 4 space indents while having but something within the block
  structure ( { .... } ).
* Have single space after ',' in between multiple selectors.
* Have only a single space in between selector and the starting of
  block structure ({ ... }) if block structure starts on same line as
  of selector.
  eg. body {
          body content here
      }
  Notice single space between 'body' and '{'.

Fixes: #1659.
2017-03-21 13:40:05 -07:00
adnrs96 257187a239 Clean zulip.css to use 4 space indents. 2017-03-21 13:40:05 -07:00
adnrs96 a91012bd70 Move thirdparty-fonts.css from static/styles to static/third. 2017-03-21 13:40:05 -07:00
Tim Abbott 17597e2ddf register: Fix maximum length of realm name field. 2017-03-21 11:04:22 -07:00
Umair Khan a2aeddba6b testing: Add infrastructure for running backend tests in parallel.
This doesn't yet provide an option to actually run the backend tests
parallelized yet.
2017-03-21 10:59:12 -07:00
Tim Abbott 6d452e87a5 context_processors: Handle requests without user set.
If `render()` is called from middleware that runs before the
authentication middleware, then this code path will be called with a
request object where request.user is not yet set.  Handle this by
providing a reasonable error message.
2017-03-21 10:06:39 -07:00
Steve Howell 36b29a966e Add roadmap feature to js-dep-visualizer.
The js-dep-visualizer tool now attempts to find a set of edges
to remove from a call graph that would reduce it to having only
trivial mutual dependencies, and it produces a roadmap of the
changes that need to happen.

If the tool can't reduce the graph all the way, it still produces
a DOT file that can be visualized.

This fix also has some significant code cleanup.
2017-03-21 07:39:30 -07:00
Steve Howell c87c67c33f js deps: Fix ui.report_success(). 2017-03-21 07:39:30 -07:00
Tim Abbott a474f4359d tests: Set maxDiff to None unconditionally. 2017-03-21 07:34:16 -07:00
Tim Abbott 8041ebf579 mypy: Annotate maxDiff variable. 2017-03-21 07:31:37 -07:00
Tim Abbott c2c02ea4da middleware: Fix typo in render_to_response migration.
This fixes a 500 on the invalid realm page.
2017-03-21 07:30:28 -07:00
K.Kanakhin 831a467fa3 upload-widget: Correct file input clearing.
Replacing file input doesn't work for value clearing. The best
way is to clean value directly, which excludes accidentally adding
wrong file after upload-widget validation error.
2017-03-21 00:59:17 -07:00
adnrs96 8ae35211b5 migration: Sync sizes for existing Attachment objects with actual files.
Tweaked by tabbott to add a nop reverse migration.

Fixes #3883.
2017-03-21 00:53:22 -07:00
Tim Abbott 20a7609018 analytics: Rename message count types to use standard Zulip casing. 2017-03-21 00:09:54 -07:00