Commit Graph

8892 Commits

Author SHA1 Message Date
Tim Abbott
85835fae9b stream_list: Rename confusing on_stream_click. 2025-07-16 12:35:14 -07:00
Sahil Batra
2294552080 left-sidebar: Fix clicking on stream row in left sidebar.
Clicking on the stream row should open the message view
as per "Channel links in the left sidebar go to" setting.

But this happens only when clicking on stream name element
and not on the complete stream row, like clicking on the
privacy icon or towards the left of it, opens the channel
feed always irrespective of the setting. This commit
fixes that.

Updated the code to attach the "New topic" button handler
to "#stream_filters" element instead of "body", as it was
not being executed due to stopPropagation being called in
the click handler for "a" element for stream row.

Attaching the event to "#stream_filters" makes sure that
clicking on "New topic" button calls the handler for it
first and stops event from being propagated to the "a"
element for stream row.

Also moved "New topic" handler to stream_list.ts, as it
would be easy to maintain them if all handlers for the
UI are in the same file.

This also fixes the bug when pressing "Enter" key after
clicking on a stream row did not open the compose box for
replying to the selected message which is the expected
behavior when "Channel links in the left sidebar go to"
setting is set to value other than "List of topics".
2025-07-16 12:35:14 -07:00
Shubham Padia
e0abc5253b help-beta: Adjust kbd tags if the user is using a mac style keyboard.
Fixes #31287.
These tags are not limited to just KeyboardTip, so we want to run the
transformation on all html.
We need to run the transformation client-side since the user's keyboard
style is only known at that time.
We had to override the HEAD component since that's what starlight
recommends to do if we want to include local assets on every page. If we
were using a remote js file, we could have modified the head config
option provided by starlight.
The script file to adjust the tags is mostly just copy-paste of the
original function to adjust for the lack of JQuery. Most of the comments
are also copy-pasted.
One change in the new script is to just use ⌘ symbol directly instead of
using zulip-icon since we don't have any centering problems in the new
help center.
2025-07-16 12:00:45 -07:00
Tim Abbott
e9951e9d9a compose_validate: Return early in inform_if_topic_is_moved.
This also ends up consistently calling clear_topic_moved_info for all
code paths where we exit the function without adding a banner. It
might be better to just call that clear function at the start; I'm not
entirely sure why we don't do that.
2025-07-16 11:39:14 -07:00
Vector73
fa7a4a953d compose_validate: Don't show topic moved banner on topic resolve.
The topic moved compose warning banner should not shown when
the topic in compose recipient box is only resolved or unresolved.

Fixes #35082.
2025-07-16 11:39:14 -07:00
whilstsomebody
640286b91f admin_human_form: Update classes to kebab-case.
This commit updates the classes `.deactivate_user_button`
and `.reactivate_user_button` to kebab-case as per our
new rules for writing new classes.
2025-07-16 11:16:10 -07:00
whilstsomebody
6649efea70 settings_user_list_row: Remove redundant classes.
This commit Removes `deactivate-user-button` and
`reactivate-user-button` classes.

These classes were originally introduced in commits
50582b72b6 and
c0b3fb1bbe for the sole
purpose of styling. The associated styles were later removed
in 1c89c3e647 but the classes
themselves were mistakenly left behind.

Removing them has no effect in the functionality of the
buttons and there is no evidence of any bugs or regression
caused by their removal.
2025-07-16 11:16:10 -07:00
Vector73
7895873dc1 pill_container: Fix background color in dark theme. 2025-07-16 10:21:31 -07:00
Vector73
f46da0eafb typeahead: Skip topic suggestions for empty-topic-only channels.
When inserting a channel link in the compose box, the topic typeahead
is now not shown for channels that allow only empty topics. This
ensures a direct link to the channel is inserted.
2025-07-16 09:21:31 -07:00
Evy Kassirer
5a23287cf5 peer_data: Stop returning unused boolean from remove_subscriber. 2025-07-15 17:38:02 -07:00
Tim Abbott
428efeb1a4 topic_list: Only match is: queries in typeahead.
The previous behavior for this component was too annoying if you were
just trying to do a normal filter.

