zulip/frontend_tests
Arpith Siromoney 9c64a08cad Add frontend support for emoji reactions.
This commit replaces the placeholder "clipboard" button with a reaction button.
This is done on any message that can't be edited. Also, on messages sent by
the user the actions popover (toggled by the down chevron icon) contains
an option to add a reaction.

When clicked, a popover with a search bar and a list of emojis is displayed.
If the right sidebar is collapsed (the viewport is small), the popover is placed
to the left of the button.
Focus is set to the search bar. Typing in the search bar filters emojis.

Emojis with which the user has reacted to this message are highlighted.
Clicking them sends an API request to remove that reaction.
Clicking on non-highlighted emojis sends an API request to add a reaction.
When the popover loses focus it is closed.

The frontend listens for reaction events. When an add-reaction event is
received, the emoji is displayed at the bottom of the message with a
count initialized to 1. If there was an existing reaction to the message with
the same emoji, the count is incremented.

Old messages fetched from the server contain reactions.
They are displayed (along with title and count) at the bottom
of each message.

When clicking the emoji reaction at the bottom of the message, if the
user has already reacted with that emoji to this message, the reaction
is removed and the count is decremented. Otherwise, a reaction is added
and the count is incremented.

Hovering over the emoji reaction at the bottom of the message displays
a list of users who have reacted with this emoji along with the
emoji name.

Hovering over the emoji reactions at the bottom of the message displays
a button to add a reaction.

Fixes #541.
2016-12-30 21:42:54 -08:00
..
casper_lib lint: Fix many no-unused-vars eslint rule violations. 2016-12-14 21:34:51 -08:00
casper_tests Loosen realm filter pattern validator to support Git commit IDs. 2016-12-27 20:31:08 -08:00
node_tests Add frontend support for emoji reactions. 2016-12-30 21:42:54 -08:00
zjsunit lint: Fix several no-unused-vars eslint rule violations. 2016-12-03 18:43:47 -08:00
.eslintrc.json Eslint: Add additioanl rules, some for GCI. 2016-12-05 10:01:56 -08:00
run-casper Django 1.10: Use single cache prefix for casper tests. 2016-12-14 22:40:33 -08:00