Commit Graph

12 Commits

Author SHA1 Message Date
Sourav Badami 4616ee7762 Enable display of emoji as their alt codes in reactions.
This currently only supports this in emoji reactions, not in actual
emoji in message bodies, but it's a great start for people who want a
text-only view.

Tweaked to update the text by tabbott.

Fixes #3169.
2017-03-03 15:19:34 -08:00
Tim Abbott e051336ff6 emoji: Tweak emoji reactions CSS to add hover effects.
This provides a fairly intense highlighting of when you're hovering
over a given emoji reaction element.

We may want to tone down the color a bit; I'm hoping for some feedback on this.
2017-02-21 23:12:15 -08:00
hackerkid 10324ba592 Change reaction button color when user reacts.
This makes it easy to see whether you were one of the people who
reacted to a give message.
2017-02-21 23:09:46 -08:00
Sourav Badami eaaec4c908 reactions: Fix emoji picker scrollbar overflow issue.
Fixes #3644.
2017-02-19 21:11:39 -08:00
Brock Whittaker e44723f79d Fix broken emoji popover styling.
This fixes CSS issues such as removing padding with negative margins
and then re-adding padding back later. It also ensures the width of the
picker is exactly six columns wide and does not shift around when zoom
is enabled in the browser.
2017-01-27 16:12:38 -08:00
Tim Abbott 914d9a3412 reactions: Fix bottom margin to look good on selected message. 2017-01-10 12:32:30 -08:00
Tommy Ip bb0225acec emoji reactions: Prevent scroll bar from appearing.
Fixes #3188.
2017-01-10 12:32:30 -08:00
Brock Whittaker 1d414a432f Re-order reactions CSS for better understanding.
This reorders the structure of the styling for the emoji reactions
to better follow the order of the markup.
2017-01-07 10:18:32 -08:00
Brock Whittaker e41b0b80ef Emoji CSS refactoring for FF support.
Emoji styling was broken in Firefox browser due to its lack of support
for the zoom property.

This replaces the zoom property with the transform property that now
scales the emojis down to 70% of their original size.
2017-01-07 10:18:32 -08:00
Brock Whittaker c961172ab1 css: Fix emoji reactions jolt and padding issues.
This fixes two issues:

* If you had around 10 distinct emoji reactions on a message (enough
  to force a line wrap if the add-your-emoji button was visible),
  Zulip would add that button into a new row on hover, jolting the
  message feed.  This fixes that problem by leaving a blank last line
  for the add-your-emoji button.

* We were incorrectly showing the padding for the emoji reactions
  region even if there were no emoji reactions, causing messages to
  have too much padding.
2017-01-06 16:38:12 -08:00
Brock Whittaker 5d2ceb2f16 Change default emoji reaction styling.
This changes the styling to be slightly more compact, have more bottom
padding between the edge of the message wall, and have more consistency.
2017-01-05 15:46:06 -08:00
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