Skip to content

Newsletter: Drop dead admin-ui build-style import; pin admin-ui 2.1.0#49007

Merged
dhasilva merged 2 commits into
trunkfrom
fix/newsletter-admin-ui-scss-import
May 22, 2026
Merged

Newsletter: Drop dead admin-ui build-style import; pin admin-ui 2.1.0#49007
dhasilva merged 2 commits into
trunkfrom
fix/newsletter-admin-ui-scss-import

Conversation

@CGastrell
Copy link
Copy Markdown
Contributor

Proposed changes

Consumer-side adaptation for @wordpress/admin-ui 2.x in the Newsletter package. The dashboard SCSS currently @includes a stylesheet that no longer exists in admin-ui 2.x:

@include meta.load-css("@wordpress/admin-ui/build-style/style.css");

admin-ui 2.x ships its CSS via runtime DOM injection from the JS module — the build-style/ directory was removed from the package's exports. Once @wordpress/admin-ui is bumped, the SCSS pipeline 404s on that import and the dashboard build fails.

Two changes:

  • Drop the dead meta.load-css line in projects/packages/newsletter/routes/dashboard/route.scss and leave a brief comment explaining why. The @wordpress/dataviews/build-style/style.css import next to it stays — dataviews still ships that file and the import is correct.
  • Bump @wordpress/admin-ui in projects/packages/newsletter/package.json from 1.12.0 to 2.1.0. The package's <AdminPage> use is through @automattic/jetpack-components, which already targets admin-ui 2.x — this is just the consumer-side declaration.

This mirrors the precedent fix landed for packages/scan in commit 626cb33ea84 (#48410). This is not the monorepo-wide bump — that's #48404's job.

Related product discussion/links

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

No.

Testing instructions

  • Pull this branch and run pnpm install.
  • Run pnpm jetpack build packages/newsletter. Build completes successfully (SCSS @include no longer 404s).
  • Confirm the produced build/newsletter.css is non-empty and contains the dataviews styles (they're still loaded via meta.load-css).
  • Smoke test the Newsletter dashboard in the browser (/wp-admin/admin.php?page=jetpack-newsletter-dashboard) and verify the Subscribers list and inspector panel still render with the expected admin-ui-driven layout. admin-ui 2.x injects its base styles at runtime — no static stylesheet to load.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

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 or WordPress.com Site Helper), and enable the fix/newsletter-admin-ui-scss-import branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/newsletter-admin-ui-scss-import
bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/newsletter-admin-ui-scss-import

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!

@CGastrell CGastrell self-assigned this May 20, 2026
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 20, 2026

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

@CGastrell CGastrell marked this pull request as ready for review May 20, 2026 15:25
@CGastrell CGastrell force-pushed the fix/newsletter-admin-ui-scss-import branch from 68c10f4 to 43000ac Compare May 20, 2026 17:43
CGastrell added 2 commits May 21, 2026 22:05
The 2-line explanatory comment described a removed @include line; with
that line gone there is nothing for the comment to clarify.
@dhasilva dhasilva force-pushed the fix/newsletter-admin-ui-scss-import branch from 43000ac to e01d7ff Compare May 22, 2026 01:07
@dhasilva dhasilva merged commit 66d8944 into trunk May 22, 2026
92 checks passed
@dhasilva dhasilva deleted the fix/newsletter-admin-ui-scss-import branch May 22, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants