Commit Graph

8031 Commits

Author SHA1 Message Date
Jitendra Kumar
cd97468587 message_list: Update trailing bookend on empty channel or topic.
Show `You are not subscribed to  #xyz. Subscribe` bookend
on channel or topic which are not subscribed and have no messages.

Fixes: #33209
(cherry picked from commit 4696c8eb67)
2025-03-27 21:53:31 -07:00
Aman Agrawal
5458a2ca2f message_list: Fix just_unsubscribed for empty views.
This fixes a bug where wrong bookend is shown in empty views in
the next commit.

(cherry picked from commit afbc6f2510)
2025-03-27 21:53:31 -07:00
userAdityaa
19dd4f67ce search_pill: Aligned the user emoji with the search text.
This commit ensures that the user emoji in the search pill
is correctly aligned with the search text. The issue was
caused by improper line height, leading to the emoji being
slightly cut off at the top. Adjusting the `line-height`
of `.pill-value` resolves this, providing a consistent
and visually balanced appearance.

(cherry picked from commit 1b260c9fd7)
2025-03-27 21:53:31 -07:00
Evy Kassirer
39e43838c3 buddy_list: Make sure we always open Others section during search.
(cherry picked from commit 70e542c9cc)
2025-03-27 21:53:31 -07:00
Lauryn Menard
5f0844d7fb compose-actions: Set topic earlier if specified in start opts.
When on_compose_select_recipient_update is called when we start
the compose box actions, then it subsequently calls
compose_recipient.update_on_recipient_change.

If there is a specified topic in the opts for the compose box,
then that should be set for various functions that are called
in update_on_recipient_change.

compose_recipient.update_topic_displayed_text is called later for
all cases, direct messages and empty topics, which will update the
compose_state.topic again.

(cherry picked from commit d7873fbc11)
2025-03-27 21:53:31 -07:00
Lauryn Menard
a7bc77aaa0 narrow-state: Filter out "with" operator in narrowed_by_topic_reply.
As the web app is now using the "with" operator for links to channel
topic conversations, we need to filter out that operator when
checking the current narrow state.

(cherry picked from commit 24a65c1783)
2025-03-27 21:53:31 -07:00
Lauryn Menard
2e6eeabac6 typing-events: Use valid channel ID to get conversation typists.
(cherry picked from commit ae66bf287b)
2025-03-27 21:53:31 -07:00
Kartikay5849
558ed44d4b compose: Prevent duplicate group mention warning banners.
We now use `data-user-group-id` to check if a banner for the same
group already exists, preventing duplicate warnings when the same
group is mentioned multiple times.

(cherry picked from commit 35289dfe51)
2025-03-27 16:53:35 -07:00
apoorvapendse
7efac715a8 user_groups: Persist settings view while switching tabs.
Fixes: #33437.
(cherry picked from commit 753b4e31b9)
2025-03-27 16:53:35 -07:00
whilstsomebody
735a604d8b widgets: Remove white background from "Add task"/"Add option" button.
In dark theme, when clicking the "Add task" button of
todo and "Add option" button of poll, the background
color incorrectly turns white.

This commit removes the white background color of the
buttons and makes it consistent woth the other green
buttons.

(cherry picked from commit eef44429e2)
2025-03-27 16:53:35 -07:00
Saubhagya Patel
10e0405220 message_move: Show "general chat" in link of confirmation toast.
When a message is moved using the "Move only this message" option
a confirmation toast is shown. This commit adds support to show
"general chat" in link of the toast when a message is moved to it.

(cherry picked from commit 939691dfed)
2025-03-27 16:53:35 -07:00
Prakhar Pratyush
6396dc5cad recipient_row: Fix empty string topic display in keyword search view.
Searching for a word that appears in a message in a empty string
topic via the search box resulted in a message view where the
topic names in the recipient_row were empty string instead of
`realm_empty_topic_display_name`.

This commit fixes that bug.

