Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Place and style .settings-field-label on Profile.
Karl Stolley6f4a58fe718e
diff --git a/web/styles/settings.css b/web/styles/settings.cssindex 9a05c55dbf2..a95484b15ad 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -1589,12 +1589,27 @@ $option_title_width: 180px;}}+/* TODO: Remove .dropdown-title once the more+ generic and reusable .settings-field-label has+ been placed throughout the settings modals. */+.settings-field-label,.dropdown-title {margin-bottom: var(--margin-bottom-field-description);}.settings-profile-user-field-hint {color: var(--color-text-settings-field-hint);+ /* We effectively eliminate the margin-bottom on+ .settings-field-label by pulling .field-hint+ up a corresponding negative value. This cinches+ things up a little tighter, given the generous+ line-height (20px) on <label> elements, though+ note well that that comes care of Bootstrap. */+ margin-top: calc(var(--margin-bottom-field-description) * -1.5);+ /* Maintain the same margin-bottom value as appears+ with .settings-field-label to display text-input+ combinations uniformly throughout the settings UI. */+ margin-bottom: var(--margin-bottom-field-description);}.profile-field-choices {diff --git a/web/templates/settings/custom_user_profile_field.hbs b/web/templates/settings/custom_user_profile_field.hbsindex 4a87909438e..f13777cc350 100644--- a/web/templates/settings/custom_user_profile_field.hbs+++ b/web/templates/settings/custom_user_profile_field.hbs@@ -1,6 +1,6 @@<div class="custom_user_field" name="{{ field.name }}" data-field-id="{{ field.id }}"><span class="custom-user-field-label-wrapper {{#if field.required}}required-field-wrapper{{/if}}">- <label class="inline-block" for="{{ field.name }}" class="title">{{ field.name }}</label>+ <label class="settings-field-label inline-block" for="{{ field.name }}" class="title">{{ field.name }}</label><span class="required-symbol {{#unless is_empty_required_field}}hidden{{/unless}}"> *</span></span><div class="alert-notification custom-field-status"></div>diff --git a/web/templates/settings/profile_settings.hbs b/web/templates/settings/profile_settings.hbsindex 4c7dfc89de1..69a5bbfd7c6 100644--- a/web/templates/settings/profile_settings.hbs+++ b/web/templates/settings/profile_settings.hbs@@ -6,7 +6,7 @@<div class="full-name-change-container"><div class="input-group inline-block grid user-name-parent"><div class="user-name-section inline-block">- <label for="full_name" class="title inline-block">{{t "Name" }}</label>+ <label for="full_name" class="settings-field-label inline-block">{{t "Name" }}</label><div class="alert-notification full-name-status"></div><div class="settings-profile-user-field-hint">{{t "How your account is displayed in Zulip." }}</div><div id="full_name_input_container" {{#unless user_can_change_name}}class="disabled_setting_tooltip"{{/unless}}>@@ -18,7 +18,7 @@<form class="timezone-setting-form"><div class="input-group grid">- <label for="timezone" class="dropdown-title inline-block">{{t "Time zone" }}</label>+ <label for="timezone" class="settings-field-label inline-block">{{t "Time zone" }}</label><div class="alert-notification timezone-setting-status"></div><div class="timezone-input"><select name="timezone" id="user_timezone" class="bootstrap-focus-style settings_select">