Repository navigation
fix(boost): nest modern Settings headings under the page heading - #52629
Conversation
The single-page dashboard renders Settings under its own "Optimize your speed" h2, so the section headings now sit one level below it. Rendering is unchanged: @wordpress/ui resets every heading level with the same rule.
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Boost plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
…itted by mistake: `projects/plugins/boost/routes/dashboard/.content-entry.js`. The build tool generates it, and the no-mistakes document step added it in commit c053b7d. It is not part of the heading change. - ESLint failed because the generated file does not end with a newline (prettier: "Insert ⏎"). - E2E: Build jetpack-boost failed because the build deletes the generated file. The job's checksum step then fails with `sha256sum: projects/plugins/boost/routes/dashboard/.content-entry.js: No such file or directory`, and the job exits with code 2. Fix: - Removed the file from git. - Added `/routes/**/.content-entry.js` to `projects/plugins/boost/.gitignore`. This is the same rule the other projects with routes use (jetpack, forms, my-jetpack, podcast and others). Boost was missing it, which is how the file got committed. Checked locally: - A regenerated `.content-entry.js` is now ignored by git. - ESLint with `--max-warnings=0` passes on every .tsx file this PR changes. I did not run the full E2E build locally. The heading changes themselves are not touched
# Conflicts: # projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
# Conflicts: # projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
# Conflicts: # projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add a test asserting that the “Customize pages list” heading is level 4.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates the modern Boost Settings heading hierarchy for accessibility without visual changes.
Changes:
- Changes Settings section headings from
h2toh3. - Changes nested card and module headings to
h4. - Updates tests, changelog, and generated-route ignores.
| File | Summary |
|---|---|
projects/plugins/boost/changelog/fix-boost-settings-heading-level |
Documents the accessibility fix. |
projects/plugins/boost/app/assets/src/js/pages/settings/settings.tsx |
Updates Settings section headings. |
projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx |
Tests the updated heading levels. |
projects/plugins/boost/app/assets/src/js/features/module/module.test.tsx |
Updates expected module heading levels. |
projects/plugins/boost/app/assets/src/js/features/module/module-row.tsx |
Changes toggle-less module headings to h4. |
projects/plugins/boost/app/assets/src/js/features/cornerstone-pages/cornerstone-pages-card.tsx |
Changes the customization card heading to h4; its level still needs a direct assertion. |
projects/plugins/boost/.gitignore |
Ignores generated route content files. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| </Text> | ||
| <CollapsibleCard.Root onOpenChange={ handleEditorToggle } data-settings-inset> | ||
| <CollapsibleCard.Header render={ <h3 /> }> | ||
| <CollapsibleCard.Header render={ <h4 /> }> |
There was a problem hiding this comment.
Added in 1233f53: cornerstone-pages-card.test.tsx now asserts a level-4 Customize pages list heading, and fails if the header is an h3 or not a heading. One correction: settings.test.tsx renders this card unmocked, but it starts collapsed, so role queries there skip it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFy6paf71rQJd2fcSNMSuK

Proposed changes
The modern Boost dashboard shows Settings under the "Optimize your speed" h2, but its section headers were also h2. This moves them down one level with no visual change.
routes/**/.content-entry.js, as other projects with routes already do.Heading outline of the modern page:
Visual check: full-page captures of trunk and this branch at 1280 and 782 px, LTR and RTL, modern and legacy. 7 of 8 pairs are pixel-identical; the eighth differs by one pixel that also differs between two captures of the same build. The compiled CSS is byte-identical, and the legacy dashboard's rendered HTML is unchanged.
Screenshots
Modern dashboard at 1440 px, Cornerstone pages expanded. Badges mark each heading's tag.
Without badges, before and after are pixel-identical.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
rsm_jetpack_ui_modernization_boostfilter) and open Jetpack → Boost.pnpm testinprojects/plugins/boost.