Commit Graph

514 Commits

Author SHA1 Message Date
Cynthia Lin 6e2d180a34 hotkeys: Add hotkey `n` for opening New streams modal in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin ca460fad1f hotkeys: Add hotkey `V` for viewing selected stream in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin b800cb05c0 hotkeys: Add left/right arrow keys to toggle views in Streams menu.
Fixes #4228
2017-03-25 18:35:21 -07:00
Cynthia Lin 69c32daffa hotkeys: Add `U` hotkey for unsubscribing/subscribing in Streams menu.
Fixes #4229
2017-03-25 18:35:21 -07:00
Cynthia Lin d17131dcb4 hotkeys: Rename subs.arrow_keys() to subs.switch_rows(). 2017-03-25 18:35:21 -07:00
Joshua Pan 7adf70e5ad Add node tests for M hotkey. 2017-03-25 09:42:49 -07:00
Tim Abbott e16b082b70 casper: Attempt to fix flakiness in new reload test. 2017-03-23 13:56:59 -07:00
Tim Abbott 49f5be1dba hotkey: Extend tests for message_view_only_keys. 2017-03-23 11:38:37 -07:00
Joshua Pan f40b43a491 hotkeys: Add hotkey `G` an alias for End.
Fixes #4195.
2017-03-23 11:38:36 -07:00
Tim Abbott 5d030e9173 casper: Add test for the reload hashchange logic. 2017-03-22 23:06:08 -07:00
hackerkid ed72ee476f Make user_popover use user_info_popover template. 2017-03-22 16:04:38 -07:00
hackerkid b2fc8d6fa2 Rename message_info_popover* templates to user_info_popover*. 2017-03-22 16:04:38 -07:00
hackerkid 23a5f56023 Add sender avatar in message popover. 2017-03-22 16:04:38 -07:00
hackerkid 32bc5893d0 Remove arrow from message info popover by providing template.
Provide custom template (user_info_popover.handlebars) to message info popover.
2017-03-22 16:04:38 -07:00
hollywoodno d6716838ad bugdown: Remove trailing whitespace on fence code blocks.
This fixes fenced code blocks that are copy-pasted from certain
clients having trailing whitespace anoyingly often.

Fixes #3998.
2017-03-22 14:17:34 -07:00
Steve Howell 2991c19fea Extract typing indicator inbound timing logic.
We now track our inbound timing events using code in
typing_data.js.

This code may be a little more robust with variations on how
recipients are represented in events, although there are no known
bugs here.
2017-03-22 08:20:21 -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
Cynthia Lin 1dfac12c4b hotkeys: Add arrow key navigation in streams/subscriptions menu.
Fixes #4198.
2017-03-21 20:32:28 -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
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
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
adnrs96 a91012bd70 Move thirdparty-fonts.css from static/styles to static/third. 2017-03-21 13:40:05 -07:00
Tim Abbott 32b77d970b casper: Fix missing casper.then in subscriptions tests. 2017-03-20 23:21:38 -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
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
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
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
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
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
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 9c3d63a80b Add '+' hotkey to add thumbs up reaction.
Fixes #3910.
2017-03-19 14:36:33 -07:00
Daw-Ran Liou 81f9de7cc8 Add "*" hotkey to toggle starred flag on the selected message. 2017-03-19 13:42:11 -07:00
Joshua Pan 234e8b500e Add tests for ctrl key functionality. 2017-03-19 12:17:28 -07:00
Daw-Ran Liou f67751d1f0 Add hotkey "l" for opening image in lightbox.
Open the lightbox in the current selected message. Only the first image
shows in the lightbox.
2017-03-19 11:43:21 -07:00
Tim Abbott e9f1531fc7 hotkey: Remap v hotkey -> P. 2017-03-19 11:41:02 -07:00
Steve Howell 099f401b9b Move mark_subscribed/mark_unsubscribed to stream_events.js. 2017-03-19 11:05:45 -07:00
Steve Howell 1d7d6869c9 Extract stream_events.js 2017-03-19 10:56:09 -07:00
Steve Howell 5b2407bb22 Add ui_state.home_tab_obscured() shim. 2017-03-19 10:56:09 -07:00
Rishi Gupta 19d8d16126 js dependencies: Split hash_util.js from hashchange.js. 2017-03-18 20:40:34 -07:00
Steve Howell 16a37754cf Add recipient() and composing() shims. 2017-03-18 15:52:50 -07:00
Steve Howell 27f37e6378 Add hash_util.encodeHashComponent() shim. 2017-03-18 15:52:50 -07:00
Steve Howell faa9446e64 Add compose_actions.start() shim. 2017-03-18 15:52:50 -07:00
Steve Howell a51caceea5 refactor: Extract unread_ops.js
This module mostly contains the mark_* functions that
update the server with info about unread counts.
2017-03-18 10:35:52 -07:00
Steve Howell 7b1bfd6703 Break typeahead_helper's dependency on compose.js.
We now have typeahead_helper's callers pass in compose.stream()
when it's needed for sorting purposes.
2017-03-18 10:35:52 -07:00
Raghav Jajodia 668d9cc6ca server_events: update admin bots on deactivate under settings tab.
Deactivating a bot in the /#settings/your-bots page update
the /#administration version to show a reactivate button.
2017-03-17 21:11:42 -07:00
Arpith Siromoney e073220e21 Add typing notifications front end.
Send typing notification events when user types in the compose box.
Listen for these events and display a notification.

Sending notifications: Notifications are throttled, so that start
notifications are sent every 10 seconds of active typing, and stop
notifications are sent 5 seconds after active typing stops or when the
compose box is closed.

Displaying notifications:
When a typing notification is received, if the current narrow is private
messages or is: pm-with and the user is not the sender,
"Othello is typing..." is displayed underneath the last message. This notification is
removed after 15 seconds. If another notification is received during this period, the
expiration is extended. When a stop notification is received the notification is removed.

Internally, a list of users currently typing is maintained for each
conversation (in a dict). When an event is received the list (for the appropriate
conversation) is updated and the notifications template is re-rendered
based on the narrow information. This template is also re-rendered when
the narrow changes.

Significantly modified by tabbott for clarity.

Fixes #150.
2017-03-17 20:45:07 -07:00