Commit Graph

1795 Commits

Author SHA1 Message Date
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
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
opmkumar
722a2cce9d filter: Update title for spectators when using channels:public filter. 2025-07-15 10:48:39 -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
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
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
Vector73
a77fc6aa79 stream_settings: Add new disable_topics option to topics_policy.
Adds new configuration option `disable_topics` in `topics_policy`
channel setting to support disabling topics in the channel.

Fixes #34553.
2025-07-09 14:25:53 -07:00
Aman Agrawal
5cfe4829a9 compose_closed_ui: Fix incorrect tooltip for new conversation btn.
Fixed by removing the incorrect update for new conversation
button and correctly updating the reply button state.
2025-07-09 12:54:47 -07:00
Karl Stolley
ec46b117bb banners: Add utility class for uniform bold. 2025-07-09 12:50:25 -07:00
apoorvapendse
407b6f64c4 compose_paste: Paste as image for LibreOffice Calc content.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/bug.3A.20pasting.20cells.20from.20libreoffice.20calc.20is.20only.20image/near/2176558.

Co-authored-by: Puneeth Chaganti <punchagan@muse-amuse.in>
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-09 09:52:52 -07:00
opmkumar
8786b12f0c streams: Add can_resolve_topics_group setting.
Fixes #19955.
2025-07-08 16:53:43 -07:00
Evy Kassirer
0f4ba4fec1 search_suggestion: Remove unused is_people logic. 2025-07-08 10:02:34 -07:00
Evy Kassirer
86d8321cc0 search: Add custom description message for sender:me. 2025-07-08 10:02:34 -07:00
Evy Kassirer
404ad6c518 search: Update description string for mentions. 2025-07-08 10:02:34 -07:00
Evy Kassirer
f7af0f0879 search: Update description string for channel terms. 2025-07-08 10:02:34 -07:00
Evy Kassirer
c61943f002 search_suggestion: Show pills in search suggestions.
Fixes #34750.
2025-07-08 10:02:34 -07:00
Evy Kassirer
58f5f499fc search_pill: Rename non-user type to 'generic_operator'.
This change is meant to remove confusion between a pill's `type` being
"search" and its `operator` being "search".
2025-07-08 10:02:34 -07:00
Evy Kassirer
a35f166fac search: Use zrequire instead of mockesm for search_suggestion in tests.
Soon search_suggestion will be used more in unit tests.
2025-07-03 15:19:37 -07:00
Evy Kassirer
20722cea89 typeahead: Rename highlighter_html to item_html.
We no longer do any highlighting so it doesn't make sense to call
it that anymore.
2025-07-03 14:44:13 -07:00
Evy Kassirer
7e951b5249 search: Remove highlighting in search typeahead.
Context: https://chat.zulip.org/#narrow/channel/101-design/topic/search.20typeahead.20highlighting/near/2188093
2025-07-03 14:43:01 -07:00
Sayam Samal
7c19727168 left_sidebar: Standardize channel list filter input.
This follow-up commit replaces the current left sidebar channel list
filter input implementation with the redesigned input component.

Note: This commit removes `clear_search` method from `stream_list.ts`,
since the `.input-button` onclick handler over at `inputs.ts` handles
the clearing of the filter input fields by sending an empty text input
event. This input event triggers the filter update handler of the
module, in this case the `update_streams_for_search` function and
resets the filter list, eliminating the need for a separate per-module
input clearing/resetting workflow.

Fixes part of #34476.
2025-07-03 11:45:35 -07:00
Sayam Samal
f493303c2c right_sidebar: Standardize user list filter input.
This follow-up commit replaces the current right sidebar user list
filter input implementation with the redesigned input component.

