Skip to content

Protect Dashboard: Link straight to a section's settings card - #53743

Merged
kraftbj merged 5 commits into
trunkfrom
add/protect-settings-section-links-JETPACK-2886
Oct 19, 2026
Merged

kraftbj merged 5 commits into
trunkfrom
add/protect-settings-section-links-JETPACK-2886

Conversation

@kraftbj

@kraftbj kraftbj commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Part of JETPACK-2886

Proposed changes

  • The Protect page's Settings tab opens at a card when the URL carries section, e.g. ?tab=settings&section=firewall. It scrolls the card in just below the sticky tab strip and moves focus to the card's heading. That happens once per arrival, so a later save doesn't pull the page back.
  • Dashboard::get_settings_url( $section ) builds those links. Dashboard::get_module_settings_urls() maps each security module (waf, protect, account-protection, sso, monitor) to its card, for the screens in the two PRs stacked on this one (PR 53744 and PR 53745).
  • While the dashboard is on, those five modules' Configure links (jetpack_module_configuration_url_*) point at their card. Firewall and Account protection get a Configure link they didn't have.
  • The Overview cards' own Configure links land on their card instead of the top of the Settings tab.

Nothing changes with the jetpack-protect-dashboard flag off.

Related product discussion/links

  • JETPACK-2886. Which surfaces link where comes from the settings map in JETPACK-2873.
  • Draft PRs 53744 (My Jetpack) and 53745 (Jetpack modules list) are stacked on this one and use its links.

Does this pull request change what data or activity we track or use?

No.

Testing instructions

On a connected site with the jetpack-protect-dashboard flag on and the protect-dashboard module active:

  • Go to Jetpack › Protect. On Overview, with Downtime monitoring on, click "Configure downtime monitoring", "Configure Firewall" and "Configure login protection" in turn. Each lands on Settings with that card's title just under the tab strip and the title focused.
  • Load wp-admin/admin.php?page=jetpack-protect&p=%2F%3Ftab%3Dsettings%26section%3Dmonitor directly. Same result.
  • Switch to Overview and back to Settings. The page stays at the top.
  • Go to Jetpack › Modules (admin.php?page=jetpack_modules). Firewall, Brute Force Protection, Account Protection, Downtime Monitor and Secure Sign On all have a Configure link that opens their card.

Arriving from a link to the Monitor card:

Settings tab opened at the Monitor card

Add a `section` search param that the Settings tab scrolls to and focuses, a
Dashboard::get_settings_url() helper that builds those links, and point the
Configure links of the five security modules at their card. The overview
cards' own Configure links now land on their card too.
@kraftbj kraftbj added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Protect Also known as Brute Force Attack Protection [Status] Needs Review This PR is ready for review. labels Oct 16, 2026
@kraftbj kraftbj self-assigned this Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the add/protect-settings-section-links-JETPACK-2886 branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/protect-settings-section-links-JETPACK-2886

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

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!

@kraftbj
kraftbj added this pull request to stack #53746 October 16, 2026 19:41
@jp-launch-control

jp-launch-control Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 6 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/protect/routes/dashboard/sections/firewall/overview-card.tsx 56/64 (87.50%) 0.20% 0 💚
projects/packages/protect/routes/dashboard/sections/login-protection/login-protection-card.tsx 19/20 (95.00%) 0.26% 0 💚
projects/packages/protect/routes/dashboard/sections/monitor/monitor-card.tsx 60/61 (98.36%) 0.03% 0 💚
projects/packages/protect/routes/dashboard/stage.tsx 21/23 (91.30%) 0.40% 0 💚
projects/packages/protect/src/class-dashboard.php 88/117 (75.21%) 2.57% 0 💚

Full summary · PHP report · JS report

@kraftbj
kraftbj requested a review from enejb October 19, 2026 16:39
…-section-links-JETPACK-2886

# Conflicts:
#	projects/packages/protect/routes/dashboard/sections/monitor/monitor-card.tsx
@kraftbj
kraftbj merged commit 4826024 into trunk Oct 19, 2026
86 checks passed
@kraftbj
kraftbj deleted the add/protect-settings-section-links-JETPACK-2886 branch October 19, 2026 20:59
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Review This PR is ready for review. labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Protect Also known as Brute Force Attack Protection [Package] Protect [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant