Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

left_sidebar: Support channel-row clicks on the left.

apoorvapendseb8e09b3c35b2
diff --git a/web/src/click_handlers.ts b/web/src/click_handlers.ts
index 81c8972ccf5..2d6995afc2e 100644
--- a/web/src/click_handlers.ts
+++ b/web/src/click_handlers.ts
@@ -664,6 +664,7 @@ export function initialize(): void {
// Left sidebar channel rows
$("body").on("click", ".channel-new-topic-button", function (this: HTMLElement, e) {
e.stopPropagation();
+ e.preventDefault();
const stream_id = Number.parseInt(this.dataset.streamId!, 10);
compose_actions.start({
message_type: "stream",
diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.ts
index 7875f0b2912..a1f06564d56 100644
--- a/web/src/stream_popover.ts
+++ b/web/src/stream_popover.ts
@@ -1115,6 +1115,7 @@ export async function build_move_topic_to_stream_popover(
export function initialize(): void {
$("#stream_filters").on("click", ".stream-sidebar-menu-icon", function (this: HTMLElement, e) {
+ e.preventDefault();
const $stream_li = $(this).parents("li");
const stream_id = elem_to_stream_id($stream_li);
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 76e48f8a1fb..b697ad9cb5a 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -1114,6 +1114,21 @@ li.top_left_scheduled_messages {
minmax(0, max-content)
var(--left-sidebar-vdots-width) 0;
white-space: nowrap;
+ text-decoration: none;
+ color: inherit;
+
+ &:hover {
+ opacity: 1;
+ text-decoration: none;
+ color: inherit;
+ }
+
+ &:not(:active):focus {
+ text-decoration: none;
+ border: none;
+ outline: none;
+ color: inherit;
+ }
.stream-privacy {
grid-area: starting-anchor-element;
diff --git a/web/templates/stream_sidebar_row.hbs b/web/templates/stream_sidebar_row.hbs
index db6ef26afe8..2809acf9d8a 100644
--- a/web/templates/stream_sidebar_row.hbs
+++ b/web/templates/stream_sidebar_row.hbs
@@ -2,13 +2,13 @@
<li class="narrow-filter{{#if is_muted}} out_of_home_view{{/if}}" data-stream-id="{{id}}">
<div class="bottom_left_row">
- <div class="subscription_block selectable_sidebar_block {{#if hide_unread_count}}hide_unread_counts{{/if}}">
+ <a href="{{url}}" class="subscription_block selectable_sidebar_block {{#if hide_unread_count}}hide_unread_counts{{/if}}">
<span class="stream-privacy-original-color-{{id}} stream-privacy filter-icon" style="color: {{color}}">
{{> stream_privacy . }}
</span>
- <a href="{{url}}" class="stream-name">{{name}}</a>
+ <span class="stream-name">{{name}}</span>
<div class="left-sidebar-controls">
{{#if can_post_messages}}
@@ -27,6 +27,6 @@
</div>
<span class="sidebar-menu-icon stream-sidebar-menu-icon"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
- </div>
+ </a>
</div>
</li>