This uses the banner message's line-height to set a
max-height on the action and cancel buttons to maintain
a consistent vertical spacing.
Additional uses of flexbox here:
1. help the button to remain shorter when it's adjacent a
single-line banner message, and
2. center the closing X icon relative to the current size
of the action button, when one is present
This also styles those inner .banner_message elements to lose
margin inherited from Bootstrap. (This is now also applied to
the upload-message banner.)
It's better to achieve that with a class selector; using a `p`
element selector would mean that such a style would be evaluated
for all `<p>` elements in the DOM. Which is of course a whole lot,
thanks to Markdown alone.
Fixes: #26922
`popover-content` class had no effect on emoji popover since
it was resetting `padding: 0` and background color was
already applied by tippy theme.
In short, removing `popover-content` had no visual changes.
Remove bootstrap-tooltip class `popover-title` from code.
It was only used in user_card_popover for showing user avatar,
so cleaned up properties that were duplicated or not required.
We use "modal-footer" class in stream and user group creation form
and this commit adds bootstrap CSS rules for it to subscriptions.css
so that we can remove the CSS from bootstrap.css.
This commit updates the 'get_server_history' function to return
early if a request is already in progress for a given stream_id,
thus preventing concurrent requests for a single stream_id.
We maintain a set 'request_pending_stream_ids', which contains all
the stream IDs for whom requests are in progress.
Using this set, we return early.
Fixes#26915.
This fixes the bug where on pressing enter after the last line in a
textarea, the cursor would go to the new line but the textarea would
not scroll it into view unless more was typed. This was observed on
chromium browsers.
A new function `insert_and_scroll_into_view` is added to `compose_ui.js`
which blurs and refocuses the textarea after inserting the content, then
autosizes the textarea.
topic_zoom.is_zoomed_in() can’t be true in pm_list.zoom_in, because
“more conversations” would not be visible in that state. And it can’t
be true when pm_list.handle_narrow_activated calls pm_list.expand,
because “more topics” would not be visible in an all-DM view. So the
only non-inert call is via click_handlers; move it there.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The function considers @**all**, @**everyone**, @**stream**,
and @**topic** as wildcard mentions.
Earlier, the function didn't have a check to match @**topic**
in the message_content.
There were 2 issues:
* Wrong format for creating new Map object used.
* Use of `topic_dict` instead of `topics_dict`, which resulted
in `stream_key` being present in `topics_dict` even after stream
has been marked as read. This made inbox believe that the
stream was already rendered even though it was not.
Up until now, we unconditionally saved any message content as a draft
whenever the composebox was `start`ed. This led to a lot of unnecessary
saving of drafts even when the composebox stayed undisturbed.
To fix this, now we only save the draft when the compose state is about
to be overidden, which is by either changing the recipient narrow or by
restoring another draft.
Fixes: #26976.
In #23900, the floating recipient bar was replaced with a sticky
recipient bar. The logic in `id_for_recipient_row` was not updated
for that change, so we update that function to just get the first
message in the group and return that message ID.
Since is_visible was refactored to use a variable, these mocks
are not required.
Also, since is_visible return `false` by default, mocking it
to return false is not required.
Fixes#26962
We sort topic and dm data by latest_msg_id and render them.
For updates, we remove rows which for which latest_msg_id was
changed and them insert them again at the correct index.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.
We still leave a renamed version for use by the inbox/recent views.
It did the same thing as handle_narrow_activated when passed the
home_msg_list filter.
We still leave a renamed version for use by the inbox/recent views.
This does not results in any behavioral or UI change, we just
use portico_modals module to open and close the modal instead
of directly calling functions like Micromodal.open and
Micromodal.close. This change also solves a bug where the
modal was not closed previously on clicking anywhere outside
the modal.
We used "btn-success" class only in user profile modal subscribe
widget and the CSS rules applied by bootstrap on this class were
overridden by other CSS. We also remove the btn-success class
since this is a bootstrap-specific class and we no longer
need it.
We used "btn-primary" class only in integrations dev panel page
and this commit re-adds the CSS applied by this class in
integrations_dev_panel.css. We also remove the btn-primary class
since this is a bootstrap-specific class and we no longer
need it.
We now use micromodal in the modal on dev server emails page to
make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
We now use micromodal in the license update modal on billing page
to make it consistent with other modals in the app and this is
preparatory work for moving away from bootstrap as well.
This commit adds portico_modals.ts module which contains functions
for supporting modals in portico pages. The new module basically
contains code from functions in overlays.ts without the code
that is not needed currently for modals in portico pages.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.
The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.
Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".
Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".
Fixes#25914.
We remove redundant code when editing a scheduled message in the compose
box, for resetting the compose box, as it anyway gets reset on calling
`compose_actions.start()`.
Besides ending `scheduled_messages_ui.js`'s dependency on `compose.js`
and `compose_ui.js`, this also fixes the bug where on editing a
scheduled message when there was content in the compose box, it would be
irretrievably lost. The old content is now drafted.
This commit consists of the following visual changes:
- Add the hotkey hints in the tooltip of the view edit history option,
the shortcut (Shift + H) for which was added in PR #26245
- Swap "Click to view edit history." and the edit status string
(EDITED/MOVED/SAVING) to make the tooltip consistent with other
tooltips across the web app.
- Rename "Click to view edit history." to "View edit history", since
the "Click to view" part is evident from the icon as well as the the
keyboard shortcut hints.
Fixes#26581.
By replacing `<span>` tags with `<div>` tags inside the tooltip's inner
content we remove the redundancy of having to use break tags to
separate the tooltip's title and it's content.
We also replace any `<p>` tags with `<div>` tags for the following
reasons:
- Since what we want to achieve are just block elements in order to
avoid the break tags, using `<div>` tags provide use with a wider
scope of use cases.
- We don't want the pause, screen readers often introduce after reading
the contents of a paragraph.
- The `<p>` tag cannot contain tables and other block-level elements.
- The semantic meaning of the <p> tag doesn't apply to the commonly
used tooltip content.
Commit 57340a888c (#19003) separated it
from the variable it was commenting, and commit
8ced075643 (#22754) changed that to a
different variable, so I infer that nobody thought this documentation
was important.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Earlier when a user is deactivated or reactivated from users
table and deactivated_users table the `Role` column was modified.
This commit changes this and now `Role` column is not modified
instead now the corresponding row is greyed out.
Fixes#21653.
Earlier tooltip shown on hovering to activate and deactivate user
button in users and deactivated_users table does not live update
when user is deactivated or reactivated.
This commit makes changes to do the live update.
This commit removes the `Reactivate` and `Deactivate` title on hovering
to activate and deactivate button in users and deactivated_users table.
This was done as we already show tippy tooltip on hover.
Read receipts can either hide by clicking or pressing escape
button. Since clicking already hides popovers and escape keypress
call `popovers.hide_all` separately, we don't need to call
it again.