Skip to content

fix(boost): nest modern Settings headings under the page heading - #52629

Merged
xavier-lc merged 5 commits into
trunkfrom
fm/boost-716-settings-heading-level
Sep 25, 2026
Merged

xavier-lc merged 5 commits into
trunkfrom
fm/boost-716-settings-heading-level

Conversation

@LiamSarsfield

@LiamSarsfield LiamSarsfield commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Settings section headers: h2 → h3.
  • The "Customize pages list" card and toggle-less module rows: h3 → h4.
  • Ignore the generated routes/**/.content-entry.js, as other projects with routes already do.

Heading outline of the modern page:

Before After
h2 Optimize your speed h2 Optimize your speed
h2 Cornerstone pages h3 Cornerstone pages
h3 Customize pages list h4 Customize pages list
h2 Page loading / Code optimization / Images h3 Page loading / Code optimization / Images

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.

Before After
before after

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

  • Enable the modern Boost dashboard (rsm_jetpack_ui_modernization_boost filter) and open Jetpack → Boost.
  • Inspect the Settings section titles: they are h3 elements and look the same as on trunk.
  • Run pnpm test in projects/plugins/boost.

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.
@LiamSarsfield
LiamSarsfield requested a review from a team as a code owner September 22, 2026 14:18
@github-actions github-actions Bot added the [Plugin] Boost A feature to speed up the site and improve performance. label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Sep 22, 2026
@jp-launch-control

jp-launch-control Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

…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
@LiamSarsfield
LiamSarsfield marked this pull request as draft September 22, 2026 14:44
LiamSarsfield added a commit that referenced this pull request Sep 22, 2026
# Conflicts:
#	projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
LiamSarsfield added a commit that referenced this pull request Sep 22, 2026
# Conflicts:
#	projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
LiamSarsfield added a commit that referenced this pull request Sep 22, 2026
# Conflicts:
#	projects/plugins/boost/app/assets/src/js/pages/settings/settings.test.tsx
@xavier-lc
xavier-lc marked this pull request as ready for review September 25, 2026 11:10
@xavier-lc
xavier-lc requested a lite review from Copilot September 25, 2026 11:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

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 h2 to h3.
  • 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 /> }>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@xavier-lc xavier-lc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xavier-lc xavier-lc added the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 25, 2026
@xavier-lc
xavier-lc merged commit 39d8cd4 into trunk Sep 25, 2026
97 checks passed
@xavier-lc
xavier-lc deleted the fm/boost-716-settings-heading-level branch September 25, 2026 12:33
@github-actions github-actions Bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] Ready to Merge Go ahead, you can push that green button! [Status] In Progress labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Boost A feature to speed up the site and improve performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants