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: Handle condensed icon unread states.

Karl Stolley458d6411b4ec
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 115a2b05ca1..d582ae0949c 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -497,8 +497,31 @@ li.active-sub-filter {
padding: 0;
border-radius: 4px;
+ .unread_count {
+ position: absolute;
+ }
+
&:hover {
background: var(--color-background-hover-narrow-filter);
+
+ .unread_count {
+ top: -6px;
+ right: -6px;
+ }
+ }
+
+ &:not(:hover) .unread_count {
+ top: 2px;
+ right: 2px;
+ width: 6px;
+ height: 6px;
+ font-size: 0;
+ padding: 0;
+ background-color: var(--color-background-unread-counter-dot);
+ }
+
+ &.top_left_starred_messages .unread_count {
+ display: none;
}
}
@@ -507,6 +530,11 @@ li.active-sub-filter {
margin: 0;
/* Horizontally center icons within their boxes. */
text-align: center;
+
+ &:focus {
+ /* Unset inherited :focus outline. */
+ outline: 0;
+ }
}
.active-filter {
@@ -523,11 +551,6 @@ li.active-sub-filter {
height: 24px;
color: var(--color-left-sidebar-navigation-icon);
}
-
- .unread_count {
- /* TODO: properly handle condensed unreads. */
- display: none;
- }
}
#left-sidebar-navigation-list {
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index c7b821c1d96..a761a5ecae7 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -206,6 +206,9 @@ body {
--color-border-dropdown-menu: hsl(0deg 0% 0% / 40%);
--color-border-personal-menu-avatar: hsl(0deg 0% 0% / 10%);
--color-background-unread-counter: hsl(105deg 2% 50%);
+ --color-background-unread-counter-dot: var(
+ --color-background-unread-counter
+ );
--color-background-unread-counter-popover-menu: hsl(200deg 100% 40%);
--color-background-tab-picker-container: hsl(0deg 0% 0% / 7%);
--color-background-tab-picker-selected-tab: hsl(0deg 0% 100%);
@@ -337,6 +340,7 @@ body {
--color-border-dropdown-menu: hsl(0deg 0% 0%);
--color-border-personal-menu-avatar: hsl(0deg 0% 100% / 20%);
--color-background-unread-counter: hsl(105deg 2% 50% / 50%);
+ --color-background-unread-counter-dot: hsl(105deg 2% 50% / 90%);
--color-background-unread-counter-popover-menu: hsl(105deg 2% 50% / 50%);
--color-background-tab-picker-container: hsl(0deg 0% 0% / 30%);
--color-background-tab-picker-selected-tab: hsl(0deg 0% 100% / 7%);