Skip to content

Conversation

@dsas
Copy link
Contributor

@dsas dsas commented Jan 30, 2026

Fixes https://linear.app/a8c/issue/DOTCOM-15924/fix-missing-css

Proposed changes:

The DataForm component from @wordpress/dataviews expects CSS variables like --wpds-dimension-gap-md to be defined. These come from the package's stylesheet which wasn't being loaded.

Import the dataviews styles via SCSS to bundle them with our assets, ensuring the CSS version matches the JS package version we're using.

This made "Manage all subscribers" look far too spaced out, so addressed that too.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

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

Testing instructions:

  1. Make add_filter( 'jetpack_wp_admin_newsletter_settings_enabled', '__return_true' ); run early, e.g. by adding it to a new mu-plugin or just by pasting it into the top of jetpack-dev/jetpack.php using the plugin file editor on a jurassic ninja site.
  2. Enable the newsletter module if it isn't already (it is on WoA)
  3. Go to Jetpack → Newsletter in wp-admin
Before After
Screenshot 2026-01-30 at 20 23 53 Screenshot 2026-01-30 at 20 24 09

The DataForm component from @wordpress/dataviews expects CSS variables
like --wpds-dimension-gap-md to be defined. These come from the package's
stylesheet which wasn't being loaded.

Import the dataviews styles via SCSS to bundle them with our assets,
ensuring the CSS version matches the JS package version we're using.

This made "Manage all subscribers" look far too spaced out, so addressed
that too.
@dsas dsas self-assigned this Jan 30, 2026
Copilot AI review requested due to automatic review settings January 30, 2026 20:25
@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 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), and enable the dotcom-15924-fix-missing-css branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack dotcom-15924-fix-missing-css

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
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!

@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 Jan 30, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes missing CSS design tokens for the DataViews DataForm component in the newsletter settings by importing the required stylesheet. The DataForm component depends on CSS variables (like --wpds-dimension-gap-md) that were not being loaded, causing styling issues.

Changes:

  • Import DataViews stylesheet to bundle design tokens with newsletter settings assets
  • Remove excessive spacing from "Manage all subscribers" link by removing CSS class
  • Add changelog entry documenting the CSS fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
projects/packages/newsletter/src/settings/style.scss Adds import statement for @wordpress/dataviews styles to ensure design tokens are available
projects/packages/newsletter/src/settings/sections/newsletter-section.tsx Removes newsletter-settings__link CSS class from wrapper div to reduce spacing
projects/packages/newsletter/changelog/fix-some-css Adds changelog entry for the CSS fix

/>
{ data.subscriptions && jetpackSettings && (
<div className="newsletter-settings__link">
<div>
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The CSS class "newsletter-settings__link" should not be removed here. This class is still defined in style.scss (line 59-61) with "margin-top: 2em" styling and is actively used in newsletter-categories-section.tsx (line 208). Removing it here creates an inconsistency in the codebase where the same pattern is styled differently in different sections.

If the excessive spacing is an issue, consider either:

  1. Keeping the class here and adjusting the margin-top value in the CSS definition to be less (e.g., 1em)
  2. Removing the CSS class definition entirely and updating all usages throughout the codebase

The current change creates inconsistent spacing between this section and the newsletter categories section.

Suggested change
<div>
<div className="newsletter-settings__link">

Copilot uses AI. Check for mistakes.
Significance: patch
Type: changed

CSS: Ensure dataforms css is loaded.
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The changelog entry does not follow the project's changelog conventions. Based on the custom coding guidelines and examples from other changelog entries in the codebase, changelog entries should:

  1. Use imperative mood (e.g., "Fix" instead of "Ensure")
  2. Start with a capital letter and end with a period
  3. Describe the change from a user's perspective

This entry should be rewritten to something like: "Fix missing design tokens in DataForm component."

Copilot generated this review using guidance from repository custom instructions.
Significance: patch
Type: changed

CSS: Ensure dataforms css is loaded.
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The changelog entry contains a spelling/grammar error. "dataforms" should be two separate words: "DataForm". Additionally, "css" should be capitalized as "CSS" since it's an acronym.

Suggested change
CSS: Ensure dataforms css is loaded.
CSS: Ensure DataForm CSS is loaded.

Copilot uses AI. Check for mistakes.
@jp-launch-control
Copy link

jp-launch-control bot commented Jan 30, 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

@@ -1,3 +1,6 @@
// Import dataviews styles for DataForm component
@import "@wordpress/dataviews/build-style/style.css";
Copy link
Member

Choose a reason for hiding this comment

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

I think the right way to go about this would be using the Theme provider; not the DataViews CSS; https://wordpress.github.io/gutenberg/?path=/docs/design-system-theme-theme-provider--docs

Even if DataViews has the style tokens now, it might not have them in future. See comments from Andrew at p1769436406520009/1768821189.724639-slack-C052XEUUBL4

Copy link
Member

Choose a reason for hiding this comment

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

...or did you need all the DataForm styles themselves, not just style tokens? In that case this might be correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The latter. The original issue was that the DataForm component's own layout was using gap: var(--wpds-dimension-gap-md) and that wasn't defined.

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Newsletter [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants