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.

streams_popover: Set popover width equal to width of longest menu item.

Sayam Samala2733c7bc397
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index e2f9fa85741..a0b4a787025 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -226,6 +226,12 @@
}
.streams_popover {
+ width: min-content;
+
+ .stream-menu-item {
+ white-space: nowrap;
+ }
+
.topic-name {
text-align: center;
margin-top: 5px;
diff --git a/web/templates/stream_sidebar_actions.hbs b/web/templates/stream_sidebar_actions.hbs
index bf05cf69113..de42bd0b390 100644
--- a/web/templates/stream_sidebar_actions.hbs
+++ b/web/templates/stream_sidebar_actions.hbs
@@ -1,6 +1,6 @@
{{! Contents of the "stream actions" popup }}
<ul class="nav nav-list streams_popover" data-stream-id="{{ stream.stream_id }}" data-name="{{ stream.name }}">
- <li>
+ <li class="stream-menu-item">
<p class="topic-name">
<span class="stream-privacy-original-color-{{stream.stream_id}} stream-privacy filter-icon" style="color: {{stream.color}}">
{{> stream_privacy
@@ -14,13 +14,13 @@
<hr />
{{! tabindex="0" Makes anchor tag focusable. Needed for keyboard support. }}
- <li>
+ <li class="stream-menu-item">
<a tabindex="0" class="open_stream_settings">
<i class="fa fa-cog" aria-hidden="true"></i>
{{t "Stream settings" }}
</a>
</li>
- <li class="hidden-for-spectators">
+ <li class="stream-menu-item hidden-for-spectators">
<a tabindex="0" class="pin_to_top">
<i class="fa fa-thumb-tack stream-pin-icon" aria-hidden="true"></i>
{{#if stream.pin_to_top}}
@@ -30,13 +30,13 @@
{{/if}}
</a>
</li>
- <li class="hidden-for-spectators">
+ <li class="stream-menu-item hidden-for-spectators">
<a tabindex="0" class="mark_stream_as_read">
<i class="fa fa-book" aria-hidden="true"></i>
{{t "Mark all messages as read"}}
</a>
</li>
- <li class="hidden-for-spectators">
+ <li class="stream-menu-item hidden-for-spectators">
<a tabindex="0" class="toggle_stream_muted">
{{#if stream.is_muted}}
<i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>
@@ -47,19 +47,19 @@
{{/if}}
</a>
</li>
- <li>
+ <li class="stream-menu-item">
<a tabindex="0" class="popover_new_topic_button">
<i class="fa fa-plus" aria-hidden="true"></i>
{{t "New topic" }}
</a>
</li>
- <li class="hidden-for-spectators">
+ <li class="stream-menu-item hidden-for-spectators">
<a tabindex="0" class="popover_sub_unsub_button" data-name="{{stream.name}}">
<i class='fa fa-envelope' aria-hidden="true"></i>
{{t "Unsubscribe" }}
</a>
</li>
- <li class="hidden-for-spectators no-auto-hide-left-sidebar-overlay">
+ <li class="stream-menu-item hidden-for-spectators no-auto-hide-left-sidebar-overlay">
<span class="colorpicker-container"><input stream_id="{{stream.stream_id}}" class="colorpicker" type="text" value="{{stream.color}}" /></span>
<a tabindex="0" class="choose_stream_color">
<i class="fa fa-eyedropper" aria-hidden="true"></i>