popup_banners: Redesign connection banner to use new banner component.

This commit serves as the base commit for redesigning the alert banners
by migrating them to use the new banner component. We use a new name
to refer to these banners — "Popup banners", which is more descriptive
about their behavior.

The Popup banners are appended to the container in a stacking order,
i.e., the most recent popup banner appears on the top and the oldest one
is sent to the bottom of the stack. These banners also inherit the
animations from the alert banners for visual appeal.

This commit also fixes the bug where clicking on the "Try now" button
in the popup banner resulting from an error in the `/json/messages`
endpoint resulted in call to restart_get_events in server_events.js
instead of load_messages in message_fetch.ts.

Fixes #31282.
This commit is contained in:
Sayam Samal
2025-03-05 11:33:36 +05:30
committed by Tim Abbott
parent cd08c628ba
commit 3275fcc96e
9 changed files with 159 additions and 38 deletions

View File

@@ -23,10 +23,8 @@ page_params.test_suite = false;
// we also directly write to pointer
set_global("pointer", {});
mock_esm("../src/ui_report", {
hide_error() {
return false;
},
mock_esm("../src/popup_banners", {
close_connection_error_popup_banner() {},
});
mock_esm("../src/stream_events", {