(cherry picked from commit 8383b11526)
2025-03-27 16:53:35 -07:00
evykassirer
b5c5853027 drafts: Fix bug opening drafts in 'general chat'.
This was likely a longstanding issue that wasn't
caught because we required topics on CZO. The new
logic ensures topic match even for empty string
(general chat) topics.

(cherry picked from commit 8a51fa4b83)
2025-03-27 16:53:35 -07:00
Prakhar Pratyush
dfa6f67ea8 inline_topic_edit: Fix inline topic edit input field width for topic="".
Earlier, for topic="" and mandatory_topics=False, the inline topic
edit input field width was not set correctly when the inline topic
edit was started for the first time.

This resulted in overflowing placeholder.

This commit fixes that bug.

(cherry picked from commit b53327dabe)
2025-03-27 16:53:35 -07:00
Karl Stolley
c9ffd17d2d home_views: Let Recents/Inbox view filter fit content.
(cherry picked from commit 55ea5be022)
2025-03-27 16:53:35 -07:00
Aman Agrawal
f1461c5334 message_view: Only show just to unread banner in conversation views.
Showing this banner in every view can be annoying. As a first step,
we only show it in conversation view to reduce the banner spam.

(cherry picked from commit 6c81ff61ee)
2025-03-27 16:53:35 -07:00
Aman Agrawal
03ecbd6654 channel_settings: Fix channel name incorrect hidden.
`max-width` was not working correctly here. Removing it gets
us in good state.

(cherry picked from commit 5ad100afef)
2025-03-27 16:53:35 -07:00
Lauryn Menard
44fdbe5f04 compose-closed-ui: Refactor get_recipient_label.
Refactors get_recipient_label so that it's a bit clearer what the
recipient_information parameter is for and what we do when that
parameter is undefined.

In doing so, we no longer treat the constructed objects, that are
passed as the recipient_information parameter, and actual Message
objects, that we get from the current message list view, as the
same thing.

(cherry picked from commit 7d3b77e490)
2025-03-27 16:53:35 -07:00
Lauryn Menard
9080684585 compose-closed-ui: Fix inbox and recent views not updating button.
Both the inbox and recent conversation views pass information about
the reply recipient to this function's caller so that the button
text can be updated for the focused row.

Therefore, the check for an undefined current message list should
be inside the case where the recipient information parameter is
undefined.

This was changed in f630272b4c when non-message list views set
undefined for the current message list.

(cherry picked from commit 4f163e5ad2)
2025-03-27 16:53:35 -07:00
Lauryn Menard
2efef3a0e6 compose-closed-ui: Clarify object and type for reply to button.
Renames ComposeClosedMessage to ReplyRecipientInformation, and
exports the type from compose_closed_ui.ts so that the functions
that construct these objects from the recent conversations and
inbox views have the type available.

Also, renames the variables for these objects to not be "message",
so that it's clear that these are not Message objects.

(cherry picked from commit b48134a03e)
2025-03-27 16:53:35 -07:00
Lauryn Menard
1345944688 compose-closed-ui: Rename update_reply_recipient_label.
Renames update_reply_recipient_label to
update_recipient_text_for_reply_button.

This better matches the function that sets the default text for
the closed compose box button: set_standard_text_for_reply_button.

(cherry picked from commit 94fe5fc173)
2025-03-27 16:53:35 -07:00
Aman Agrawal
2dd46fe522 compose_validate: Make validate single source for error messages.
Instead of relying on different functions to get error messages,
we use `validate` to get the error message for the current compose
state.

This fixes a bug where compose tooltip was not defined when
compose state was not valid.

(cherry picked from commit 01c5197dd9)
2025-03-27 16:53:35 -07:00
Aman Agrawal
698c827693 compose_validate: Extract banner text to be re-used.
(cherry picked from commit 0463f3ab1e)
2025-03-27 16:53:35 -07:00
Aman Agrawal
319e6de495 compose_validate: Don't mix validation states for compose and edit msg.
`message_too_long` is only used to track state for compose box
and not message edit.

