settings-preferences: Create left sidebar section.

This commit removes the following settings from the Settings/Preferences
Information section and adds a new section in the Settings/Preferences
called as Left Sidebar section:

- Show unread counts for
- Show unread count total on home view
- Show counts for starred messages
- Group channels by folder in the left sidebar
- Hide inactive channels

Fixes #35601.
This commit is contained in:
Maneesh Shukla
2025-08-05 14:08:17 +05:30
committed by Tim Abbott
parent 8b059ec025
commit 15f2c65986
7 changed files with 51 additions and 43 deletions

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}

View File

@@ -8,4 +8,6 @@
{{>preferences_navigation .}}
{{>preferences_information .}}
{{>preferences_left_sidebar .}}
</form>

View File

@@ -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

View File

@@ -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>