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.

settings-preferences: Create left sidebar section.

Maneesh Shukla15f2c659866c
diff --git a/help/channel-folders.md b/help/channel-folders.md
index 164c2ced187..dfec7b78cf4 100644
--- a/help/channel-folders.md
+++ b/help/channel-folders.md
@@ -14,7 +14,7 @@
{settings_tab|preferences}
-1. Under **Information**, toggle **Group channels by folder in the left
+1. Under **Left sidebar**, toggle **Group channels by folder in the left
sidebar**.
{end_tabs}
diff --git a/help/configure-unread-message-counters.md b/help/configure-unread-message-counters.md
index 57ae8586e40..88e84b6a36e 100644
--- a/help/configure-unread-message-counters.md
+++ b/help/configure-unread-message-counters.md
@@ -19,7 +19,7 @@ opening it.
{settings_tab|preferences}
-1. Under **Information**, select your preferred option from the
+1. Under **Left sidebar**, select your preferred option from the
**Show unread counts for** dropdown.
{end_tabs}
@@ -46,7 +46,7 @@ on your home view will also be shown when you're in that view.
{settings_tab|preferences}
-1. Under **Information**, toggle **Show unread count total on home view**.
+1. Under **Left sidebar**, toggle **Show unread count total on home view**.
{end_tabs}
diff --git a/help/manage-inactive-channels.md b/help/manage-inactive-channels.md
index 3f9513a7fa6..4a05f037b4a 100644
--- a/help/manage-inactive-channels.md
+++ b/help/manage-inactive-channels.md
@@ -48,7 +48,7 @@ channels if you need to access them.
{settings_tab|preferences}
-1. Under **Information**, configure **Hide inactive channels**.
+1. Under **Left sidebar**, configure **Hide inactive channels**.
{end_tabs}
diff --git a/help/star-a-message.md b/help/star-a-message.md
index 332aec260f6..cb784cb2203 100644
--- a/help/star-a-message.md
+++ b/help/star-a-message.md
@@ -94,7 +94,7 @@ can disable that feature.
{settings_tab|preferences}
-1. Under **Information**, toggle **Show counts for starred messages**.
+1. Under **Left sidebar**, toggle **Show counts for starred messages**.
{end_tabs}
diff --git a/web/templates/settings/preferences.hbs b/web/templates/settings/preferences.hbs
index 5c2bf0fb661..935e8badfa2 100644
--- a/web/templates/settings/preferences.hbs
+++ b/web/templates/settings/preferences.hbs
@@ -8,4 +8,6 @@
{{>preferences_navigation .}}
{{>preferences_information .}}
+
+ {{>preferences_left_sidebar .}}
</form>
diff --git a/web/templates/settings/preferences_information.hbs b/web/templates/settings/preferences_information.hbs
index 0e55556eb0d..b7b655076dd 100644
--- a/web/templates/settings/preferences_information.hbs
+++ b/web/templates/settings/preferences_information.hbs
@@ -56,27 +56,6 @@
</select>
</div>
- <div class="input-group">
- <label for="{{prefix}}web_stream_unreads_count_display_policy" class="settings-field-label">{{t "Show unread counts for" }}</label>
- <select name="web_stream_unreads_count_display_policy" class="setting_web_stream_unreads_count_display_policy prop-element bootstrap-focus-style settings_select" id="{{prefix}}web_stream_unreads_count_display_policy" data-setting-widget-type="number">
- {{> dropdown_options_widget option_values=web_stream_unreads_count_display_policy_values}}
- </select>
- </div>
-
- {{> settings_checkbox
- setting_name="web_left_sidebar_unreads_count_summary"
- is_checked=settings_object.web_left_sidebar_unreads_count_summary
- label=settings_label.web_left_sidebar_unreads_count_summary
- render_only=settings_render_only.web_left_sidebar_unreads_count_summary
- prefix=prefix}}
-
- {{> settings_checkbox
- setting_name="starred_message_counts"
- is_checked=settings_object.starred_message_counts
- label=settings_label.starred_message_counts
- render_only=settings_render_only.starred_message_counts
- prefix=prefix}}
-
{{> settings_checkbox
setting_name="receives_typing_notifications"
is_checked=settings_object.receives_typing_notifications
@@ -98,23 +77,6 @@
render_only=settings_render_only.fluid_layout_width
prefix=prefix}}
- {{> settings_checkbox
- setting_name="web_left_sidebar_show_channel_folders"
- is_checked=settings_object.web_left_sidebar_show_channel_folders
- label=settings_label.web_left_sidebar_show_channel_folders
- render_only=settings_render_only.web_left_sidebar_show_channel_folders
- help_link="/help/channel-folders"
- prefix=prefix}}
-
- <div class="input-group">
- <label for="{{prefix}}demote_inactive_streams" class="settings-field-label">{{t "Hide inactive channels" }}
- {{> ../help_link_widget link="/help/manage-inactive-channels" }}
- </label>
- <select name="demote_inactive_streams" class="setting_demote_inactive_streams prop-element settings_select bootstrap-focus-style" id="{{prefix}}demote_inactive_streams" data-setting-widget-type="number">
- {{> dropdown_options_widget option_values=demote_inactive_streams_values}}
- </select>
- </div>
-
{{> settings_checkbox
setting_name="high_contrast_mode"
is_checked=settings_object.high_contrast_mode
diff --git a/web/templates/settings/preferences_left_sidebar.hbs b/web/templates/settings/preferences_left_sidebar.hbs
new file mode 100644
index 00000000000..3a17f17ce0f
--- /dev/null
+++ b/web/templates/settings/preferences_left_sidebar.hbs
@@ -0,0 +1,44 @@
+<div class="left-sidebar-settings {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">
+ <div class="subsection-header">
+ <h3 class="light">{{t "Left sidebar" }}</h3>
+ {{> settings_save_discard_widget section_name="left-sidebar-settings" show_only_indicator=(not for_realm_settings) }}
+ </div>
+
+ <div class="input-group">
+ <label for="{{prefix}}web_stream_unreads_count_display_policy" class="settings-field-label">{{t "Show unread counts for" }}</label>
+ <select name="web_stream_unreads_count_display_policy" class="setting_web_stream_unreads_count_display_policy prop-element bootstrap-focus-style settings_select" id="{{prefix}}web_stream_unreads_count_display_policy" data-setting-widget-type="number">
+ {{> dropdown_options_widget option_values=web_stream_unreads_count_display_policy_values}}
+ </select>
+ </div>
+
+ {{> settings_checkbox
+ setting_name="web_left_sidebar_unreads_count_summary"
+ is_checked=settings_object.web_left_sidebar_unreads_count_summary
+ label=settings_label.web_left_sidebar_unreads_count_summary
+ render_only=settings_render_only.web_left_sidebar_unreads_count_summary
+ prefix=prefix}}
+
+ {{> settings_checkbox
+ setting_name="starred_message_counts"
+ is_checked=settings_object.starred_message_counts
+ label=settings_label.starred_message_counts
+ render_only=settings_render_only.starred_message_counts
+ prefix=prefix}}
+
+ {{> settings_checkbox
+ setting_name="web_left_sidebar_show_channel_folders"
+ is_checked=settings_object.web_left_sidebar_show_channel_folders
+ label=settings_label.web_left_sidebar_show_channel_folders
+ render_only=settings_render_only.web_left_sidebar_show_channel_folders
+ help_link="/help/channel-folders"
+ prefix=prefix}}
+
+ <div class="input-group">
+ <label for="{{prefix}}demote_inactive_streams" class="settings-field-label">{{t "Hide inactive channels" }}
+ {{> ../help_link_widget link="/help/manage-inactive-channels" }}
+ </label>
+ <select name="demote_inactive_streams" class="setting_demote_inactive_streams prop-element settings_select bootstrap-focus-style" id="{{prefix}}demote_inactive_streams" data-setting-widget-type="number">
+ {{> dropdown_options_widget option_values=demote_inactive_streams_values}}
+ </select>
+ </div>
+</div>