zulip/zproject
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
..
jinja2 mypy: Convert several directories to use typing.Text. 2016-12-07 20:51:05 -08:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py Remove calls to get_realm in preparation for its deprecation. 2016-12-26 17:53:32 -08:00
dev_settings.py Add oembed/Open Graph/Meta tags data retrieval from inline links. 2016-12-07 17:40:18 -08:00
dev_urls.py Django 1.10: Upgrade urls of dev_urls.py. 2016-11-10 16:20:02 +05:00
legacy_urls.py API: Migrate POST `/ui_settings/change` to PATCH `/settings/ui` 2016-12-24 11:02:02 -08:00
local_settings.py pep8: Fix E225 pep8 violations. 2016-11-28 15:21:15 -08:00
prod_settings_template.py pep8: Fix many rule E128 violations. 2016-12-03 13:33:31 -08:00
settings.py Add frontend support for emoji reactions. 2016-12-30 21:42:54 -08:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py ldap: Suppress logging output of fakeldap. 2016-12-30 16:55:06 -08:00
urls.py reactions: Fix support for "+1" emoji. 2016-12-30 21:42:24 -08:00
wsgi.py Django 1.10: Use uWSGI. 2016-12-13 21:40:43 -08:00