From a7b3f3395262ebc60f589326bd792bd259d7870e Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Fri, 2 Oct 2026 18:02:03 -0400 Subject: [PATCH] feat(web): Rotation, Operation History, Config Editor and Backup & Restore become ES-module pages (stage 2) (#727) Rotation, Operation History, Config Editor and Backup & Restore become ES-module pages (stage 2): no inline scripts or onclick in the four partials, delegated data-action listeners, reads cancelled on swap-out, old globals kept as deprecated aliases through window.LEDMatrix, and four new DOM suites. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 23 ++ docs/WEB_FRONTEND_ARCHITECTURE.md | 41 +- test/js/README.md | 4 + test/js/dom/test_backup_restore_page.js | 305 ++++++++++++++ test/js/dom/test_durations_page.js | 178 +++++++++ test/js/dom/test_operation_history_page.js | 231 +++++++++++ test/js/dom/test_raw_json_page.js | 187 +++++++++ test/js/run_all.js | 4 +- test/js/unit/test_core_modules.js | 4 + test/js/unit/test_html_escaping.js | 9 +- test/web_interface/test_es_modules.py | 71 +++- web_interface/static/v3/js/core/api.js | 5 + web_interface/static/v3/js/core/boot.js | 44 ++- .../static/v3/js/pages/backup-restore.js | 373 ++++++++++++++++++ web_interface/static/v3/js/pages/durations.js | 50 +++ .../static/v3/js/pages/operation-history.js | 283 +++++++++++++ web_interface/static/v3/js/pages/raw-json.js | 191 +++++++++ .../static/v3/js/widgets/plugin-order-list.js | 8 +- .../templates/v3/partials/backup_restore.html | 250 +----------- .../templates/v3/partials/durations.html | 36 +- .../v3/partials/operation_history.html | 308 +-------------- .../templates/v3/partials/raw_json.html | 233 +---------- 22 files changed, 2019 insertions(+), 819 deletions(-) create mode 100644 test/js/dom/test_backup_restore_page.js create mode 100644 test/js/dom/test_durations_page.js create mode 100644 test/js/dom/test_operation_history_page.js create mode 100644 test/js/dom/test_raw_json_page.js create mode 100644 web_interface/static/v3/js/pages/backup-restore.js create mode 100644 web_interface/static/v3/js/pages/durations.js create mode 100644 web_interface/static/v3/js/pages/operation-history.js create mode 100644 web_interface/static/v3/js/pages/raw-json.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 112d251e..533d73f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,29 @@ accepts both, but the store flags the old spelling as deprecated ## Unreleased +### Web UI: four more tabs are ES-module pages (stage 2) + +- Rotation, Operation History, Config Editor and Backup & Restore follow the + Cache tab (#703): each partial's inline ` diff --git a/web_interface/templates/v3/partials/durations.html b/web_interface/templates/v3/partials/durations.html index 5c47266f..1c569605 100644 --- a/web_interface/templates/v3/partials/durations.html +++ b/web_interface/templates/v3/partials/durations.html @@ -1,5 +1,8 @@ {% import 'v3/partials/_macros.html' as ui %} -
+{# No inline script: static/v3/js/pages/durations.js starts the rotation-order + list. The page registry (static/v3/js/core/registry.js) starts it when this + root appears and stops it when the partial is swapped away. #} +

Rotation & Durations

Set the order plugins rotate on the display and how long each screen is shown. Durations are in seconds.

@@ -77,34 +80,3 @@
- - diff --git a/web_interface/templates/v3/partials/operation_history.html b/web_interface/templates/v3/partials/operation_history.html index 4fc80e4e..5a676f35 100644 --- a/web_interface/templates/v3/partials/operation_history.html +++ b/web_interface/templates/v3/partials/operation_history.html @@ -1,4 +1,7 @@ -
+{# No inline script: static/v3/js/pages/operation-history.js runs this page. + The page registry (static/v3/js/core/registry.js) starts it when this root + appears and stops it when the partial is swapped away. #} +

Operation History

View history of plugin operations and configuration changes for debugging and auditing.

@@ -39,12 +42,12 @@
- -
@@ -81,307 +84,12 @@ Showing 0 to 0 of 0 operations
- -
- - diff --git a/web_interface/templates/v3/partials/raw_json.html b/web_interface/templates/v3/partials/raw_json.html index 01c2a5fc..85385750 100644 --- a/web_interface/templates/v3/partials/raw_json.html +++ b/web_interface/templates/v3/partials/raw_json.html @@ -1,4 +1,8 @@ -
+{# No inline script: static/v3/js/pages/raw-json.js runs this page. Its buttons + name an action and an editor (data-action, data-editor) for one delegated + listener. The page registry (static/v3/js/core/registry.js) starts it when + this root appears and stops it when the partial is swapped away. #} +
@@ -8,17 +12,17 @@

{{ main_config_path }}

- - -
- - -
- - -