Commit Graph

33 Commits

Author SHA1 Message Date
Aditya Bansal 0ec50d8cc8 reminders: Hide message menu reminder's option behind features_flag. 2018-01-24 03:33:40 +05:30
Aditya Bansal 0f71a7ecca reminders: Add UI for setting up reminders for messages in the feed. 2018-01-19 11:33:11 -05:00
Steve Howell 94da59ff81 local echo: Don't show collapse/uncollapse items.
Trying to collapse a locally echoed message is a rare
thing to do, and it was buggy before this due to races
between the server acking the original message and the
user flipping the collapsed flag.

We now calculate `should_display_collapse` and
`should_display_uncollapse` in the JS code and simplify
the template by eliminating all the inline if/else
logic.

(Note that we are about to disable the message menu
altogether for locally echoed messages, so this change
is partly future-proofing for when we put the menu
back for more innocuous commands.)
2017-12-26 09:01:21 -05:00
Brock Whittaker 2ed3c615de popovers: Fix padding to be more uniform.
The popovers for the message down chevron and left sidebar had
strange side padding and non-uniform padding between the top and
bottom. This changes them to all have the same padding as the
nav `#gear_menu`; none on the sides and 5px on the top and bottom.
2017-09-27 18:46:08 -07:00
Vaida Plankyte b2c0ff68c2 frontend: Add hotkey information to title/inline text.
This should make many Zulip hotkeys significantly more discoverable.
2017-08-23 17:12:09 -07:00
Aditya Bansal 226b41c62e actions_popover_content.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
K.Kanakhin 2434f2d96c messages: Add support for admins deleting messages.
This makes it possible for Zulip administrators to delete messages.
This is primarily intended for use in deleting early test messages,
but it can solve other problems as well.

Later we'll want to play with the permissions model for this, but for
now, the goal is just to integrate the feature.

Note that it saves the deleted messages for some time using the same
approach as Zulip's message retention policy feature.

Fixes #135.
2017-05-29 21:59:38 -07:00
Mahim Goyal a2adcfd7fc popovers: Add direct copy to clipboard link feature.
Change the onClick function of copy link of
conversation to actually copy the link to clipboard.

Fixes: #4621.
2017-05-09 09:59:23 -07:00
Aditya Bansal 6f49579e65 Clean actions_popover_content.handlebars to use 4 space indents. 2017-04-26 00:16:22 -07:00
Tim Abbott 496158c2d7 popovers: Move historical notice to actions popover.
This is still kinda ugly, so may need further work, but it at least is
now in a per-message location, not a per-sender-block location.
2017-04-14 17:17:19 -07:00
Kartik Maji 1a697b6e02 Add frontend to show message edit history.
Fixes #268.

Modified significantly by tabbott to:
* improve code cleanliness / repetition
* add missing translation tags
* move code into message_edit.js
* correspond with the new backend.
* not display the option for messages only topic-edited
2017-02-19 17:41:06 -08:00
Rafid Aslam 241794c586 Change "Reply" to "Quote and reply" in message popover
Change "Reply" in message popover to "Quote and reply"
which is reply and quotes the selected message.

Fixes #3302.
2017-02-11 14:51:55 -08:00
Harshit Bansal 8350866406 popovers: Rename `data-msgid` to `data-message-id`.
Rename the `data-msgid` to `data-message-id` to match the style of our
other data objects.
2017-02-06 22:30:50 -08:00
Steve Howell cc7ccb56d4 Revert "Fix inconsistent spacing in message actions popover."
This reverts commit 1f13a991f4.

Moving to tables makes it so that we can't navigate the menu
with the keyboard.

Fixes #3352
2017-01-17 14:40:49 -08:00
Mahim Goyal 1f13a991f4 Fix inconsistent spacing in message actions popover.
This was implemented by changing the format of the popover from a list
to a table.