(cherry picked from commit 8a9363c6b7)
2025-03-27 16:53:35 -07:00
Aman Agrawal
fa0da5e9ab compose: Reduce repeated no posting policy message to couple places.
(cherry picked from commit 9ce4cead44)
2025-03-27 16:53:35 -07:00
Aman Agrawal
b047bf4d44 compose: Remove old style compose send disable.
We now use `disabled-message-send-controls` class to control
the disabled status of send button. So, this is not required.

(cherry picked from commit ad0b616bbd)
2025-03-27 16:53:35 -07:00
Sayam Samal
260c56ab0c banners: Fix banner action buttons vertical alignment.
(cherry picked from commit 5f0a55544b)
2025-03-27 16:53:35 -07:00
Sayam Samal
b7919e1957 banners: Update banner layout.
This is follow-up commit for d00b4cb0bd,
which updates the padding of the banner label and banner close button
to accommodate the previous font size change.

(cherry picked from commit 836e04fac8)
2025-03-27 16:53:35 -07:00
Sayam Samal
26c983d717 banners: Improve banner scaling with font size.
This commit converts the pixel values to em instead to make the banner
scale better with the different font sizes.

(cherry picked from commit bf88426cd1)
2025-03-27 16:53:35 -07:00
Evy Kassirer
c1a00e7308 stream_settings: Move muted channels help text to below header.
(cherry picked from commit 8adb46867b)
2025-03-27 16:53:35 -07:00
Karl Stolley
c2fc886a8a left_sidebar: Avoid misaligned unreads on Safari.
(cherry picked from commit 852b957da8)
2025-03-27 16:53:35 -07:00
Aman Agrawal
c2484b01de stream_settings: Fix action items overflowing to next container.
`+` icon was overflowing the right pane on 18px font size.

(cherry picked from commit fde6278e34)
2025-03-26 10:55:07 -07:00
Aman Agrawal
a42d31bcb2 subscriptions: Fix wrapping of channel name above 18px font size.
We limit the width of the channel title and show ellipsis for
overflowing channel name.

(cherry picked from commit c7364fafe5)
2025-03-26 10:55:07 -07:00
Aman Agrawal
e3d4677ac5 stream_settings: Fix incorrect use of translated strings in conditions.
Since the strings like "Subscribed" will be translated to other
languages, they will not work correctly when compared with
these values in other languages.

Fixed by using data values that are not translated.

(cherry picked from commit 3429898dbf)
2025-03-26 10:55:07 -07:00
Aman Agrawal
f12d72d711 stream_list_sort: Fix user setting for demote inactive stream ignored.
We were not using `filter_out_inactives` and `pin_to_top` when
sorting stream in the left sidebar.

These were incorrectly removed in
1aee0ef98b.

Restored the original function and the places where it was used
to bring back original functionality.

(cherry picked from commit 67ff430e45)
2025-03-26 10:55:07 -07:00
Aman Agrawal
30e52c90e5 stream_list_sort: Remove unused function.
This function was introduced in c1b5021d84
but was never used.

(cherry picked from commit 87864992a8)
2025-03-26 10:55:07 -07:00
Aman Agrawal
b78307d559 stream_list: Set filter_out_inactives before rendering.
When initializing the app or re-rendering left sidebar to update
the `demote_inactive_streams` property, we need to update
`filter_out_inactives` property first.

(cherry picked from commit 737acb1cb1)
2025-03-26 10:55:07 -07:00
Tim Abbott
8403619be9 settings: Refine logic to hide summarize topic setting.
The previous logic had it invisible always, even if the
server_can_summarize_topics was enabled.
2025-03-20 11:00:16 -07:00
Maneesh Shukla
4be0db08d9 notification_settings: Fix the misalignment of the topic notification header.
Co-authored-by: whilstsomebody <vishwakarmarambhawan572@gmail.comv>
2025-03-20 10:53:10 -07:00
Prakhar Pratyush
e95ee707a6 compose: Update topic input box when mandatory_topics setting changes.
Earlier, when `realm_mandatory_topics` setting was getting toggled,
the topic input box in composebox was not being live-updated to
align with the correspondning setting's UX.

