Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
popovers: Add structural changes and fix CSS overlap.
Sayam Samale3878cf64afd
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex 3b5e91f474f..e452422002c 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -63,7 +63,6 @@ $before_unread_count_padding: 3px;}.sidebar-topic-check,-.topic-name,.topic-markers-and-controls {cursor: pointer;}@@ -919,6 +918,29 @@ li.top_left_scheduled_messages {grid-template-columns:25px $topic_resolve_width minmax(0, 1fr) minmax(0, max-content)30px 0;++ .topic-name {+ cursor: pointer;+ grid-area: row-content;+ padding: 1px $before_unread_count_padding 1px 0;++ /* TODO: We should figure out how to remove this without changing the spacing */+ line-height: 1.1;++ /* TODO: Consolidate these styles with conversation partners and stream name+ once grid rewrite is complete on all sidebar rows.++ Also: note that these styles will be moot for topic names once we allow+ for multiline topics. If we hold multiline topics to a certain number+ of lines, we'll likely need a JavaScript-based solution like Clamp.js+ to display an ellipsis on the final visible line. */+ white-space: nowrap;+ /* Both `hidden` and `clip` are shown for the sake+ of older browsers that do not support `clip`. */+ overflow-x: hidden;+ overflow-x: clip;+ text-overflow: ellipsis;+ }}.topic-box .zero_count {@@ -931,28 +953,6 @@ li.top_left_scheduled_messages {height: 20px;}-.topic-name {- grid-area: row-content;- padding: 1px $before_unread_count_padding 1px 0;-- /* TODO: We should figure out how to remove this without changing the spacing */- line-height: 1.1;-- /* TODO: Consolidate these styles with conversation partners and stream name- once grid rewrite is complete on all sidebar rows.-- Also: note that these styles will be moot for topic names once we allow- for multiline topics. If we hold multiline topics to a certain number- of lines, we'll likely need a JavaScript-based solution like Clamp.js- to display an ellipsis on the final visible line. */- white-space: nowrap;- /* Both `hidden` and `clip` are shown for the sake- of older browsers that do not support `clip`. */- overflow-x: hidden;- overflow-x: clip;- text-overflow: ellipsis;-}-.stream-markers-and-controls,.topic-markers-and-controls {grid-area: markers-and-controls;diff --git a/web/styles/popovers.css b/web/styles/popovers.cssindex d10c1dc824d..c09a26f5ecf 100644--- a/web/styles/popovers.css+++ b/web/styles/popovers.css@@ -232,12 +232,14 @@white-space: nowrap;}- .topic-name {+ .stream-name {align-items: baseline;+ color: var(--color-text-sidebar-popover-menu);display: flex;gap: 3px;- margin-top: 5px;- margin-bottom: 5px;+ font-weight: 700;+ line-height: 1.1;+ margin: 6px 0;white-space: normal;}@@ -286,6 +288,23 @@}}+.topics_popover {+ min-width: var(--popover-menu-min-width);+ width: min-content;++ .topic-menu-item {+ white-space: nowrap;+ }++ .topic-name {+ color: var(--color-text-sidebar-popover-menu);+ font-weight: 700;+ line-height: 1.1;+ margin: 6px 0;+ white-space: normal;+ }+}+ul {&.user-card-popover-actions i,&.actions_popover i,@@ -320,21 +339,6 @@ ul {}}- &.topics_popover {- min-width: var(--popover-menu-min-width);- width: min-content;-- .topic-menu-item {- white-space: nowrap;- }-- .topic-name {- margin-top: 5px;- margin-bottom: 5px;- white-space: normal;- }- }-&.user-card-popover-actions i.fa-edit {vertical-align: middle;}diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex a55f574451d..fcf2e348d6f 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -284,6 +284,7 @@ body {--color-text-personal-menu-no-status: hsl(0deg 0% 50%);--color-text-personal-menu-some-status: hsl(0deg 0% 40%);--color-text-sidebar-heading: hsl(0deg 0% 43%);+ --color-text-sidebar-popover-menu: hsl(0deg 0% 20%);/* Markdown code colors */--color-markdown-code-text: hsl(0deg 0% 0%);@@ -573,6 +574,7 @@ body {--color-text-item: hsl(0deg 0% 50%);--color-text-personal-menu-no-status: hsl(0deg 0% 100% 35%);--color-text-personal-menu-some-status: hsl(0deg 0% 100% 50%);+ --color-text-sidebar-popover-menu: hsl(236deg 33% 90%);/* 75% opacity of --color-text-default against --color-background.We use color-mix here to avoid defining a separate, compounding`opacity` property, and also to preserve a record of thediff --git a/web/templates/stream_sidebar_actions.hbs b/web/templates/stream_sidebar_actions.hbsindex de42bd0b390..54e5ce0081f 100644--- a/web/templates/stream_sidebar_actions.hbs+++ b/web/templates/stream_sidebar_actions.hbs@@ -1,14 +1,14 @@{{! Contents of the "stream actions" popup }}<ul class="nav nav-list streams_popover" data-stream-id="{{ stream.stream_id }}" data-name="{{ stream.name }}"><li class="stream-menu-item">- <p class="topic-name">+ <div class="stream-name"><span class="stream-privacy-original-color-{{stream.stream_id}} stream-privacy filter-icon" style="color: {{stream.color}}">{{> stream_privacyinvite_only=stream.invite_onlyis_web_public=stream.is_web_public }}</span>- <b>{{stream.name}}</b>- </p>+ {{stream.name}}+ </div></li><hr />diff --git a/web/templates/topic_sidebar_actions.hbs b/web/templates/topic_sidebar_actions.hbsindex f2707fe1599..07b1274b1ea 100644--- a/web/templates/topic_sidebar_actions.hbs+++ b/web/templates/topic_sidebar_actions.hbs@@ -1,8 +1,6 @@<ul class="nav nav-list topics_popover"><li class="topic-menu-item">- <p class="topic-name">- <b>{{topic_name}}</b>- </p>+ <div class="topic-name">{{topic_name}}</div></li><hr />