display_settings: Rename `get_all_preferences`.

We've renamed `get_all_preferences` to
`information_section_checkbox_group`. We've also converted it from a
function into a dictionary since it doesn't contain any page_params
variables anymore. This is a preparatory commit for adding a new
`Information section` as part of a layout change for this page.
This commit is contained in:
Shubham Padia 2024-07-11 06:39:46 +00:00 committed by Tim Abbott
parent 39af05f475
commit b44fd5365c
5 changed files with 6 additions and 6 deletions

View File

@ -197,7 +197,7 @@ export function build_page() {
color_scheme_values: settings_config.color_scheme_values,
web_home_view_values: settings_config.web_home_view_values,
settings_object: realm_user_settings_defaults,
display_settings: settings_config.get_all_preferences(),
information_section_checkbox_group: settings_config.information_section_checkbox_group,
information_density_settings: settings_config.get_information_density_preferences(),
settings_render_only: settings_config.get_settings_render_only(),
settings_label: settings_config.realm_user_settings_defaults_labels,

View File

@ -119,7 +119,7 @@ export function build_page() {
desktop_icon_count_display_values: settings_config.desktop_icon_count_display_values,
show_push_notifications_tooltip:
settings_config.all_notifications(user_settings).show_push_notifications_tooltip,
display_settings: settings_config.get_all_preferences(),
information_section_checkbox_group: settings_config.information_section_checkbox_group,
information_density_settings: settings_config.get_information_density_preferences(),
settings_render_only: settings_config.get_settings_render_only(),
user_can_change_name: settings_data.user_can_change_name(),

View File

@ -148,7 +148,7 @@ export type DisplaySettings = {
};
/* istanbul ignore next */
export const get_all_preferences = (): DisplaySettings => ({
export const information_section_checkbox_group: DisplaySettings = {
settings: {
user_display_settings: [
"starred_message_counts",
@ -156,7 +156,7 @@ export const get_all_preferences = (): DisplaySettings => ({
"fluid_layout_width",
],
},
});
};
/* istanbul ignore next */
export const get_information_density_preferences = (): DisplaySettings => ({

View File

@ -189,7 +189,7 @@
</select>
</div>
{{#each display_settings.settings.user_display_settings}}
{{#each information_section_checkbox_group.settings.user_display_settings}}
{{> settings_checkbox
setting_name=this
is_checked=(lookup ../settings_object this)

View File

@ -92,7 +92,7 @@ run_test("tr_tag", ({mock_template}) => {
information_density_settings: {
settings: {},
},
display_settings: {
information_section_checkbox_group: {
settings: {},
},
notification_settings: {},