Fixes part of #34476.
2025-07-03 11:45:35 -07:00
evykassirer
236e595438 settings: Use grid and flex for the two-pane settings overlay.
Instead of changing the height of the button subheader depending
on the width of the modal, which was fiddly and error prone, we now
let grid determine the height of the button subheader, and determine
the height of the body through javascript resize calculations.
2025-07-03 11:22:31 -07:00
Aman Agrawal
4a8d86f151 overlays: Add overlay to display scheduled reminders. 2025-07-02 13:02:45 -07:00
Tim Abbott
07c09083fb message_view: Fix whitespace in finicky node tests. 2025-07-02 11:39:38 -07:00
whilstsomebody
77cf174b1b empty_feed_notice: Show only query words for empty search results.
Previously, we included channel, topic, sender name and search
qeries (if present) in the empty feed banner.

With this commit, we will now not include channel, topic and sender
name and we only display the search queries when there are excluded
stop words.

Fixes: #34872
2025-07-02 11:27:33 -07:00
PieterCK
1e4b0bdfea filter: Rename supports_collapsing_recipients.
This renames the function to `contains_no_partial_conversations`. The
function initially was created to determine whether its appropriate to
collapse recipient/sender headings. Since then it has many other use
cases, so it's renamed to clearly describe what it does instead.
2025-07-01 16:14:56 -07:00
Maneesh Shukla
52b83f7b58 topic_list: Filter topics by resolved state in "more topics" view.
Fixes: #24200.
2025-07-01 14:02:57 -07:00
PieterCK
e59c5ce655 test_bot_data: Make test cases more accurate.
This removes the "service" field from the `test_bot` fixture, because it
is a default bot. In the `/bots` API endpoint, only service bots can
have their own service.

This is a prep commit for #34524, this cleans up the test cases related
to service bots so that it would keep things from getting confusing when
adding test for the changes to that PR.
2025-07-01 13:25:00 -07:00
Evy Kassirer
31fb0bd6d7 channel_folders: Let a new channel in a folder be created through a hash. 2025-06-27 17:09:08 -07:00
opmkumar
d3a7122b62 left_sidebar: Use personal settings to hide unread summary counts.
This commit adds code to use
`web_left_sidebar_unreads_count_summary` from personal
settings in web app.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>

Fixes part of #28759.
2025-06-27 13:50:18 -07:00
Prakhar Pratyush
8e1f0c4bcf topic_list: Fix "show all topics" flashing.
Earlier, 'all_topics_in_cache' used to return `false`
in the case where we were unsure if some topics were
present even before the user subscribed to the channel
and hence missing in the cache.

Returning `false` led to visible 'show all topics',
even if all the topics were already displayed. This was
helpful if the API call to fetch channel history failed,
as users had the option to make another request.

That resulted in a bug where "show all topics" was flashing
in channels with less number of topics. We used to display
"show all topics" initially and then hide it after the API
call confirmed that there were no new topics to display.

To fix this bug, we return `true`. So, the "show all topics"
is not displayed beforehand. We let the API call fetch the history
and rebuild the topic list based on the updated data.

Instead of show then hide. We now prefer, show if needed.

To fix the issue of API call failure and users having no option
to see all topics, we did prep work in the last commit
to add retry mechanism to the concerned API call.
2025-06-26 10:11:05 -07:00
Prakhar Pratyush
43249cb431 stream_topic_history_util: Add retry mechanism to get_server_history.
Earlier, in `get_server_history` the API call to fetch stream-topic
history didn't have a retry logic.

This commit adds a retry mechanism.

If the request to fetch stream topic history fails, we now retry
the request up to a fixed number of times before giving up.
This improves UX in case of temporary network issues.
2025-06-26 10:11:05 -07:00
Prakhar Pratyush
2bf13c36be test_stream_topic_history: Remove unused mock for people.ts.
This commit removes the unused mock for 'people.ts' in
'stream_topic_history.test.cjs'.
2025-06-26 10:11:05 -07:00
Vector73
b612351e48 stream_setting: Add setting for who can move messages out of channel.
Adds `can_move_messages_out_of_channel_group` channel-level
permission for who can move messages out of the channel.