Fixes #3010.
2017-01-16 20:10: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
Rishi Gupta 82a0fe0eca actions popover: Change "Topic Edit" to "View Source / Topic Edit".
Also edit the icon to show "View Source" as the primary feature.
2016-10-25 15:12:32 -07:00
Rishi Gupta 49b23ea84a frontend: Allow users to see the source of messages they can't edit.
Previously we showed an "Edit" item in the actions popover menu when a user
could edit the content or topic of a message, and nothing otherwise. We now
show "Edit", "Edit Topic", or "View Source" in the popover menu for every
message, depending on the editability of the message, and present an
appropriate version of message_edit_form when the menu item is clicked.

Finishes #1604 and #1761.
2016-10-22 18:53:59 -07:00
Rishi Gupta 879f2a1e2e message editing: Refactor editability computation to use editability_types.
We compute the editability of messages in several places around the
frontend; standardize the definitions and store in
message_edit.get_editability. This commit should not change app behavior.
2016-10-22 18:52:49 -07:00
Umair Khan ac13187d76 Add translation tags to the templates.
Fixes #726
2016-05-19 22:58:26 -07:00
Steve Howell f1ee2c6503 Put "Link to this conversation" lower in the message menu.
(imported from commit 73d75ac40f097c161f7168a5590c069c1b9e0641)
2014-02-18 13:19:39 -05:00
Steve Howell bbfd33185c Remove narrowing options from message chevron menu.
Remove the options to narrow by topic/person from the menu,
because there are better ways to do this in the UI, and
remove the time travel option, because the "Link to this
conversation" achieves mostly the same effect.

(imported from commit b7e0cfe64c0760e5a7bf7a8c9c05ed1a5b747300)
2014-02-18 13:19:39 -05:00
Steve Howell 580b6949cc Remove reply-to-person-only option from message chevron menu.
(imported from commit 469ebc9b01ee60eb8c0a673099e0dc735ea95a0e)
2014-02-18 13:19:39 -05:00
Steve Howell 64ff916ca2 Be concise in popover menus.
Say Edit/Reply/Collapse/etc. and omit phrases like "this message".

(imported from commit bcf0a8690683c1e0d54b7a6a58fe78b787271357)
2014-02-18 13:19:38 -05:00
Tim Abbott 3378fc74c7 Enable conversation narrows (but not single-message narrows) for everyone.
(imported from commit 48123d77f9f9dc5d858718888dedf763328a9774)
2013-11-25 14:00:28 -05:00
Tim Abbott 8952d8d428 Add 'narrow to this conversation and time' narrowing.
(imported from commit 3bc5ea09d333c2caa37557419d54d48bbbb5a639)
2013-11-25 14:00:28 -05:00
Tim Abbott be2d546ffe Fix narrowing links in message popovers.
This should make it possible to either open these using middle-click
or copy the links for e.g. putting in a bug tracker ticket.

(imported from commit 0c531453cdd7197f932079c245700948b416a3d5)
2013-11-25 14:00:28 -05:00
Steve Howell 3fcbfeaa80 Move "Edit this message" higher in the info menu.
For messages that you sent yourself, it is more likely that you
will want to edit the message than reply to yourself, collapse
your own message, etc. from the info menu, so we make it the first
option.  This should make it easier for keyboard users to edit
messages.

(imported from commit 94c5036a4ae85ed091c95eae2545e78887a09598)
2013-11-07 10:43:09 -05:00
Steve Howell 0ad4554723 Allow customer12.invalid users to narrow to a single message.
Add the option "Narrow to just this message" to the chevron
menu.  This has two use cases:

    * It's an easy way to get a sharable URL for the message.
    * It reduces distractions.

For now it is feature flagged to just customer12.invalid and staging.
See #1880.

(imported from commit 897d247176f9024ff825ccd3b338236569eed5ab)
2013-10-11 15:52:10 -04:00
Steve Howell 042f5bda26 Add unmuting to message actions menu
(imported from commit 5188a36ec73aa2913b0d82f7e7ce12be78f4ccee)
2013-09-11 16:47:37 -04:00
Steve Howell b65f9b678b Add muting to message actions menu
(imported from commit 26568e36f2a41f2b85413ab4d069a689c9901aac)
2013-09-11 16:47:36 -04:00
Waseem Daher d7da9d8bad Switch to using Font Awesome everywhere.
(imported from commit 406ac9e8e24066e45833a71adcdd95b26b5cfb9b)
2013-08-02 14:49:28 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00