There's definitely more to clean up here; the search_pill.ts usage is
problematic.
2025-07-15 17:09:11 -07:00
Tim Abbott
24113b5dd5 topic_list: Rewrite typeahead using an item type.
This makes it a lot easier to control the matching and display
separately.
2025-07-15 17:09:11 -07:00
Kislay Verma
a21afe2d60 message_list_hover: Fix glitch when hovering over a message.
If we hover over a message, we see the message move button
(provided the settings allow so). But if the move deadline is
passed while we're hovering, we still see the move button,
when it should be hidden.

This commit fixes this by updating the move button
visibility when the move deadline is passed.

Fixes #15810.
2025-07-15 13:11:24 -07:00
Kislay Verma
14a115224a message_list_hover: Fix glitch when hovering over a message.
If we hover over a message, we see the message edit button
(provided the settings allow so). But if the edit deadline is
passed while we're hovering, we still see the edit button,
when it should be hidden.

This commit fixes this by updating the edit button
visibility when the edit deadline is passed.

Fixes #15810.
2025-07-15 13:11:24 -07:00
Kislay Verma
de4139a219 message_list_popover: Refactor message_hover.
This commit removes the `args` variable which serves no useful purpose.
The JQuery logic is extracted into a separate function which will later be
used inside timeouts. This is done as a prep to #15810.
2025-07-15 13:11:24 -07:00
Sahil Batra
7b66eb838e groups-ui: Update error shown when group cannot be deactivated.
This commit updates error banner shown when group is only used
as subgroups and not as permission.

If group is used as a permission, then we mention that in the
error banner and have a button to go to "Permissions" panel.
We show the same banner even when group is used as a subgroup
as well. But when group is only used as subgroups, we just
show a message containing names of all the supergroups.
2025-07-15 11:57:42 -07:00
opmkumar
b5fc39044e left_sidebar: Fix unread counts showing for muted channels.
Previously, unmuted unread counts for muted channels were still shown
in the left sidebar even when the "Show unread counts for" setting was
set to "No channels".

This commit ensures that unread counts are correctly hidden for muted
channels based on user settings.
2025-07-15 11:38:13 -07:00
Vector73
f9e41915c3 pill_container: Fix background-color in dark theme. 2025-07-15 11:12:50 -07:00
opmkumar
722a2cce9d filter: Update title for spectators when using channels:public filter. 2025-07-15 10:48:39 -07:00
Vector73
4e93607fde tooltip: Show only empty topic allowed tooltip on the topic text.
This commit shows "Only general chat allowed in this channel" tooltip
close to the topic text instead of in the center of topic input by updating
the topic input box "max-width" to "fit-content".
2025-07-15 10:10:02 -07:00
apoorvapendse
b8a1a224d5 copy_messages: Prevent blueslip error while copying overlay message header.
Fixes: https://github.com/zulip/zulip/pull/35097#issuecomment-3058834909
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-15 09:22:54 -07:00
Pratik Chanda
421b6e9787 hotkey: Add topic filter focus check in is_in_focus.
This commit adds a topic filter focus check inside `is_in_focus`
which prevents shifting focus from topic filter input to topic list
when typing.
2025-07-15 09:13:57 -07:00
Sayam Samal
7a26c41c42 inputs: Remove JS logic to determine empty/non-empty input fields.
This commit removes the JavaScript logic that was used to determine
whether an input field was empty or non-empty. The CSS pseudo-classes
and selectors seem robust enough to handle the styling based on the
input state without needing additional JS logic at the moment, and
removing this JS logic simplifies the codebase and prevents potential
conflicts with the CSS styles.
2025-07-14 13:58:02 -07:00
Sayam Samal
4341453568 left_sidebar: Improve logic to detect empty filter input with pills.
This commit refines the logic for determining when the filter input with
pills is empty. The JS logic is removed from web/src/topic_list.ts,
as this new logic is now handled in the CSS, common across all filter
inputs with pills — resulting in a consistent and predictable behavior
for empty states on all the new filter inputs.
2025-07-14 13:58:02 -07:00
Sayam Samal
ac27299cc9 left_sidebar: Fix filter input alignment with common left sidebar grid.
This commit adjusts the left and right padding of the input element in
the filter topics input to account for the left and right borders.
This ensures that the text inside the input is aligned with the text in
other elements of the left sidebar grid.
2025-07-14 13:58:02 -07:00
Sayam Samal
c90190bcdb left_sidebar: Make icon column width scale with font size. 2025-07-14 13:58:02 -07:00
Sayam Samal
8b236e6f29 left_sidebar: Stretch filter inputs to fill available space on right. 2025-07-14 13:58:02 -07:00
Sayam Samal
5e92a57adb inputs: Fix input color values deviating from the design.
This follow-up commit fixes the incorrect input color values that were
introduced in the initial commit. This change is most visible in the
'hover' state where the values were incorrectly set to the same values
as that of the normal state, leading to a lack of visual distinction.
2025-07-14 13:58:02 -07:00
Sayam Samal
f3fc26c6ff left_sidebar: Standardize topic list filter input.
This follow-up commit replaces the current left sidebar topic list
filter input implementation with the redesigned input_wrapper
component.

