Commit Graph

2192 Commits

Author SHA1 Message Date
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
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
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
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
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
wangjames
12eeb27442 js dependencies: Extract ui_state.js.
The function home_tab_obscured used to be in the ui_state
namespace via a shim, but now we have an actual module for
it.
2017-03-19 14:11:50 -07:00
Sarah Stringer
aa880b0419 Add organization description field to realm settings.
This adds an organization description field to the Realm model, as well as
an input field to the organization settings template. Added three tests.
Set the max length of the field to 100 characters.

Fixes #3962.
2017-03-19 14:05:01 -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
c053f786f7 Add ctrl+[ hotkey.
Fixes #4016.
2017-03-19 12:17:28 -07:00
Joshua Pan
fcbc2e0cb9 Add ctrl key functionality to hotkeys. 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
eda046409c Move paging methods into navigate.js. 2017-03-19 11:05:46 -07:00
Steve Howell
d026344b37 Extract js/ui_util.js. 2017-03-19 11:05:45 -07:00
Steve Howell
099f401b9b Move mark_subscribed/mark_unsubscribed to stream_events.js. 2017-03-19 11:05:45 -07:00
Steve Howell
b98cd55ddb Add ui_report shim. 2017-03-19 11:05:44 -07:00
Steve Howell
c67aebf633 Move keep_pointer_in_view() to message_viewport.js. 2017-03-19 10:56:09 -07:00
Steve Howell
1d7d6869c9 Extract stream_events.js 2017-03-19 10:56:09 -07:00
Steve Howell
cfd1e8cbc3 Extract stream_muting.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
Steve Howell
ab34b5ee9f Extract ui_init.js. 2017-03-19 10:56:09 -07:00
Steve Howell
203ced0ee6 minor: Rename var in filter_emojis(). 2017-03-19 06:25:10 -07:00
Rishi Gupta
19d8d16126 js dependencies: Split hash_util.js from hashchange.js. 2017-03-18 20:40:34 -07:00
Jonathan Pan
ceffe2128d activity: Clear search box after clicking a user in right sidebar.
Fixes #4105.
2017-03-18 16:15:14 -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
d75efa19db Add compose_state.has_message_content() shim. 2017-03-18 15:52:50 -07:00
Steve Howell
59fd9e4d48 Add compose_actions.cancel() 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
35d38d62f3 Add shim.js w/narrow_state global. 2017-03-18 15:52:50 -07:00
Luke W Faraone
68e7a8a824 Show stream properties on subscription in Zephyr.
On realms with ``should_list_all_streams() == False``, previously, we
would subscribe a user to a stream, but also incorrectly show the stream
creation dialog.

Instead, we act as if the stream was newly created.
2017-03-18 15:51:27 -07:00
Tim Abbott
f67e9a7e5e CSS: Rename #overlay to #lightbox_overlay. 2017-03-18 13:54:11 -07:00
Tim Abbott
ed90879602 js: Extract lightbox.js from ui.js. 2017-03-18 13:54:11 -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
0c6fefba71 Move get_cleaned_pm_recipients() to helper module.
This break's typeahead_helper's dependency on
composebox_typeahead.
2017-03-18 10:35:52 -07:00
Steve Howell
7f43c0504b refactor: Rename fields for split_by_subscribers().
The old name 'subs' was confusing our tooling, since we have
a module called subs.js.
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
Steve Howell
166f149ef9 refactor: Add current_stream parameter to functions.
This change makes our dependency on compose.stream_name() happen
in sort_recipients, so we compute it only once, and we can
more easily break the circular dependency.
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
Raghav Jajodia
89a83f6a5d admin.js: Refactor code to change view on bot deactivate/reactivate.
This also fixes the error associated with view on toggle deactivation.
Now, on deactivating a bot, the bot-name and bot-email should strike-out.
And on reactivating a bot, the bot-name and bot-email should remove strike-out.
Toggle edit button on bot activation/deactivation.
Fixes #3413.
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
Tim Abbott
8efe4d530d js: check_stream_existence to subs.js.
We want to remove this, but in the meantime, this is a more coherent
place for htis to live than compose.js.
2017-03-17 15:16:11 -07:00