Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/wp-build/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fixes

- Pages: preserve the Core Boot layout compatibility class in generated wp-admin page templates so short pages fill the viewport when using Core's bundled Boot module ([#82112](https://github.com/WordPress/gutenberg/pull/82112)).

## 0.22.0 (2026-08-26)

### Internal
Expand Down
16 changes: 16 additions & 0 deletions packages/wp-build/lib/test/php-generator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { renderTemplateToString as generateTemplate } from '../php-generator.mjs';

describe( 'page-wp-admin.php template', () => {
it( 'retains the Core Boot compatibility class on the mount element', async () => {
const generatedPage = await generateTemplate(
'page-wp-admin.php.template',
{
'{{PAGE_SLUG}}': 'example',
}
);

expect( generatedPage ).toContain(
'<div id="example-wp-admin-app" class="boot-layout-container"></div>'
);
} );
} );
8 changes: 6 additions & 2 deletions packages/wp-build/templates/page-wp-admin.php.template
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,14 @@ function {{PREFIX}}_{{PAGE_SLUG_UNDERSCORE}}_wp_admin_render_page() {
);
?>
</div>
<div id="{{PAGE_SLUG}}-wp-admin-app"></div>
<?php
// Core's pre-CSS Modules Boot layout uses this class for viewport sizing.
// Remove it when the minimum supported WordPress version includes the Boot
// changes from Gutenberg #81756.
?>
<div id="{{PAGE_SLUG}}-wp-admin-app" class="boot-layout-container"></div>
<?php
}

// Hook the enqueue function to admin_enqueue_scripts
add_action( 'admin_enqueue_scripts', '{{PREFIX}}_{{PAGE_SLUG_UNDERSCORE}}_wp_admin_enqueue_scripts' );

Loading