This commit also serves as the base for supporting inputs using the
search_pill_widget, and thus adjusts the previously defined logic at
certain places to ensure that the input pills are handled and
displayed accurately.

Fixes part of #34476.
2025-07-14 13:58:02 -07:00
Sayam Samal
a4dd8e515d input_pill: Move input pill styles to app_variables.css.
This prep commit consolidates the input pill styles into
`app_variables.css` and uses the light-dark notation for the color
variables to avoid specificity issues that arose from `dark_theme.css`.
2025-07-14 13:58:02 -07:00
Sayam Samal
f4ec5f9741 topic_list: Fix and improve selectors related to the topic list filter. 2025-07-14 13:58:02 -07:00
Sayam Samal
1c58dcddfa compose: Fix buggy tooltip hotkey hint placement in compose send button.
This commit eliminates a bug, introduced in commit
7bc04bb829, where the send button's
tooltip hotkey hint would have incorrect placement when the user had
triggered a tippy instance on the send button while it was disabled.

The reason behind this bug was the conflict between code in the
previously mentioned commit which set the tooltip content to
`display: block` to account for the inline italicized empty topic name
in the error message, and the need for `display: flex` to ensure the
hotkey hint was positioned correctly.
2025-07-14 11:36:19 -07:00
Vector73
3fecbe41c5 compose_recipient: Fix fade when narrowing to empty topic only channel.
Previously, narrowing to empty topic only channel keeps message list
faded even if the compose recipient to set to that channel. This commit
fixes this bug.
2025-07-11 16:00:11 -07:00
Vector73
741b38ecfa sidebar: Show "New message" tooltip for empty topic only channel.
Show "New message" tooltip for empty topic only channel instead
of "New topic" in left channel sidebar row.
2025-07-11 16:00:11 -07:00
Karl Stolley
77cd886e24 settings_overlay: Remove the settings-section show class on close. 2025-07-11 15:50:12 -07:00
Pratik Chanda
de18ff348c search_suggestion: Omit operand in pill for autocomplete suggestion.
Currently, topic autocomplete suggestion adds a `general chat` operand
value to the pill in suggestion dropdown description.

This is correct if we've already picked a topic operator and have ""
as the current suggested topic value, but is wrong for the state where
we haven't yet.
2025-07-11 14:00:07 -07:00
Pratik Chanda
1c86238f4f search_suggestion: Change description_html for channel op suggestion.
Currently we suggest same description_html for channel operator
suggestion and channel operator,operand suggestion. When we
don't suggest any channel name for channel operator we should show
different description_html.

