This commit is part of a series of commits aimed at updating the message
header buttons to use the new icon button component which has consistent
styling across the Web UI and offers a larger clickable area for the
users.
This commit also replaces the legacy font awesome pencil icon to the
newer "edit" icon from the Zulip font icons.
Fixes part of #34477.
If the template_id of the message_control_button
is undefined, we do not render the tooltip at all.
This might happen, for example,
when a message is past its editable period and
the edit button is not displayed.
Use both the last_moved_timestamp and last_edit_timestamp to show
edited and moved indicators/tooltips in the message list view of
the web app, instead of parsing the message edit history array.
We still maintain and build the message edit history array as it's
used for calculating the narrow terms when there is a near operator
and a message has been moved to a different channel or topic.
Updates the tooltip for message edit indicators to include both
the moved and edited time if a message has been both moved and
edited.
When we build the message_container for the message list view, we
get a boolean value for showing the edit notice (saving, moved, or
edited) on the message, so we now use that for whether we show the
associated message edit tooltip as well.
Also, if the message is modified, then we either have a last edited
timestamp from the server or from a local edit, so it shouldn't be
undefined.
Previously, clicking on the bouncing "..." (indicating an ongoing
edit) did not open the edit history modal, even when the message had
prior edits. This made it difficult for users to view the edit history
while an edit was in progress.
This commit updates the behavior so that if a message has an edit
history, clicking on the bouncing "..." will open the edit history
modal, just as clicking on the "EDITED" notice does. If no prior edits
exist, the indicator doesn't show any tooltip.
This commit implements the frontend of migrating the
`allow_edit_history` setting to `message_edit_history_visibility`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.
Fixes#21398.
Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
We fix tooltip being still visible once collapse / expand tooltip
is visible and user changes narrow by destroying the tooltip when
reference is hidden.
Adds a message length limit indicator similar to the one in the compose box.
The tooltip message for the disabled save button now appears dynamically
based on whether the message exceeds the length limit or the editing time
has expired.
Fixes#25271.
Earlier, we used to compute last_edit_timestr as data-tippy-content
when rendering the whole message feed.
This commit changes the behaviour by computing the `last_edit_timestr`
when a user hovers over the message_edit_notice.
Fixes: zulip#27240.
Earlier, in recents view and inbox view, hovering over
`topic status button` didnot show `click to change notifications for this
topic` tooltip as it was supposed to.
This commit fixes the behaviour of tooltip not showing by adding a
tooltip for `recent_view` and `inbox-view` elements.
This commit refactors the `message_list_tooltip` for `recipient_bar_icon`
tooltip in message feed and scope it to `message_feed_container` class.
This is a preparatory commit for PR #30313.
Names like “delegate”, “Instance”, “Placement”, “Props”, and
“ReferenceElement” are much too generic to make sense as named
imports.
The downside is that we now need to write tippy.default(…) instead of
tippy(…) (because ES module namespace objects cannot be callable), but
that cost is worthwhile.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Update the tooltips for the "Cancel" and "Spinner". Provide clear
information about the draft saving behavior when a message fails to
send successfully.
Fixes part of #29100.
When user is trying to open a modal after clicking on a button
in a popover, we call popovers.hide_all() before opening the modal
which hides the popover but since the event handler call isn't
finished running yet, we call instance.hide() again resulting in
tippy throwing errors that this could be a memory leak.
We introduce a wrapper function for `instance.hide` which if
the popover/tooltip is visible before hiding it to fix it.