From 92c08fa29592c5a5bddb0ed05f9811e44631b0c7 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Thu, 23 Jul 2026 11:48:14 -0300 Subject: [PATCH 1/3] Forms: remove redundant boot import-map ordering workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Dashboard::fix_boot_import_map_ordering()` was a stopgap for FORMS-667, an import-map ordering race that blanked the wp-build dashboard when a plugin shifted classic→module script execution (e.g. The Events Calendar). The bundled @wordpress/build loader now defers `import("@wordpress/boot")` to DOMContentLoaded, so the importmap is always parsed before boot runs, regardless of emission order — making the workaround dead weight. Verified the bug no longer reproduces on WP 6.9 and 7.0 (workaround on and off, TEC active) across the modernized dashboards. No functional change. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../remove-forms-boot-importmap-workaround | 4 ++ .../forms/src/dashboard/class-dashboard.php | 61 ------------------- 2 files changed, 4 insertions(+), 61 deletions(-) create mode 100644 projects/packages/forms/changelog/remove-forms-boot-importmap-workaround diff --git a/projects/packages/forms/changelog/remove-forms-boot-importmap-workaround b/projects/packages/forms/changelog/remove-forms-boot-importmap-workaround new file mode 100644 index 000000000000..7b9c7041c690 --- /dev/null +++ b/projects/packages/forms/changelog/remove-forms-boot-importmap-workaround @@ -0,0 +1,4 @@ +Significance: patch +Type: removed + +Dashboard: remove the redundant boot import-map ordering workaround, now that the bundled @wordpress/build loader defers boot until DOMContentLoaded. No functional change. diff --git a/projects/packages/forms/src/dashboard/class-dashboard.php b/projects/packages/forms/src/dashboard/class-dashboard.php index 37dcdc905b48..4be6a5fcbe27 100644 --- a/projects/packages/forms/src/dashboard/class-dashboard.php +++ b/projects/packages/forms/src/dashboard/class-dashboard.php @@ -77,66 +77,6 @@ public static function load_wp_build() { ); } - /** - * Fix import map ordering for the wp-build boot script. - * - * In wp-admin, _wp_footer_scripts (classic scripts) and print_import_map - * both hook into admin_print_footer_scripts at priority 10, but - * _wp_footer_scripts is registered first. This causes the inline - * import("@wordpress/boot") to execute before the import map exists. - * - * This fix moves the import() call from the classic inline script to a - *