This commit corrects this behaviour.
2025-07-11 14:00:07 -07:00
Pratik Chanda
a12a6905c4 css: Remove extra column space for pills in suggestion.
This commit removes extra column space added to pills in suggestion
which is normally there for exit button. We don't have exit buttons
in suggestions so we remove this.
2025-07-11 14:00:07 -07:00
Rohan Gudimetla
26abfc4d91 markdown: Render inline audio files using the ![title](url) syntax.
Previouly, there was no option to play the inline audio files
within the web app without downloading or leaving the browser.

This commit adds option to render inline audio files that use
the syntax `![title](url)`.

Fixes #27007
2025-07-11 13:11:56 -07:00
Tim Abbott
cdeb7f137f compose_state: Strip leading newlines to match server.
This fixes a bug where if you send a message with leading newlines,
you can't edit it until you've reloaded the browser.
2025-07-11 13:06:32 -07:00
Vector73
babf54d2f6 stream_popover: Rename update_topic_input_placeholder_visibility.
Renames `update_topic_input_placeholder_visibility` to
`update_topic_input_placeholder` as it seems more appropriate after
refactoring.
2025-07-11 12:35:05 -07:00
Vector73
49a516a3db stream_popover: Refactor updation of topic input placeholder. 2025-07-11 12:35:05 -07:00
Sahil Batra
e633ba5c71 settings-ui: Align items to center in stream and group rows.
This commit updates CSS to use flex layout to correctly
align items in stream and group rows to center and avoid
using top margins.
2025-07-11 12:33:45 -07:00
Sahil Batra
e79218692f settings-ui: Use relative sizes for stream and group rows.
This commit updates CSS to use relative width and height of
icons, margins and paddings for stream and group rows in
left panel.
2025-07-11 12:33:45 -07:00
Vector73
71342169ff stream_settings: Update organization default dropdown labels.
Updates labels for organization default options in "topics policy"
and "message retention policy" channel settings.

Fixes #35212.
2025-07-11 12:31:03 -07:00
whilstsomebody
bbc842484f modal: Add options for marking messages as read.
We have updated our read messages confirmation modal
to now offer three options for marking messages as read:

- Muted topic messages
- Messages from topics I don't follow
- All unread messages

Additionally, the modal now displays the count of unread
messages for the selected option.

Fixes: #30025.
2025-07-10 17:57:25 -07:00
Lauryn Menard
924c5409f9 channel-permissions: Fix URL for help center article.
This was missed when adding the redirect years ago.
2025-07-10 17:53:56 -07:00
Maneesh Shukla
0eea85446b tooltips: Group tooltips for a smooth transition.
This commit introduces the use of createSingleton from the Tippy.js
library to group the tooltips of compose box formatting buttons. The
main benefit is that the hover delay only applies when you move the
cursor into the group for the first time — after that, tooltips show up
instantly as you move between buttons. It makes the whole experience
feel a lot smoother.

We store the singleton instance in a variable to avoid creating multiple
instances unnecessarily. Before initializing a new singleton, we destroy
the previous one to prevent memory leaks and ensure correct behavior.

Previously, each formatting button had its own independent tooltip with
separate delays, which made the experience feel sluggish and disjointed
when hovering across buttons.

Now, by sharing a delay timer across the grouped tooltips, the
transition feels more natural.

Fixes: #24825.

Co-authored-by: Sayam Samal <sayam@zulip.com>
2025-07-10 17:20:41 -07:00
Maneesh Shukla
48d2ee2684 compose-buttons: Add compose_button_tooltip class to all the control buttons.
This is a prep commit to add singleton tooltips to all the
compose control buttons.

Fixes part of #24825.
2025-07-10 17:06:02 -07:00
Pratik Chanda
83d67ddb6a settings: Remove unreachable click handler for settings.
This commit removes click handler for settings overlay container
for closing modals over settings which was added for earlier modal
version. Current modal doesn't use this handler to close modal.
2025-07-10 17:03:17 -07:00