Commit Graph

16316 Commits

Author SHA1 Message Date
Brock Whittaker 4b64ff3752 Change from checking landing page by href to pathname.
Checking by href is a flawed approach due to the fact that hashes
are included in the href and will throw off the results of
returning the last block in a path. The window.location.pathname
property is a much better indicator of the current path.
2017-03-20 23:08:24 -07:00
Raghav Jajodia 2d4ba0fde5 stream_data: Linkify URL in stream description.
If a url is present in stream description, it will be
rendered as a clickable link under /streams page.

Tweaked by tabbott to use the separate rendered_description element to
avoid duplicate rendering and to live-update.

Fixes #1435.
2017-03-20 22:25:03 -07:00
Jeremy Philemon d13901c22b Changed "Choose a user" to "Click on a user to log in".
- Set the width of .login-page-header to 100% to make it responsive on
smaller screens. Previously, the header went off screen for screen
widths <360 px.

Tweaked by tabbott to remove unnecessary translation tags.

Fixes #4106.
2017-03-20 21:55:11 -07:00
Tim Abbott 239f4e474e zephyr_mirror: Simplify process for finding backend script. 2017-03-20 21:52:04 -07:00
Tim Abbott 848da74e3c sync_public_streams: Use option group for arguments. 2017-03-20 21:52:04 -07:00
Tim Abbott 97808d2a51 check-mirror: Remove unnecessary zulip_user variable. 2017-03-20 21:52:04 -07:00
Tim Abbott 96fb78609b check-mirroring: Remove api.zulip.com hardcoding. 2017-03-20 21:52:04 -07:00
Yago González 156b204015 echo: Remove impossible 'quote' 4-space-indented code block type.
Since it's not possible to manually set the language in 4-space-indented
code blocks, there's no point in checking if these blocks' type is
"quote".
2017-03-20 21:49:22 -07:00
Brock Whittaker 6115ef3427 Disable web sockets for mobile devices.
iOS doesn’t seem to play nice with the web socket library we are using
them, so disable use of websockets for sending messages until we can
fix that.

Fixes #2306.
2017-03-20 21:44:23 -07:00
Mahim Goyal 91252b3909 Fix alignment in actions drop-down menu.
Fixes: #3010.
2017-03-20 21:21:53 -07:00
Steve Howell 7bc2df6a91 Put popular emojis in top row of reactions. 2017-03-20 20:23:32 -07:00
Steve Howell 2296bf5859 Clean up rendering code for reaction popovers.
Instead of passing in a hash to template whose keys are a
mixture of records and strings, we now pass in an
array of records.  This also removes a spurious if condition
in the template that was a result of the janky data structure.
2017-03-20 20:23:32 -07:00
hollywoodno dd067c761a analytics: Separate private messages from group private messages.
This makes it possible for our graphs to show the group private
message counts as separate from 1:1 private messages.

Fixes #4102.
2017-03-20 11:46:29 -07:00
Tim Abbott 0c0e5397c4 analytics: Fix nondeterministic ordering of labels. 2017-03-20 11:39:08 -07:00
tejaskasetty 02bd5bedce Fix duplicate emoji entries in compose emoji picker.
We were incorrectly appending all the emoji into the emoji picker
every time it was opened, rather than just once.

Note by tabbott: Arguably this isn't the right fix, in that it might
be better to just render the emoji picker once at the beginning.  But
this definitely fixes the bug.

Fixes #3952.
2017-03-20 10:46:20 -07:00
Steve Howell 29412cd06b bug fix: Fix missing return statement in get_filter_li().
This was regressed in 89e17e1aee.

At least one of the symptoms was that we weren't updating the
activity list properly.  This could also cause tracebacks in
compose fade logic.
2017-03-20 09:49:19 -07:00
Tim Abbott b701062d16 Update + hotkey to use the keypress mechanism.
This fixes in issue where the new + hotkey only worked if you hit
shift+=, not if you pressed an actual "+" key on the keyboard.

Fixes #4182.
2017-03-20 09:46:26 -07:00
Umair Khan 38572311f9 linter: Add a rule to check render_to_response. 2017-03-20 07:54:28 -07:00
Tim Abbott 24c2e62ae1 capitalization: Add exception for selected message.
This fixes a test that's been failing overnight.
2017-03-20 07:52:58 -07:00
Steven Ganz 5041d86db0 tests: Add several missing tests to test_events.
This fixes part of #3633.

Extracted by tabbott from #4162 as ready to merge now.
2017-03-19 23:12:12 -07:00
Jeremy Philemon 2d0ee8a83f Information modals are now responsive on smaller screens.
- Added a media query for `max-width: 768px` where the changes in the
css will take place.
- This fix also makes the navigation menu responsive.

Tweaked by tabbott to better contain the CSS to this module.

Fixes #4022.
2017-03-19 23:00:40 -07:00
Tim Abbott ceeb95ebb1 tests: Fix missing test coverage for /json/realm.
In aa880b0419, we used the raw
do_set_realm_description method rather than calling the API, which
meant that the API success path wasn't actually tested.
2017-03-19 22:49:16 -07:00
Yago González df94719707 lint: Ban redundant linkified URLs. 2017-03-19 22:46:25 -07:00
Jacob Hurwitz eb1843fd37 [zephyr_mirror] add support for zcrypt'ed classes with colons
The regex used for parsing .crypt-table didn't allow colons in class
names. This commit changes the [^:] token with \S, meaning that class
names can now contain colons but can no longer contain whitespace.

