mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
sidebar_ui: Extract selectors for left sidebar headers.
This commit is contained in:
@@ -465,6 +465,17 @@ export function initialize_right_sidebar(): void {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_header_rows_selectors(): string {
|
||||||
|
return (
|
||||||
|
// Views header.
|
||||||
|
"#left-sidebar-navigation-area:not(.hidden-by-filters) #views-label-container, " +
|
||||||
|
// DM Headers
|
||||||
|
"#direct-messages-section-header, " +
|
||||||
|
// All channel headers.
|
||||||
|
".stream-list-section-container:not(.no-display) .stream-list-subsection-header"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function all_rows(): JQuery {
|
function all_rows(): JQuery {
|
||||||
// NOTE: This function is designed to be used for keyboard navigation purposes.
|
// NOTE: This function is designed to be used for keyboard navigation purposes.
|
||||||
// This function returns all the rows in the left sidebar.
|
// This function returns all the rows in the left sidebar.
|
||||||
@@ -474,12 +485,7 @@ function all_rows(): JQuery {
|
|||||||
".top_left_row, " +
|
".top_left_row, " +
|
||||||
// All DM and channel rows.
|
// All DM and channel rows.
|
||||||
".bottom_left_row, " +
|
".bottom_left_row, " +
|
||||||
// Views header.
|
get_header_rows_selectors(),
|
||||||
"#left-sidebar-navigation-area:not(.hidden-by-filters) #views-label-container, " +
|
|
||||||
// DM Headers
|
|
||||||
"#direct-messages-section-header, " +
|
|
||||||
// All channel headers.
|
|
||||||
".stream-list-section-container:not(.no-display) .stream-list-subsection-header",
|
|
||||||
).not(".hidden-by-filters");
|
).not(".hidden-by-filters");
|
||||||
// Remove rows hidden due to being inactive or muted.
|
// Remove rows hidden due to being inactive or muted.
|
||||||
const $inactive_or_muted_rows = $(
|
const $inactive_or_muted_rows = $(
|
||||||
|
|||||||
Reference in New Issue
Block a user