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.
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.
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.
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>
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.
This follow-up commit replaces the current right sidebar user list
filter input implementation with the redesigned input component.
Fixes part of #34476.
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.
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
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.
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.
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.
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.
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.
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.
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`.
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.
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.
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.
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.