I think this should be fine, since zcrypt is only used for MIT zephyr,
where (by convention) class names do not contain whitespace.

Additionally, it should not be possible for us to accidentally consume a
field-separating colon as part of the class capture group because the
regex enforces that all field-separating colons are followed by one or
more whitespace characters, whereas the class name cannot contain
whitespace.
2017-03-19 22:30:21 -07:00
Tim Abbott 81194df65d test_bots: Add stream is not None asserts. 2017-03-19 22:26:25 -07:00
Tim Abbott e2eeef5118 recipient_for_emails: Fix confusing type reuse. 2017-03-19 22:26:25 -07:00
Tim Abbott 7e5d5b5cce mypy: Clean up repetition in test_realm_aliases.
The assert added in this refactoring addresses a mypy issue with
strict optional since get_realm_by_email_domain might return None.
2017-03-19 22:26:25 -07:00
Tim Abbott 5b0ff2a69a mypy: Fix some strict-optional related issues. 2017-03-19 22:26:25 -07:00
Tim Abbott 2b62c4fa38 mypy: Fix missing annotation in Tornado handlers.
This was accidentally removed in
9866124b78, but is needed on the current
mypy version.
2017-03-19 22:26:25 -07:00
Brock Whittaker 2775707a67 hotkeys: Add lightbox image feed with controls.
This adds an image feed that you can scroll through with hotkeys
in the lightbox.

The left and right arrow keys along with the left and right arrows
will go to the prev/next image, and clicking on an image will also
take a user to that image.
2017-03-19 22:11:38 -07:00
Brock Whittaker fa5a093738 hotkeys: Add keyboard shortcut for opening the gear menu.
This adds the shortcut “g” for opening the gear menu.
2017-03-19 22:08:21 -07:00
Brock Whittaker 2c28e519d8 Fix un-tab-able links in gear menu.
This fixes some un-tab-able links in the gear menu to have a tabindex
so that they can be tabbed over with shortcuts.
2017-03-19 22:06:27 -07:00
Tim Abbott 70a0df73ba tests: Add some documentation for the hotkey node tests. 2017-03-19 22:06:27 -07:00
Brock Whittaker 32d1e64530 hotkey: Improve clarity of error messages in hotkeys tests.
This will provide a clearer error message than a ReferenceError as to
what's wrong when the wrong values are in hotkey tests.
2017-03-19 22:06:27 -07:00
Tim Abbott 8fa60cf77c py3: Remove use of typing.Deque.
Apparently this is only available in ultra-modern versions of Python 3?
2017-03-19 21:39:54 -07:00
Steve Howell edb8b0cb5e Improve js-dep-visualizer.
This adds a report of nodes, handles some errors better, adds
some helpful output, cleans up some abspath calls, and
updates which modules and/or dependencies we temporarily are
ignoring for the report.
2017-03-19 21:03:45 -07:00
Steve Howell fd856d728c Extract message_util.js 2017-03-19 21:03:45 -07:00
Steve Howell 8d3d70984d Extract message_events.js. 2017-03-19 21:03:45 -07:00
Steve Howell 1114c8bf62 Extract message_fetch.js. 2017-03-19 21:03:45 -07:00
Tim Abbott 9866124b78 mypy: Fix some new errors flagged by latest mypy master.
Mostly list -> List bugs in annotations.
2017-03-19 21:03:45 -07:00
wangjames e0813c7288 collapse: Fix new messages not being collapsed consistently.
This fixes a bug where newly received very-long messages would only
sometimes be collapsed properly until a second message arrived
(whether it did the right thing dependened on whether the new message
had the same recipient or a different recipient from other arriving
messages).

Apparently, we correctly called condense.condense_and_collapse in all
but one of the codepaths of `render` that add new messages.  This
adds a call on the missing codepath.

Fixes #3978.
2017-03-19 20:39:21 -07:00
Tim Abbott 7e74af3cea docs: Shorten some keyboard shortcut descriptions.
In particular, this fixes some unnecessarily multi-line descriptions
that made the keyboard shortcuts display look bad.
2017-03-19 14:45:16 -07:00
Joshua Pan 93609cc39d Update shortcuts modal and documentation with reaction hotkeys. 2017-03-19 14:45:00 -07:00
Joshua Pan 5ec21e2230 hotkey.js: Add opening reactions hotkey.
Add frontend tests for ":" hotkey.

Fixes #3911.
2017-03-19 14:37:05 -07:00
Joshua Pan b600e4d594 Pressing enter in reactions search picks first reaction. 2017-03-19 14:36:34 -07:00
Joshua Pan 9c3d63a80b Add '+' hotkey to add thumbs up reaction.
Fixes #3910.
2017-03-19 14:36:33 -07:00
Joshua Pan c8f2da3f3e reactions.js: Refactor reaction_popover_reaction_on_click. 2017-03-19 14:25:10 -07:00
Elliott Jin 356f57c831 refactor: Simplify pattern for adding external linters. 2017-03-19 14:13:38 -07:00
Elliott Jin ac488fd45f tools: Don't lint in pre-commit hook if no files changed. 2017-03-19 14:13:38 -07:00
Elliott Jin 5ada385b91 refactor: Check for empty list with `len(X) == 0` instead of `not X`. 2017-03-19 14:13:38 -07:00