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>
This commit includes the message's sender id in the
'topic_participant_user_ids' set.
The 'participants_for_topic' function doesn't include the sender_id,
if the user is sending their first message in the topic, because
'participants_for_topic' queries the 'Message' table, but the message
is actually sent at a later stage in the codepath, resulting in
missing the sender_id in this case.
This is needed to set the 'wildcard_mentioned' flag for the sender's
user message in the case of topic wildcard mentions.
This doesn't lead to sending email and push notifications to the
sender because we have a check to skip notifications if the user
to receive notifications is the sender itself.
This should have been included in c0c30bc.
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.