Fixes #34243.
2025-06-24 16:52:53 -07:00
Vector73
703601a5d5 stream_setting: Add setting for who can move messages within channel.
Adds `can_move_messages_within_channel_group` channel-level
permission for who can move messages within the channel.
2025-06-24 16:52:53 -07:00
Vector73
43dcc6e3fd bug: Fix incorrect topic resolution check.
Previously, when sending messages to resolved topics, the warning
suggesting to resolve that topic used wrong check to verify if the
user is allowed to resolve the topic. This commit fixes that.
2025-06-24 16:52:53 -07:00
Evy Kassirer
ec65dad063 stream_pill: Fetch all subscribers before getting user ids for a stream.
Work towards #34244.
2025-06-23 17:04:47 -07:00
Aman Agrawal
93c4dcbdc9 hotkey: Merge uses of M hotkey.
It was not a good idea to have the hotkey
fallthrough the `case` for user not being in message list.

We merge both the cases and also remove `M` from
`message_view_only_keys`.
2025-06-20 15:56:19 -07:00
Karl Stolley
e19b815eaf compose: Rename functions to reflect attention level. 2025-06-20 15:54:59 -07:00
Karl Stolley
966c8451df compose: Add functions to mute/unmute recipient row. 2025-06-19 17:21:20 -07:00
Prakhar Pratyush
4515c29d44 topic_list: Fix missing 'show all topics' when messages not cached.
Earlier, when number of topics displayed in the topic list
widget was at max `topic_list_data.max_topics` and
first_message_id of stream >= first_cached_message_id.
There was a possibility of a few topics missing for messages
which were sent when the user wasn't subscribed.

We were neither displaying 'show more topics', nor fetching it
from server to update the list asyncronously.

This commit fixes that bug to display 'show all topics' in that
case and also initiates an API call in parallel to fetch all topics
for that stream and update the topic list asyncronously if topics
were actually missing.

Fixes #28949.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
7d55ad3c13 topic_list: Move and reorganize couple of functions to topic_list.ts.
A prep commit to move `is_complete_for_stream_id` and
`all_topics_in_cache` from `stream_topic_history` to `topic_list`
as it is specifically used while building topic list widget.

As it makes more sense to use `is_complete_for_stream_id` instead of
`all_topics_in_cache` directly, we reorganize to put it inside
`is_complete_for_stream_id`.

We rename `is_complete_for_stream_id` to
`is_full_topic_history_available` for clarity.

It'll also help to avoid tackling circular import issue
while resolving #28949.

No functional change in this commit.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
f94d3bd4a2 stream_topic_history: Use first_including_muted for the oldest message.
Earlier, we were using `all_messages_data.first()` for the oldest
message ID we have in cache, which is incorrect.

`all_messages_data.first_including_muted()` returns the oldest ID.

This commit fixes the bug.
2025-06-19 12:43:02 -07:00
Kislay Verma
2f696c5ec3 tests: Add library function to create message lists.
This function actually instantiates the
`MessageList` and `MessageListData` classes instead
of just mocking its structure as it is currently done.

It addresses https://github.com/zulip/zulip/pull/34645#discussion_r2099058418
2025-06-19 10:50:21 -07:00
Kislay Verma
5174dafb37 drafts: Use library functions in test.
In this commit we use functions from `example_stream`
and `example_user` modules in our test library.

Fixes part of 32326
2025-06-19 10:50:21 -07:00
Kislay Verma
1ece5ad15e topic_link_util: Add support for empty topics in the frontend.
Though the frontend module generated correct urls for
empty topics, it would sometime generate incorrect
link text in the fallback md link syntax. (eg, if
empty string was provided as the topic name).

This commit fixes that.
2025-06-18 13:03:56 -07:00
Aman Agrawal
b77ecca1a3 user_pill: Use user_id to get user info instead of email. 2025-06-18 11:27:59 -07:00