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.

inbox: Improve look of empty inbox view.

Aman Agrawale4ae826a47e2
diff --git a/docs/THIRDPARTY b/docs/THIRDPARTY
index 6300d653533..0263aa8a7f3 100644
--- a/docs/THIRDPARTY
+++ b/docs/THIRDPARTY
@@ -247,6 +247,11 @@ Copyright: 2013-2023 Cole Bemis (https://feathericons.com)
License: Expat
Comment: Icon has been modified by Vlad Koborov
+Files: web/images/empty-view-illustrations/inbox-done.svg
+Copyright: 2013-2023 Cole Bemis (https://feathericons.com)
+License: Expat
+Comment: Custom made out of feather icons by Vlad Koborov
+
Files: web/shared/icons/unmute.svg
Source: https://fonts.google.com/icons?selected=Material+Symbols+Rounded:volume_up
Copyright: Google, Inc.
diff --git a/web/images/empty-view-illustrations/inbox-done.svg b/web/images/empty-view-illustrations/inbox-done.svg
new file mode 100644
index 00000000000..f70f6b18460
--- /dev/null
+++ b/web/images/empty-view-illustrations/inbox-done.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="54" height="54" fill="none" viewBox="0 0 54 54"><g fill="#000"><path d="M45.707 6.96a1 1 0 0 1 0 1.414l-5.333 5.333a1 1 0 0 1-1.415 0l-2.666-2.667a1 1 0 1 1 1.414-1.414l1.96 1.96 4.626-4.626a1 1 0 0 1 1.414 0Z"/><path fill-rule="evenodd" d="M29.074 1.074A3.667 3.667 0 0 1 31.667 0h18.666A3.667 3.667 0 0 1 54 3.667V17a3.667 3.667 0 0 1-3.667 3.667H34.748l-5.04 5.04A1 1 0 0 1 28 25V3.667c0-.973.386-1.905 1.074-2.593ZM31.667 2A1.666 1.666 0 0 0 30 3.667v18.919l3.626-3.626a1 1 0 0 1 .707-.293h16A1.666 1.666 0 0 0 52 17V3.667A1.667 1.667 0 0 0 50.333 2H31.667Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.76 19a1 1 0 1 1 0 2h-3.28a3 3 0 0 0-2.684 1.665l-.002.003L8.62 35H19a1 1 0 0 1 .832.445L23.535 41h6.93l3.703-5.555A1 1 0 0 1 35 35h10.38l-3.78-7.552a1 1 0 0 1 1.788-.896l4.497 8.983A.994.994 0 0 1 48 36v12a5 5 0 0 1-5 5H11a5 5 0 0 1-5-5V36c0-.168.041-.326.115-.465l6.89-13.761A5 5 0 0 1 17.48 19h3.28ZM8 37v11a3 3 0 0 0 3 3h32a3 3 0 0 0 3-3V37H35.535l-3.703 5.555A1 1 0 0 1 31 43h-8a1 1 0 0 1-.832-.445L18.465 37H8Z" clip-rule="evenodd"/></g></svg>
\ No newline at end of file
diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.js
index 90273d52cca..6e13f6ef8e0 100644
--- a/web/src/inbox_ui.js
+++ b/web/src/inbox_ui.js
@@ -514,7 +514,8 @@ function show_empty_inbox_text(has_visible_unreads) {
$("#inbox-empty-without-search").hide();
} else {
$("#inbox-empty-with-search").hide();
- $("#inbox-empty-without-search").show();
+ // Use display value specified in CSS.
+ $("#inbox-empty-without-search").css("display", "");
}
} else {
$(".inbox-empty-text").hide();
diff --git a/web/styles/inbox.css b/web/styles/inbox.css
index cad0418ac36..f6f0676aa9a 100644
--- a/web/styles/inbox.css
+++ b/web/styles/inbox.css
@@ -496,3 +496,35 @@
display: none !important;
}
}
+
+.inbox-container #inbox-pane #inbox-empty-without-search {
+ margin-top: 70px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.inbox-empty-illustration {
+ width: 54px;
+ height: 54px;
+ margin-bottom: 16px;
+ background-color: var(--color-background-inbox-no-unreads-illustration);
+ mask: url("../images/empty-view-illustrations/inbox-done.svg") no-repeat
+ center;
+}
+
+.inbox-empty-title {
+ /* Matches the font-size used for .empty-list-message */
+ font-size: 1.5em;
+ color: var(--color-background-inbox-no-unreads-illustration);
+}
+
+.inbox-empty-action {
+ font-size: 1.3em;
+ padding-top: 0.5em;
+}
+
+.inbox-container #inbox-pane .inbox-empty-action-link {
+ text-decoration: underline;
+ color: hsl(200deg 100% 40%);
+}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index c0901edcd61..6a61b6291e7 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -287,6 +287,7 @@ body {
/* Inbox view constants - Values from Figma design */
--height-inbox-search: 26px;
--width-inbox-search: 346px;
+ --color-background-inbox-no-unreads-illustration: hsl(147deg 57% 25%);
--color-background-inbox: var(--color-background);
--color-icon-search-inbox: hsl(0deg 0% 0%);
--color-inbox-search-text: hsl(0deg 0% 0%);
@@ -447,6 +448,7 @@ body {
/* Inbox view */
--color-background-inbox: var(--color-background);
+ --color-background-inbox-no-unreads-illustration: hsl(147deg 40% 55%);
--color-icon-search-inbox: hsl(0deg 0% 100%);
--color-inbox-search-text: hsl(0deg 0% 95%);
--color-border-inbox-search: hsl(0deg 0% 100% / 20%);
diff --git a/web/templates/inbox_view/inbox_no_unreads.hbs b/web/templates/inbox_view/inbox_no_unreads.hbs
new file mode 100644
index 00000000000..6c71df7318b
--- /dev/null
+++ b/web/templates/inbox_view/inbox_no_unreads.hbs
@@ -0,0 +1,12 @@
+<div id="inbox-empty-without-search" class="inbox-empty-text">
+ <div class="inbox-empty-illustration"></div>
+ <div class="inbox-empty-title">
+ {{t "There are no unread messages in your inbox."}}
+ </div>
+ <div class="inbox-empty-action">
+ {{#tr}}
+ You might be interested in <z-link>recent conversations</z-link>.
+ {{#*inline "z-link"}}<a class="inbox-empty-action-link" href="#recent">{{> @partial-block}}</a>{{/inline}}
+ {{/tr}}
+ </div>
+</div>
diff --git a/web/templates/inbox_view/inbox_view.hbs b/web/templates/inbox_view/inbox_view.hbs
index da0ea52eef6..7028e31b003 100644
--- a/web/templates/inbox_view/inbox_view.hbs
+++ b/web/templates/inbox_view/inbox_view.hbs
@@ -13,9 +13,7 @@
<div id="inbox-empty-with-search" class="inbox-empty-text empty-list-message">
{{t "No conversations match your filters."}}
</div>
- <div id="inbox-empty-without-search" class="inbox-empty-text empty-list-message">
- {{t "There are no unread messages in your inbox."}}
- </div>
+ {{> inbox_no_unreads}}
<div id="inbox-list">
{{> inbox_list}}
</div>