Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Refactor HTML and CSS for "Notification sound" setting.
Sahil Batraf1d247cc7656
diff --git a/web/styles/settings.css b/web/styles/settings.cssindex 8d97a425ffb..602c2b9927b 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -188,8 +188,12 @@ h3,.play_notification_sound {.notification-sound-icon {font-size: 1.5714em; /* 22px at 14px / em */- /* Visually center with chevron in select */- line-height: 1.8571em; /* 26px at 14px / em */+ /* Visually center with chevron in select+ by setting the line-height equal to the height+ of select which is equal to - 1.4em + 8px (4px+ each for top and bottom paddings) + 2px (1px each+ for top and bottom borders). */+ line-height: calc(1.4 * var(--base-font-size-px) + 10px);cursor: pointer;}}diff --git a/web/templates/settings/notification_settings.hbs b/web/templates/settings/notification_settings.hbsindex bdd019343b9..40f1100fcdc 100644--- a/web/templates/settings/notification_settings.hbs+++ b/web/templates/settings/notification_settings.hbs@@ -152,23 +152,24 @@prefix=../prefix}}{{/each}}- <label for="{{prefix}}notification_sound">- {{t "Notification sound" }}- </label>-- <div class="input-group input-element-with-control {{#unless enable_sound_select}}control-label-disabled{{/unless}}">- <select name="notification_sound" class="setting_notification_sound prop-element settings_select bootstrap-focus-style" id="{{prefix}}notification_sound" data-setting-widget-type="string"- {{#unless enable_sound_select}}- disabled- {{/unless}}>- <option value="none">{{t "None" }}</option>- {{#each settings_object.available_notification_sounds}}- <option value="{{ this }}">{{ this }}</option>- {{/each}}- </select>- <span class="play_notification_sound">- <i class="notification-sound-icon fa fa-play-circle" aria-label="{{t 'Play sound' }}"></i>- </span>+ <div class="input-group">+ <label for="{{prefix}}notification_sound" class="settings-field-label">+ {{t "Notification sound" }}+ </label>+ <div class="input-element-with-control {{#unless enable_sound_select}}control-label-disabled{{/unless}}">+ <select name="notification_sound" class="setting_notification_sound prop-element settings_select bootstrap-focus-style" id="{{prefix}}notification_sound" data-setting-widget-type="string"+ {{#unless enable_sound_select}}+ disabled+ {{/unless}}>+ <option value="none">{{t "None" }}</option>+ {{#each settings_object.available_notification_sounds}}+ <option value="{{ this }}">{{ this }}</option>+ {{/each}}+ </select>+ <span class="play_notification_sound">+ <i class="notification-sound-icon fa fa-play-circle" aria-label="{{t 'Play sound' }}"></i>+ </span>+ </div></div><div class="input-group">