Commit Graph

6 Commits

Author SHA1 Message Date
Hardik Dharmani 19a2365ab9 left_sidebar: Display unmuted topic in regular font (not faded).
Add class unmuted_topic to li.bottom_left_row element if topic is
unmuted. Add relevant CSS for .unmuted_topic to display unmuted
topics in regular font.

Fixes part of #24243.
2023-04-24 11:40:58 -07:00
Hardik Dharmani 1e1e18d28c left_sidebar: Prioritize unmuted topics in non-zoomed topic list.
Created a new function choose_topics that loops through the topics
and push filtered topics using should_show_topic function to items
array if not zoomed else just push all topics directly to array.

If stream is muted and not zoomed call the choose_topics function
twice, first with passing unmuted_topics and second time with passing
remaining topics. else, call it only once with topic_names.

Fixes part of #24243
2023-04-21 10:32:44 -07:00
Lauryn Menard b9023db04e node-tests: Remove mock of `topic_list` in `topic_list_data.test`.
With commit f0d1332ba2, we no longer need to mock `topic_list.js`
in the `topic_list_data` node test. Instead, we can pass a string
directly to that function. The default is an empty string unless
there is a search input. Also, updates the default of the zoom to
be false instead of undefined in the tests.
2023-04-12 11:30:56 -07:00
sbansal1999 ea2de5b0a4 js: Break cyclic dependency between topic_list and topic_list_data.
This commit breaks the cyclic dependency between "topic_list.js"
and "topic_list_data.js".

It achieves this by passing "search_term" generated by the
"get_topic_search_term" function to "topic_list_data.js" directly
through the function call from "topic_list.js".
2023-04-10 08:55:06 -07:00
Lauryn Menard 95d48bc2ad topic-list-data: Increase max topics shown in left sidebar.
Incresase the max number of stream topics shown when not zoomed
into the stream for more topics in the left sidebar to be a max
of 8 unread conversations and 12 when there are unreads.
2023-04-07 15:10:24 -07:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00