Repository navigation
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
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! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 2 files.
Full summary · PHP report · JS report Coverage check overridden by
Covered by non-unit tests
|
- Remove the setup screens and their images: the dashboard only registers once the site and user are connected, so need_setup is never set. - Send Tracks events through the jp-tracks queue; jetpack-analytics drops calypso_* events, so none were recorded. - Stop refetching on window focus while the admin shell hides the dashboard, and load the gridicons sprite only when the campaign widget opens. - Recompute the router's active state from the URL instead of pairing shell events. - Share the dashboard-enabled check between the menu and the shell member. - Trim unused footer, logo, page view tracker, blank canvas and state helpers, and reuse the build script in build-production.
Fixes #
Proposed changes
The Blaze Ads dashboard (Jetpack → Blaze Ads) no longer loads its app from WordPress.com (
widgets.wp.com/blaze-dashboard). It is now a wp-build page bundled withpackages/blaze, built the same way as Activity Log, and it joins the Jetpack admin shell.packages/blaze/src/dashboard. This includes thepromote-post-i2screens, thepromote-postdata hooks,lib/promote-postand the BlazePress widget wrapper. Calypso's setup screens (disconnected, private or ineligible site) are not ported: the dashboard only registers once the site and user are connected. Behavior and routes are unchanged; existing links such asadmin.php?page=advertising#!/advertising/posts/promote/post-1/<site>keep working.jetpack/v4/blaze-app/..., now throughapiFetch. The campaign creation widget still loads fromdsp.wp.com/widget.js.compat/layer: config, a hashbang router, a read-only site/user store, Tracks, and awpcom.req-compatible request client. No Redux,i18n-calypsoor calypso-router.AdminPagefrom@automattic/jetpack-components(same header and footer as the other Jetpack dashboards).@wordpress/uiequivalents: Tabs, Notice, EmptyState, Badge, Button, Dialog/AlertDialog, Popover, Tooltip, InputControl, SelectControl, Skeleton and Link. The status/type filters useToggleGroupControlfrom@wordpress/components.--wpds-*tokens.@wordpress/i18nwith thejetpack-blazedomain. The remote widget's own strings are registered verbatim so itstranslateFnstill finds them.Dashboardloads the wp-build page under the sameadvertisingslug, with the same config data (nowwindow.jetpackBlazeDashboardConfig). It falls back to the remote dashboard only when the build output is missing.Blaze::init()registers the page as an admin shell member.Related product discussion/links
Does this pull request change what data or activity we track or use?
No. The same Tracks events are recorded (
calypso_dsp_*,calypso_page_viewwith the DSP origin), now pushed to the Tracks queue thatjp-tracksloads (@automattic/jetpack-analyticsdrops events that don't start withjetpack_).Testing instructions
Use a site with Jetpack connected and Blaze available (Jurassic Ninja works). Build the package with
jp build --deps packages/blazeor the Jetpack plugin.#!/advertising/campaigns/<site>), and Back/Forward work.wp-admin/admin.php?page=advertising#!/advertising/posts/promote/post-1/<your-site>. It opens the widget directly, as before.add_filter( 'jetpack_admin_shell_enabled', '__return_true' );). Open Activity Log, then Blaze Ads from the menu. Blaze opens without a page load, and switching back and forth keeps the selected tab.Run the rehearsals below from Tools → Rehearsal on any JN site. Each fails on trunk at its first step, because the dashboard there is the remote Calypso build, and passes on this branch.
Rehearsal: Blaze Ads: Dashboard lists posts ready to promote
Rehearsal
6b33de7· 6 steps · coverspackages/blazeLast run: Passed in Playwright on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #54, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while fortunately-brave-hoverfly.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/blaze" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/wp-admin/admin.php?page=advertising" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app .promote-post-i2__page", "toContainText": "Blaze Ads" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app [role=tab][aria-selected=true]", "toContainText": "Ready to promote" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Hello world!\")", "toContainText": "Promote" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app .campaigns-total-stats__container", "toContainText": "Total ad views" }, { "expectNoConsoleErrors": true } ] }Rehearsal: Blaze Ads: Tabs switch between posts, campaigns and payments
Rehearsal
118f566· 11 steps · coverspackages/blazeLast run: Passed in Playwright on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #56, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while fortunately-brave-hoverfly.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/blaze" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/wp-admin/admin.php?page=advertising" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app [role=tab][aria-selected=true]", "toContainText": "Ready to promote" }, { "click": "#jetpack-blaze-dashboard-wp-admin-app [role=tab]:has-text(\"Campaigns\")" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app [role=tab][aria-selected=true]", "toContainText": "Campaigns" }, { "expectText": "Recently published", "in": "#jetpack-blaze-dashboard-wp-admin-app .promote-post-i2__page-body" }, { "click": "#jetpack-blaze-dashboard-wp-admin-app [role=tab]:has-text(\"Payments\")" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app [role=tab][aria-selected=true]", "toContainText": "Payments" }, { "expectText": "Current site", "in": "#jetpack-blaze-dashboard-wp-admin-app .promote-post-i2__page-body" }, { "click": "#jetpack-blaze-dashboard-wp-admin-app [role=tab]:has-text(\"Ready to promote\")" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Hello world!\")", "toBeVisible": true }, { "expectNoConsoleErrors": true } ] }Rehearsal: Blaze Ads: Promote opens the campaign widget and quitting returns to the list
Rehearsal
3c22777· 9 steps · coverspackages/blazeLast run: Passed in Playwright on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #55, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while fortunately-brave-hoverfly.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/blaze" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/wp-admin/admin.php?page=advertising" }, { "click": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Hello world!\") button:has-text(\"Promote\")" }, { "expect": ".blazepress-widget__header-bar", "toContainText": "Jetpack powered" }, { "expect": ".blazepress-widget__widget-container", "toContainText": "Get started", "timeout": 45000 }, { "click": ".blazepress-widget__header-bar button:has-text(\"Back\")" }, { "expect": ".blazepress-widget__cancel-dialog", "toContainText": "Are you sure you want to quit?" }, { "click": ".blazepress-widget__cancel-dialog button:has-text(\"Yes, quit\")" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Hello world!\")", "toBeVisible": true }, { "expectNoConsoleErrors": { "ignore": [ "dsp\\.wp\\.com", "stripe" ] } } ] }Rehearsal: Blaze Ads: Searching the posts list filters it
Rehearsal
68e8337· 6 steps · coverspackages/blazeLast run: Passed in Playwright on WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5, run #57, 2026-11-27.
View or install this rehearsal · JSON · Playwright test (links work while fortunately-brave-hoverfly.jurassic.ninja exists)
Rehearsal JSON
{ "format": 2, "requires": [ "jetpack" ], "covers": [ "packages/blaze" ], "viewport": "desktop", "timeout": 30000, "steps": [ { "goto": "/wp-admin/admin.php?page=advertising" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Sample Page\")", "toBeVisible": true }, { "fill": "#jetpack-blaze-dashboard-wp-admin-app input[type=search]", "value": "Hello" }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Sample Page\")", "toHaveCount": 0 }, { "expect": "#jetpack-blaze-dashboard-wp-admin-app tr:has-text(\"Hello world!\")", "toBeVisible": true }, { "expectNoConsoleErrors": true } ] }