Commit Graph

25 Commits

Author SHA1 Message Date
Sayam Samal
9591d05bd7 message_header: Update legacy edit topic button to use icon button.
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.
2025-07-08 10:05:51 -07:00
Pratik Chanda
e1d60b6363 tooltip: Fix empty tooltip on recipient row resolve topic spinner.
This commit removes empty tooltip from resolve topic spinner.
2025-06-17 18:55:41 -07:00
Kislay Verma
28a277027b message_list_tooltips: Avoid showing undefined.
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.
2025-03-12 09:28:01 -07:00
Lauryn Menard
0f5246400b message-edit: Use last_moved_timestamp for edited/moved indicators.
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.
2025-03-11 16:42:28 -07:00
Lauryn Menard
7c653165af message-edit-tooltip: Use message_container.modified to show tooltip.
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.
2025-03-11 16:42:28 -07:00
harshbansal8705
6c1a69c736 message_editing: Make bouncing "..." open edit history modal on click.
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.
2025-03-05 16:23:50 -08:00
Saubhagya Patel
f9825142c8 settings: Add frontend to change allow_edit_history to integer field.
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>
2025-02-25 18:18:23 -08:00
Aman Agrawal
7933cecf22 message_length_toggle: Fix tooltip not hidden on narrow change.
We fix tooltip being still visible once collapse / expand tooltip
is visible and user changes narrow by destroying the tooltip when
reference is hidden.
2025-02-23 16:04:19 -08:00
Aman Agrawal
3d513720cb recipient_row: Add icon to open topic popover. 2025-01-07 09:47:25 -08:00
opmkumar
5eb51e2df6 message_edit: Add message length limit indicator in edit message UI.
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.
2024-12-04 11:44:51 -08:00
Anders Kaseorg
cc7b667d57 message_list_tooltips: Fix observer type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 09:54:56 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg
7bd5ec28ae dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-04 08:47:07 -07:00
Tim Abbott
08e04e2195 message_edit_notice_tooltip: Rewrite to fix inverted check.
Apparently, abece73c5a had misconverted
the case where edit history is disabled.
2024-09-23 18:13:17 -07:00
Pratik Chanda
aeebbbb825 tooltips: Defer computing last_edit_timestr until tooltip renders.
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.
2024-09-23 18:13:17 -07:00
Sayam Samal
a743bb0eb6 copy: Use redesigned copy button in rendered codeblocks. 2024-09-20 15:44:20 -07:00
Pratik Chanda
72f0695e34 tooltip: Fix topic status tooltip not showing on hovering.
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.
2024-07-05 16:36:49 -07:00
Pratik Chanda
3d8fac370e tooltip: Refactor recipient_bar_icon tooltip tooltip in message feed.
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.
2024-07-05 16:36:49 -07:00
Anders Kaseorg
9b711cda20 tippy: Use namespace import for tippy.js.
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>
2024-05-30 15:45:46 -07:00
Anders Kaseorg
c2bae4c9d9 message_list_tooltips: Convert .data("is-bot") to .attr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 12:45:46 -07:00
sujal
eba0097c7f message_feed: Modify tooltips to clarify draft saving.
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.
2024-04-20 18:00:22 -07:00
Aman Agrawal
0a90a13bec popover_menus: Fix event handler trying to hide a hidden popover.
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.
2024-04-04 12:51:35 -07:00
Karl Stolley
1425d2f71f message_body: Hyphenate message-time class. 2024-04-03 17:38:43 -07:00
Prakhar Pratyush
e5d50d9787 message_list_tooltips: Fix code style issue.
frontend-lint was failing due to code style issue
in 'message_list_tooltips'.

This was introduced in fd3c7728fc.
2024-03-22 22:35:15 -07:00
Varun Singh
fd3c7728fc message_list_tooltips: Convert module to TypeScript. 2024-03-22 15:37:57 -07:00