Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
buddy_list: Use different spacing for avatar and non-avatar text.
evykassirerddd14a3dc1ca
diff --git a/web/src/buddy_list.ts b/web/src/buddy_list.tsindex d140b7b336f..ce32b2477e1 100644--- a/web/src/buddy_list.ts+++ b/web/src/buddy_list.ts@@ -21,6 +21,7 @@ import * as padded_widget from "./padded_widget.ts";import * as peer_data from "./peer_data.ts";import * as people from "./people.ts";import * as scroll_util from "./scroll_util.ts";+import * as settings_config from "./settings_config.ts";import {current_user} from "./state_data.ts";import * as stream_data from "./stream_data.ts";import type {StreamSubscription} from "./sub_store.ts";@@ -285,6 +286,11 @@ export class BuddyList extends BuddyListConf {this.users_matching_view_ids = [];this.$other_users_list.empty();this.other_user_ids = [];+ $("#user-list").toggleClass(+ "with_avatars",+ user_settings.user_list_style ===+ settings_config.user_list_style_values.with_avatar.code,+ );// Reset data to be relevant for this current view.this.render_data = get_render_data();diff --git a/web/src/settings_config.ts b/web/src/settings_config.tsindex 2a8775badf3..9f9b7424ad3 100644--- a/web/src/settings_config.ts+++ b/web/src/settings_config.ts@@ -81,7 +81,7 @@ export const user_list_style_values: {code: number;description: string;};- with_avatar?: {+ with_avatar: {code: number;description: string;};diff --git a/web/styles/app_variables.css b/web/styles/app_variables.cssindex 07b7c67b3df..60305930ae6 100644--- a/web/styles/app_variables.css+++ b/web/styles/app_variables.css@@ -323,8 +323,18 @@--right-sidebar-heading-left-spacing: 5px;--right-sidebar-avatar-width: 2em;--right-sidebar-avatar-height: var(--right-sidebar-avatar-width);- --right-sidebar-avatar-right-margin: 11px;+ --right-sidebar-avatar-right-margin: 0.85ch;--right-sidebar-presence-circle-width: 1.4285em; /* 20px at 14px em */+ /* toggle + avatar + avatar margin + 2px border */+ --right-sidebar-text-indent-with-avatar: calc(+ var(--right-sidebar-header-icon-toggle-width) / 2 ++ var(--right-sidebar-avatar-width) ++ var(--right-sidebar-avatar-right-margin) + 2px+ );+ --right-sidebar-text-indent-without-avatar: calc(+ var(--right-sidebar-toggle-width-offset) ++ var(--right-sidebar-presence-circle-width)+ );/* Tippy popover related values */--navbar-popover-menu-min-width: 230px;diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.cssindex 6573348adca..ecd40a875ab 100644--- a/web/styles/right_sidebar.css+++ b/web/styles/right_sidebar.css@@ -206,10 +206,6 @@font-size: 0.875em;/* Override .empty-list-message !important styling */padding: 0 !important;- margin-left: calc(- var(--right-sidebar-toggle-width-offset) +- var(--right-sidebar-left-spacing)- );text-align: left;&:hover {@@ -326,7 +322,7 @@.selectable_sidebar_block {margin: 4px;- margin-left: var(--right-sidebar-header-icon-toggle-width);+ margin-left: calc(var(--right-sidebar-header-icon-toggle-width) / 2);}.avatar-preload-background {@@ -574,8 +570,16 @@}}-.buddy-list-user-link .right-sidebar-wrappable-text-container {- margin-left: var(--right-sidebar-header-icon-toggle-width);+#user-list.with_avatars+ .buddy-list-user-link+ .right-sidebar-wrappable-text-container,+#user-list.with_avatars .buddy-list-section .empty-list-message {+ margin-left: var(--right-sidebar-text-indent-with-avatar);+}++.buddy-list-user-link .right-sidebar-wrappable-text-container,+.buddy-list-section .empty-list-message {+ margin-left: var(--right-sidebar-text-indent-without-avatar);}.invite-user-shortcut {