Commit Graph

88 Commits

Author SHA1 Message Date
Evy Kassirer
4df4f072f4 stream_list: Show mention indicator in section headings.
Fixes #35104.
2025-08-11 14:57:28 -07:00
Tim Abbott
9ca22320cd stream_list: Extract ui_util.get_left_sidebar_search_term.
This will support it being accessed from all the sidebar modules.
2025-08-11 14:22:32 -07:00
Tim Abbott
ae04cdee78 left_sidebar: Rename stream-search-and-add for global search.
This will be more readable once we've moved the search input.
2025-08-11 14:22:32 -07:00
Tim Abbott
0ccfb7fdf0 left_sidebar: Rename stream-list-filter for global search.
This will be more readable once we've moved the search input.
2025-08-11 14:22:32 -07:00
Evy Kassirer
bb43cfe9c7 stream_list: Show toggle button above muted/inactive channels. 2025-08-11 11:45:45 -07:00
Evy Kassirer
cf5e7a27ba left_sidebar: Include unmuted counts in muted channels in toggle count. 2025-08-11 11:45:45 -07:00
Evy Kassirer
c56ddf9ba4 left_sidebar: Combine muted and inactive channels.
Part of #35552.
2025-08-11 11:45:45 -07:00
Evy Kassirer
3ced9a1ad3 left_sidebar: Don't fade inactive channels (unless muted).
Part of #35552.
2025-08-11 11:45:45 -07:00
Evy Kassirer
259fd250ed stream_list: Update unread counts when building the sidebar.
This bug was introduced by 8817284f7a
which should have included this line.
2025-08-11 10:15:15 -07:00
Evy Kassirer
a644874e76 stream_list: Add folder ids to StreamListSection object.
Followup to
https://github.com/zulip/zulip/pull/35075#discussion_r2232041259
2025-08-08 12:05:05 -07:00
Evy Kassirer
8817284f7a channel_folders: Move unreads code from left_sidebar_navigation to stream_list. 2025-08-08 12:05:05 -07:00
Evy Kassirer
8a862f3933 stream_list: Use switch statement for stream list row type. 2025-08-08 12:05:05 -07:00
Evy Kassirer
ee877ebbc5 left_sidebar: Let current_section_id_for_stream return undefined.
Fixes this issue from Sentry:
https://zulip.sentry.io/issues/6778533249/events/9e2a25e419bc4dc2b7a207c5a482f943/?project=4504556882821120
2025-08-07 18:29:42 -07:00
Vector73
6c94266bf9 stream_data: Rename is_stream_archived function.
Renames `is_stream_archived` function to `is_stream_archived_by_id`.
2025-08-05 13:41:08 -07:00
Sayam Samal
a34d033ec1 stream_list: Fix focus behavior for topic list search box.
This commit ensures that the focus on the topic list search box is only
triggered when the user clicks on the "SHOW ALL TOPICS" button, and not
when the narrow changes. This prevents unwanted focus behavior when
switching between different narrows/views which interfered with the
focus states of the compose box.
2025-08-05 13:21:53 -07:00
Evy Kassirer
033ef953db left_sidebar: Fully rerender stream list when count display policy changes.
Now that there are many counts to update, we may as well just rerender
the whole stream list.
2025-07-29 17:37:29 -07:00
Evy Kassirer
80c9489683 left_sidebar: Uncollapse folder when clicking an active channel in it. 2025-07-28 10:28:01 -07:00
Evy Kassirer
18463b45a2 left_sidebar: Skip invisible rows in keyboard navigation.
Collapsed sections and inactive channel lists are not visible and so
should be ignored in keyboard naviation.
2025-07-28 10:28:01 -07:00
Evy Kassirer
f984b44ab9 left_sidebar: Remove inactive section, put inactive channels in regular section. 2025-07-28 10:28:01 -07:00
Evy Kassirer
e63ee026fe left_sidebar: Hide inactive channels in channel folders. 2025-07-28 10:28:01 -07:00
Evy Kassirer
e6fecfc8eb left_sidebar: Show channel folders in left sidebar.
Fixes part of #31972.
2025-07-28 10:28:01 -07:00
Evy Kassirer
bc6b0cccf4 left_sidebar: Add unread markers to channel section headers. 2025-07-28 10:28:01 -07:00
Evy Kassirer
739debf7b4 left_sidebar: Add plus icon to channel section headers. 2025-07-28 10:28:01 -07:00
Evy Kassirer
08fd7a30f9 left_sidebar: Add plus icon beside channel search bar.
This button was previously found when hovering on the CHANNELS
header, but now that we've removed that header, we show the
button here instead, and always visible.
2025-07-28 10:28:01 -07:00
Evy Kassirer
add97effbb left_sidebar: Show highlighted channel/topic even when folder is collapsed. 2025-07-28 10:28:01 -07:00
Evy Kassirer
27092d5543 left_sidebar: Change channel sections to togglable sections. 2025-07-28 10:28:01 -07:00
Evy Kassirer
dc013b6a10 left_sidebar: Show the search bar all the time.
This is preparation for adding channel folders to the sidebar
and removing the CHANNELS header, where we'll want to have an
always open search bar.
2025-07-28 10:28:01 -07:00
Evy Kassirer
0ba4c9cb6c stream_list: Don't toggle channel search on header click.
Soon we'll make multiple channel sections and have them toggle
open or closed when clicking the header.
2025-07-28 10:28:01 -07:00
Evy Kassirer
3bb08183f7 stream_list: Remove unused references to stream-filters-label. 2025-07-22 12:15:54 -07:00
Evy Kassirer
c942900b69 stream_list: Hide channels on zoom-in using .hide instead of hide().
This gives us more control, for example `show()` was adding
`display: inline-block;` to channels after unhiding them
which was overriding other code (added for channel folders
in future commits) that was trying to hide the channels.
2025-07-22 12:15:21 -07:00
Sayam Samal
122d93d430 filter_input: Add explicit classname for filter clear button.
This commit adds an explicit "input-close-filter-button" classname to
the filter input clear button, improving the readability of the code.
2025-07-21 23:16:26 -07:00
Tim Abbott
45941ba4d1 stream_list: Enter should use web_channel_default_view.
This previously misleadingly named on_stream_click masked the fact
that this was not using the actual click handler.
2025-07-16 12:35:14 -07:00
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
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
Sayam Samal
f4ec5f9741 topic_list: Fix and improve selectors related to the topic list filter. 2025-07-14 13:58:02 -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
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
Vector73
09b4a4c6e4 stream_list: Remove redundant condition block to get topic list URL. 2025-07-09 14:25:53 -07:00
Aman Agrawal
6aec84147b stream_list: Fix misleading tooltip.
When in topic narrow, hovering over the topic's channel, should
correctly show where it would navigate to.
2025-07-09 10:16:23 -07:00
Rohan Gudimetla
a3e7ef8e71 left_sidebar: Add navigation option to go to top unread topic.
This commit adds option in personal settings to allow
navigation of channel links in left sidebar to the top
unread topic in that channel.

