css: Rename .focused_table to .focused-message-list.

This commit is contained in:
Karl Stolley 2023-08-16 10:47:06 -05:00 committed by Tim Abbott
parent e68af8a48d
commit c741c43800
7 changed files with 14 additions and 12 deletions

View File

@ -248,7 +248,7 @@
<div id="loading_older_messages_indicator"></div> <div id="loading_older_messages_indicator"></div>
<div id="page_loading_indicator"></div> <div id="page_loading_indicator"></div>
<div id="message_feed_errors_container"></div> <div id="message_feed_errors_container"></div>
<div class="message_table focused_table" id="zhome" role="list" aria-live="polite" aria-label="{{ _('Messages') }}"> <div class="message_table focused-message-list" id="zhome" role="list" aria-live="polite" aria-label="{{ _('Messages') }}">
</div> </div>
<div class="message_table" id="zfilt" role="list" aria-live="polite" aria-label="{{ _('Messages') }}"> <div class="message_table" id="zfilt" role="list" aria-live="polite" aria-label="{{ _('Messages') }}">
</div> </div>

View File

@ -176,7 +176,9 @@ export function clear_for_testing() {
export function render_lightbox_list_images(preview_source) { export function render_lightbox_list_images(preview_source) {
if (!is_open) { if (!is_open) {
const images = Array.prototype.slice.call($(".focused_table .message_inline_image img")); const images = Array.prototype.slice.call(
$(".focused-message-list .message_inline_image img"),
);
const $image_list = $("#lightbox_overlay .image-list").empty(); const $image_list = $("#lightbox_overlay .image-list").empty();
for (const img of images) { for (const img of images) {

View File

@ -121,7 +121,7 @@ export function initialize() {
} }
const config = {attributes: false, childList: true, subtree: true}; const config = {attributes: false, childList: true, subtree: true};
const target = $elem.parents(".message_table.focused_table").get(0); const target = $elem.parents(".message_table.focused-message-list").get(0);
const nodes_to_check_for_removal = [ const nodes_to_check_for_removal = [
$elem.parents(".recipient_row").get(0), $elem.parents(".recipient_row").get(0),
$elem.parents(".message_reactions").get(0), $elem.parents(".message_reactions").get(0),

View File

@ -465,8 +465,8 @@ export function activate(raw_operators, opts) {
// the view right as it's being shown, because we rely on message_lists.current // the view right as it's being shown, because we rely on message_lists.current
// being shown for deciding when to condense messages. // being shown for deciding when to condense messages.
$("body").addClass("narrowed_view"); $("body").addClass("narrowed_view");
$("#zfilt").addClass("focused_table"); $("#zfilt").addClass("focused-message-list");
$("#zhome").removeClass("focused_table"); $("#zhome").removeClass("focused-message-list");
message_lists.set_current(msg_list); message_lists.set_current(msg_list);
@ -1056,8 +1056,8 @@ export function deactivate(coming_from_recent_topics = false, is_actively_scroll
has_shown_message_list_view = true; has_shown_message_list_view = true;
$("body").removeClass("narrowed_view"); $("body").removeClass("narrowed_view");
$("#zfilt").removeClass("focused_table"); $("#zfilt").removeClass("focused-message-list");
$("#zhome").addClass("focused_table"); $("#zhome").addClass("focused-message-list");
message_lists.set_current(message_lists.home); message_lists.set_current(message_lists.home);
message_lists.current.resume_reading(); message_lists.current.resume_reading();
condense.condense_and_collapse($("#zhome div.message_row")); condense.condense_and_collapse($("#zhome div.message_row"));

View File

@ -39,11 +39,11 @@ export function prev_visible($message_row) {
} }
export function first_visible() { export function first_visible() {
return $(".focused_table .selectable_row").first(); return $(".focused-message-list .selectable_row").first();
} }
export function last_visible() { export function last_visible() {
return $(".focused_table .selectable_row").last(); return $(".focused-message-list .selectable_row").last();
} }
export function visible_range(start_id, end_id) { export function visible_range(start_id, end_id) {

View File

@ -1690,7 +1690,7 @@ div.message_table {
width: 100%; width: 100%;
} }
div.focused_table { div.focused-message-list {
display: block; display: block;
} }

View File

@ -53,7 +53,7 @@ test("pan_and_zoom", ({override}) => {
return "message-stub"; return "message-stub";
}; };
$.create(".focused_table .message_inline_image img", {children: []}); $.create(".focused-message-list .message_inline_image img", {children: []});
const open_image = lightbox.build_open_image_function(); const open_image = lightbox.build_open_image_function();
open_image($img); open_image($img);
@ -86,7 +86,7 @@ test("youtube", ({override}) => {
$link.closest = () => $msg; $link.closest = () => $msg;
$link.attr("href", href); $link.attr("href", href);
$.create(".focused_table .message_inline_image img", {children: []}); $.create(".focused-message-list .message_inline_image img", {children: []});
const open_image = lightbox.build_open_image_function(); const open_image = lightbox.build_open_image_function();
open_image($img); open_image($img);