Commit Graph

23 Commits

Author SHA1 Message Date
Tim Abbott 4538792517 message controls: Use login_to_access modal for reactions/stars.
Hiding these UI widgets causing layout issues -- specifically, the
position of the \vdots menu looks off with these elements missing.

Enabling this buttons (and opening the login_to_access modal on click)
provides a light advertisement for these features, seems to be the
standard practice for forum-like software, and will also be easier to
maintain.

This effectively reverts f26a76a9d8, in
addition to adding new logic.
2022-04-29 16:35:49 -07:00
m-e-l-u-h-a-n e7b1de8ace message view: Show failed message icon tooltips similar to other icons.
We had tooltips bound to failed message action icons, because of
slightly different html structure for these action buttons as
compared to other message action buttons. There were some minor
problems due to this. First there was difference of delay
in which we show other normal action button tooltips. Second
we had to add extra checks to handle tooltip content for these
buttons in tippyjs module.

This is fixed by having same html structure for failed message
buttons as for other message action buttons.
2021-07-18 11:33:32 -07:00
Aman Agrawal 578f93b2f3 tippy: Set default placement of tooltips to top.
Generally, tooltips placed at top look good. If the tooltip cannot
fit at top, it will by default be placed at opposite side.

Removed the unnecessary top placement definitions.
2021-07-07 10:23:31 -07:00
Aman Agrawal f26a76a9d8 message_controls: Hide irrelevant icons for spectators. 2021-06-16 10:19:07 -07:00
Tim Abbott 90041ff453 css: Deduplicate CSS for message_control_button elements.
Each copy set the same 3 properties, with the actions menu relying on
the terribly named "info" class for its copy.
2021-06-11 15:08:14 -07:00
m-e-l-u-h-a-n c97956c5ff message view: Fix tooltips in message action icons.
Tooltips in message action buttons for failed message were
not shown properly because they were initialized two times
first because of general tippy-zulip-tooltip class and then
because of message_control_button class. So to avoid showing
an extra empty tooltip for failed message icons we return
false from onShow() method of message_control_button class
initialization of tooltip.
2021-05-20 17:30:24 -07:00
Tim Abbott 3edb9b8ed6 tooltips: Use TippyJS for all message_control_button tooltips.
The inconsistent style between these three buttons looked bad.

We have to take some care with the "Starred messages" and "Edit" ones,
to make sure they live-update properly.
2021-05-13 12:56:38 -07:00
Tim Abbott dc33b2a515 message_controls: Show keyboard shortcut for emoji button. 2021-05-13 10:06:43 -07:00
Tim Abbott 13a2c9712f message_controls: Remove duplicate title element. 2021-05-13 10:04:19 -07:00
Aman Agrawal 5bd37b44f2 zulip-icon: Add `zulip-icon` as classPrefix for icon.
This avoids general class names like `bot`.
2021-04-29 09:02:25 -07:00
Aman Agrawal 6271a7db9c message_controls: Don't set css properties for all `div`s in it.
This tends to behave badly when we add new elements which don't
want these properties.
2021-04-14 10:15:58 -07:00
Anders Kaseorg 5fed442bb1 templates: Remove context argument from {{#tr}} block helper.
It only had one nontrivial use, and it’s easily replaced using the
builtin {{#with}} block helper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 18:59:46 -07:00
Anders Kaseorg 0892e98012 i18n: Convert Handlebars messages to FormatJS.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 17:41:10 -07:00
Aman Agrawal 487fcb6a3c reaction_button: Use tippy for tooltip.
Tippyjs automatically places it to bottom.
2021-04-07 17:38:40 -07:00
Aman Agrawal dd35c3ba05 message_controls: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00
Signior-X e1c4c7b802 message view: Show message source button until message successfully sent.
This commit removes the unless msg/locally_echoed condition for the
edit content div, which has the consequence of making the "view
message source" widget always available for locally echoed
messages. This ensures that the message source can be seen if a very
long message has been drafted and it fails due to a server-side error
(See #17425 for the original report).

Fixes #17650.
2021-03-18 14:49:09 -07:00
nikhilmaske-2001 16c78e4b34
star_this_message: Change title of star-icon from "(*)" to "(Ctrl + s)".
This was missed when we changed the shortcut in 9674a139bf.
2020-11-20 11:35:27 -08:00
Gittenburg 4cd23103db message feed: Make message controls more accessible.
We already have single-key shortcuts for all message controls but Zulip
should be usable from the keyboard without having to learn a bunch of
Zulip-specific keyboard shortcuts.
2020-07-30 16:53:00 -07:00
SiddharthVarshney 972a1019cf message_controls: Replace chevron-down with ellipsis-v icon.
After migrating chevron-down with ellipsis for
sidebar-menu, this commit will do the same for
message narrow for consistency.
2020-07-13 16:12:26 -07:00
SiddharthVarshney d0fd0cae3f message-controls: Use <i> tag for starred message icon.
Throughout the codebase we use <i> tag for icons.
This commit will add <i> tag inside the starred message
div and fa classes are now used with this <i> tag.

The starred message div is now consistent with other
message_controls divs.

Tweaked by tabbott to use the name star_container for better
readability.
2020-07-13 15:59:12 -07:00
YashRE42 1defd21dac message_controls: Don't show pencil icon until server ack.
Previously, this was unconditional wrt local echoe which caused a bug
where by the pencil edit icon was visible first, then got hidden when
the chevron and star became visible.

This commit resolves the above bug, but this area still behaves
slightly weirdly in that, if, within a PM narrow, the user's mouse
cursor is over the spot where the message edit controls will appear
after sending, and then a message is sent by the user, only the
chevron and star appear at first. On cursor exit and reenter, all
three controls reappear ie the final state is correct.

Similar to the other "unless locally echoed" cases here, this will
probably prevent unexpected bugs caused by eg trying to enter edit
state before the message was received by the server, and then
redrawing later, etc.
2020-06-29 16:28:52 -07:00
Vaibhav 2fd0753d22 reactions_button: Remove title from reaction button in controls.
Since the button already has a tooltip, we can remove the title.
2019-07-25 16:13:19 -07:00
Anders Kaseorg 3c3471b720 templates: Rename *.handlebars ↦ *.hbs and - ↦ _.
Tweaked by tabbott to avoid accidentally disabling the linter for
handlebars templates.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:03 -07:00