wp-build: Render the no-JS fallback in the generated page templates - #81365
Conversation
bcff325 to
b5c19f4
Compare
| <?php | ||
| // END see wp-admin/admin-header.php | ||
| ?> | ||
| <div class="wrap hide-if-js" style="margin: 20px;"> |
There was a problem hiding this comment.
This page builds its own <body> instead of going through admin-header.php, so there is no #wpbody-content to supply the padding that .wrap relies on for its inline-start spacing. Without the inline margin the heading and notice sit flush against the viewport edge.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
dd6ed7e to
1fb9936
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 1fb9936. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31312294087 As a user I want to be able to create a navigation overlay for a specific navigation block in
|
youknowriad
left a comment
There was a problem hiding this comment.
Appreciate the follow-up, this makes sense to me.
…81365) * wp-build: Render the no-JS fallback in the generated page templates Co-Authored-By: Claude <noreply@anthropic.com> * Condense the no-JS fallback changelog entries into one Co-Authored-By: Claude <noreply@anthropic.com> * Add the Core backport changelog entry for the no-JS fallback templates Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
What?
Renders the heading and the "requires JavaScript" notice from the generated page templates, so every wp-build page gets the no-JS fallback automatically.
Why?
Trac #65690 added the notice to the Connectors and Font Library pages individually. More wp-build based pages will be added over time, and each one would have to repeat the same markup. Defining it in the template itself removes that duplication.
How?
Both page templates now render a
.wrap.hide-if-jsblock with the page heading and an error notice, right before the app mount point.page.php.templateneeded one extra fix. It only ports the<head>part ofadmin-header.php, so<body>never received theno-jsclass or the script that swaps it forjs. Without them.hide-if-jsand.hide-if-no-jsnever worked on those pages.No text domain is passed. These files are bundled into Core, where the default domain is correct. Strings in that directory are extracted:
wp-includes/build/already has 110 translatable strings on GlotPress.Testing Instructions
Screenshots or screencast
Before
After
Use of AI Tools
Authored with Claude Code. The code, this description, and the GlotPress and Core references above were produced by the tool and reviewed by me.