This commit fixes that bug by making sure that placeholder and
other UI elements are updated accordingly.
2025-03-20 10:32:31 -07:00
Prakhar Pratyush
a54bd3cdfa compose_recipient: Avoid using .css() for visibility toggling.
This commit replaces direct `.css("visibility", "...")` calls
with `.addClass("visible")` and `.removeClass("visible")` to
manage the `$topic_not_mandatory_placeholder` visibility.

This improves maintainability by keeping styling in CSS.
2025-03-20 10:32:31 -07:00
Tim Abbott
bccc283554 Revert "compose: Fix buttons spilling from compose box."
This reverts commit 9243fa3d52.

This commit appears to have caused the same issue with the compose box
borders at other size/zoom configurations that may be more common.

We'll figure out a better fix and apply that.
2025-03-20 09:28:05 -07:00
Prakhar Pratyush
80b772795c compose: Echo messages sent to "(no topic)"/"general chat" to topic="".
Server treats messages sent to "(no topic) or "general chat"
topic as being sent to empty string topic.

Messages sent in web client to "(no topic)" and "general chat"
were locally echoed to those respective topics, resulting in
being narrowed to those topics.

Ideally, the messages should be echoed in the empty string topic.

This commit fixes that bug.
2025-03-19 11:39:28 -07:00
Karl Stolley
7be9ac9883 stream_settings: Better handle word breaks. 2025-03-19 11:35:11 -07:00
harshbansal8705
8402323cb5 stream_settings: Improve handling of long stream titles in UI.
This commit makes the following changes to improve the display of long
stream titles in the stream creation and user group settings UI:

- Uses `display: -webkit-box` and `line-clamp` properties to show the
title upto two lines, and end with `...` if it exceeds.
- Updates icon `font-size` to align with text size.
- Updates `margin` and `line-height` to make it visually better.
2025-03-19 11:35:11 -07:00
harshbansal8705
9243fa3d52 compose: Fix buttons spilling from compose box. 2025-03-19 11:32:51 -07:00
apoorvapendse
11028d5244 copy: Use a global copy event listener.
This attempts to use a global copy event listener instead of
triggering the copy handler on Ctrl+C, as this is more robust way to
use browser APIs, including not intefering if end users choose to
remap copying keys on their keyboard.

This has various beneficial side effects, including copying from other
Markdown elements like the preview or drafts UI using the same code as
copying from the message feed.

Fixes: #33949.
2025-03-19 10:07:32 -07:00
apoorvapendse
353f57e518 copy: Style KaTeX annotations to be included in copy HTML.
We've for a while been finding that copy/paste of LaTeX only worked if
we had a more JS-heavy copy handler that directly copies the HTML/text
using events, rather than just allowing the browser's native copying
logic to do its thing.

We've discovered the bug was that the `<annotation>` tag in MathML is
not rendered in some browsers which results in default copy behavior
of the browser breaking KaTeX copy-pasting and quoting by omitting the
`<annotation>` in the copied HTML as Chrome and possibly other
browsers select only what is visible.

From https://www.w3.org/TR/selection-api/

> Chrome 16 dev behaves as you'd expect given its Selection
implementation. It refuses to select anything that's not visible, so
it's almost always wrong. Opera 11.50 just does nothing in all my
tests, as usual.

This can be observed in the `paste_html` fixtures present in
https://github.com/zulip/zulip/pull/33993#issuecomment-2725417637.

We fix this by simply overriding the `display:none` property from the
<annotation> tag in the user agent stylesheet, which lets the browser
select and ultimately copy it which results in the annotation being
present in the `paste_html` and restore the working of KaTeX
quoting/copy-pasting.

This appears to have no visible impact, since browsers don't actually
have a way to display the annotations.
2025-03-19 10:07:32 -07:00
Aman Agrawal
8858f03847 compose: Revert send button color to that in 9.x.
This reverts commits 9501082e99 and 
a8cfd2fb04.
2025-03-19 09:00:49 -07:00
Karl Stolley
7f8899bf99 message_edit: Preserve width of Save button when showing spinner. 2025-03-18 13:15:10 -07:00