Separating these concepts allows us to provide a much nicer format for
contexts where ultra-specific clarification is not a priority.
This new variant is currently only used in the scheduled messages UI.
We've had a series of bugs where tooltips get leaked when a message list
is rerendered. For some tooltips, we used a 'mutation observer' to remove the tooltip
in this situation, but this was expensive and messy. We replace this with a Tippy
plugin to keep track of this class of tooltips, with a central hook to remove them
during rendering.
Message lists are rerendered in the background in a variety of situations;
a simple way to trigger it is clicking the mute/unmute topic/stream button in
the topic menu/stream menu and the clickable area overlaps with the
message list tooltips area. If a tooltip was visible at the time, the tooltip loses its
reference due to the re-rendering removing its DOM element, appearing at the top-left corner.
To prevent this behavior for all message list tooltips, we need to
store all instances of the message list tooltips and then destroy
them if the instances does refer to something else then document.body
using the 'destroy_all_message_list_instances' function just
before re-rendering.
Whenever the message list is rendered, all the message list tooltips
will be destroyed if they do not refer to document.body. This
prevents the double appearance of those tooltips if the reference
is removed from the DOM.
This plugin allows us to remove the mutation observers and net delete code
while hopefully fixing this bug for the whole app.
When composing a private message to a different recipient than the
current view, the go-to-compose-target icon looked vertically
misaligned with these icons. Fix this by removing the CSS rule that
made these other top-corner icons not centered within their row.
The new update_submit_disabled_state_on_change parameter configures
the dialog_widget system to disable/enable the confirmation button
depending on whether any of the fields in the modal have values
differing from their initial values.
Fixes#22683.
This commit removes the keyboard shortcut from tooltips that
can be seen when hovering over the two buttons in
"View Scheduled Messages" modal.
This is a temporary change as the keyboard shortcut will be
added to the tooltips when the shortcuts are actually working.
We should hide the "Add emoji reaction" from the message action menu while a
user is not logged in, that is user is in public access mode.
Fixes#25331.
This commit fixes the opacity of the group-icon and bot-icon
in the left-sidebar direct message section to make them look
more consistent with the other icons in the left sidebar.
This commit removes the presence dot display for bots and fixes
the gap between the bot name and bot icon in the user profile
popover. It also fixes the alignment of the bot icon.
Fixes: #25066
The server will probably accept them and just send the message
immediately, which seems OK, but we probably want to discourage
scheduling a message to be sent in the past, since that's unlikely to
be intentional and would make it hard to undo.
This removes the HTML structure and CSS styles previously associated
with the element in the scheduling modal.
Preserving this all in its own commit in case it needs to be
restored.
This introduces a 'Custom time' link to the bottom of the scheduling
modal's options. Clicking on it pulls up the date picker.
Additionally, clicking on the 'Custom time' link, then clicking
elsewhere to close the time-picker, then subsequently clicking
'Custom time' again reveals the time-picker.
However, repeatedly clicking the 'Custom time' link while the
date-picker is already open will cause the date-picker to redraw
each time.
Updates the objects in the API for scheduled messages so that those
for stream messages return the `to` property as an integer since it
is always the unique stream ID and so that those for direct messages
do not have a `topic` property since direct messages never have a
topic.
Also makes small update so that web app scheduled messages overlay
has the correct stream ID.
Previously, in the dark theme, the `background-color: #18222f` of the
`.popover` class took precedence over the
`background-color: hsla(0,0%,0%,.7)` of the `.message-info-popover`
and `.user-info-popover` classes. This commit fixes this issue by
adding !important to the background-color property of
`.message-info-popover, .user-info-popover` classes.
This is a more natural place for this extra padding than below the
navbar. Padding below navbar was primarily needed to hide the
message content above the sticky header while scrolling the message feed.
We are still able to do with this change without partially hiding the
loading message indicator.
Fixes#25159
This fixes the bug where the schedule message whole row was not clickable
and had some padding issues. By adding same styles as all other rows in
left sidebar we eliminate those bugs.
This replaces the previous dark border.
A pure white border looked a little too garish, so this dials back the
alpha channel just a bit.
Fixes: #25303.
This uses eyeballed vertical padding on the nested .zulip-icon class
to ensure that the entire send-later button area is clickable (and
not merely hoverable).
Since, we didn't update `user_settings.color_scheme` for spectators
and our recipient bar color calculations were based on it, this
resulted in a wrong recipient bar color if the OS default color
scheme of the user was different from `spectator-theme-preference`
set by the user using the gear menu.
To reproduce the bug:
* Set preferred color scheme to `dark` in your OS settings / Chrome
dev tools.
* Login as spectator in Incognito.
* Switch to light theme.
You will see dark background colors in recipient bars.
Added modern tippy tootip for view_user_card tooltip by adding a
<template> with id=view-user-card-tooltip-template for the element.
Fixes part of #24311.
Added tippy tooltips for search_open, search_close icon and
search_query input field with hotkey hint `/' by adding a class
`.tippy-zulip-delayed-tooltip` which adds tooltip with
LONG_HOVER_DELAY and default placement top with fallback placement
equal to bottom.
Added tippy tooltip with text `Close` on `.search_close_button`.
Fixes part of #24311
Added tippy tootip for '.message_expander' and
'.messsage_condenser' by adding '.tippy-zulip-delayed-tooltip' class,
and creating 2 <template> with id equal to crresponding
data-tooltip-template-id of the elements.
Fixes part of #24311
Added tippy tooltips for create_stream_plus_button and
preview-stream-button in manage stream settings by adding
class `.tippy-zulip-delayed-tooltip` which add tooltips
with LONG_HOVER_DELAY. Added data-tippy-placement="bottom"
to match with 'Archive stream' tooltip.
Created a new tooltip for sub_unsub_button in tippyjs with
class .toggle-subscription-tooltip that has
EXTRA_LONG_HOVER_DELAY, placement equals to bottom
and appended to body.
Fixes part of #24311.
Added new tippy tooltips configuration with target class
`.tippy-zulip-delayed-tooltip` which add tooltips with
`delay: LONG_HOVER_DELAY`, appended to body, and have a
default placement top with fallback placement equal to bottom.
Fixes part of #24311
By default, tippyjs uses a trigger value of 'mouseenter focus',
which means that the tooltips can appear either when the element
is hovered over or when it receives focus (e.g., by being clicked).
Because of this, if you click on the button to open the popover,
the tooltip also appears. To prevent this behavior, we need to
remove the 'focus' trigger from the buttons so that the tooltips
don't appear when the buttons are clicked.
Fixes: #25277