In cases of no unread messages in unmuted topics of the channel,
it falls back to the top topic of channel.

Fixes #35066
2025-07-03 18:14:10 -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
Maneesh Shukla
52b83f7b58 topic_list: Filter topics by resolved state in "more topics" view.
Fixes: #24200.
2025-07-01 14:02:57 -07:00
Evy Kassirer
98e65b220a stream_list: Remove unneeded export on scroll_stream_into_view. 2025-06-29 23:13:25 -07:00
opmkumar
cf658155e7 left_sidebar: Remove logic of hiding unread counter of STREAMS header.
This removes the previous logic where the STREAMS header unread counter was
hidden when "Show unread counts for" was set to "No streams."
2025-06-27 13:38:38 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Aman Agrawal
82ec451a19 topic_list: Rename function to specify where it works.
This function only works to scroll topic in left sidebar.
2025-04-24 16:22:13 -07:00
Aman Agrawal
f5714a0c55 topic_list: Generalize use of TopicListWidget.
We introduce a different class to be used for left sidebar which
inherits TopicListWidget. More specifically, we allow the
children classes of TopicListWidget to pass their own method to
filter topics. This will later be used by inbox view when showing
channel view in center pane.
2025-04-10 11:52:03 -07:00
Aman Agrawal
5ea42823ba topic_list: Rename function to specify use for left sidebar. 2025-04-10 11:51:20 -07:00