Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Add search-topics button to expanded channel row.
Evy Kassirera718205f987d
diff --git a/web/src/left_sidebar_tooltips.ts b/web/src/left_sidebar_tooltips.tsindex 961343397ea..10cee7faa37 100644--- a/web/src/left_sidebar_tooltips.ts+++ b/web/src/left_sidebar_tooltips.ts@@ -139,7 +139,7 @@ export function initialize(): void {});tippy.delegate("body", {- target: ".stream-list-section-container .add-stream-tooltip, .left-sidebar-controls .channel-new-topic-button",+ target: ".stream-list-section-container .add-stream-tooltip, .left-sidebar-controls .channel-new-topic-button, .left-sidebar-controls .channel-search-topics-button",appendTo: () => document.body,});diff --git a/web/src/stream_list.ts b/web/src/stream_list.tsindex a2a7ddeac05..10a00884954 100644--- a/web/src/stream_list.ts+++ b/web/src/stream_list.ts@@ -1339,6 +1339,16 @@ export function initialize({}});+ $("#stream_filters").on("click", ".channel-search-topics-button", (e) => {+ on_show_more_topics(e);+ });++ $("#stream_filters").on("keydown", ".channel-search-topics-button", (e) => {+ if (keydown_util.is_enter_event(e)) {+ on_show_more_topics(e);+ }+ });+$("body").on("click", ".zoom-in-topics .left-sidebar-modal-close-area", (e) => {zoom_out();browser_history.update_current_history_state_data({show_more_topics: false});diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex ffc09e90eb8..c521619d035 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -210,7 +210,8 @@}.stream-expanded {- .channel-new-topic-button {+ .channel-new-topic-button,+ .channel-search-topics-button {display: flex;}@@ -1974,6 +1975,7 @@ li.active-sub-filter {/* We won't know in advance how many controls a givenrow has, but this allows grid to generate as manyas needed, sized to a shared icon width. */+ grid-auto-flow: column;grid-auto-columns: var(--left-sidebar-header-icon-width);grid-template-rows: var(--line-height-sidebar-row-prominent);place-content: stretch stretch;@@ -2076,7 +2078,8 @@ li.active-sub-filter {}}-.channel-new-topic-button {+.channel-new-topic-button,+.channel-search-topics-button {/* display: flex; is set on visible channels andchannel-row hovers. */display: none;diff --git a/web/templates/stream_sidebar_row.hbs b/web/templates/stream_sidebar_row.hbsindex 7b906e70a1b..f3123677dee 100644--- a/web/templates/stream_sidebar_row.hbs+++ b/web/templates/stream_sidebar_row.hbs@@ -10,6 +10,9 @@<span class="stream-name">{{name}}</span><div class="left-sidebar-controls">+ <div class="channel-search-topics-button" tabindex="0" data-tippy-content="{{t 'Search topics' }}" data-stream-id="{{id}}">+ <i class="zulip-icon zulip-icon-search" aria-hidden="true"></i>+ </div>{{#if can_post_messages}}<div class="channel-new-topic-button hidden-for-spectators auto-hide-left-sidebar-overlay" tabindex="0" data-tippy-content="{{#if (or is_empty_topic_only_channel cannot_create_topics_in_channel)}}{{t 'New message'}}{{else}}{{t 'Start a new topic'}}{{/if}}" data-stream-id="{{id}}"><i class="channel-new-topic-icon zulip-icon zulip-icon-square-plus" aria-hidden="true"></i>