Skip to content

Forms: remove orphaned SCSS @use imports from dashboard partials - #48192

Merged
dhasilva merged 2 commits into
trunkfrom
update/forms-dead-scss-use
Apr 27, 2026
Merged

dhasilva merged 2 commits into
trunkfrom
update/forms-dead-scss-use

Conversation

@nerrad

@nerrad nerrad commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Part of #48160.

Proposed changes

Remove @use "@wordpress/base-styles/{breakpoints,colors,variables}" imports from six forms dashboard SCSS files where the imported namespace was never referenced. Same root cause as #48184 — stale imports left behind after the only consumer was removed upstream (#46732 for the inbox/style.scss ones; the others are sibling orphans surfaced while auditing the package).

Files touched (9 @use lines total):

File Removed
src/dashboard/inbox/style.scss breakpoints, colors
src/dashboard/components/inspector/style.scss variables
src/dashboard/components/inspector/response-meta/style.scss breakpoints
src/dashboard/components/feedback-comments/style.scss variables
src/dashboard/components/page/style.scss colors
routes/responses/response/style.scss breakpoints, variables

Why this is safe

  • Compiled CSS is byte-identical. The WP base-style partials (breakpoints, colors, variables) emit no top-level rules — they're pure Sass definitions. Removing an unreferenced @use of a definition-only partial produces zero output change.
  • No transitive re-export. Sass @use namespaces are scoped to the importing file. Only @forward re-exports — and there are zero @forward directives anywhere in projects/packages/forms.
  • No external Sass consumer. Verified via local grep plus OpenGrok search across wpcom, calypso, dash, mage, and engineering: nothing @uses or @imports any of the six edited files. The only external hits are webpack-emitted source-path comments inside Jetpack's own compiled JS bundle — regenerated every build.
  • Dashboard webpack build passes (2.4s, both LTR/RTL bundles emitted, no Sass errors).

Related product discussion/links

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

No.

Testing instructions

  • pnpm --filter @automattic/jetpack-forms build:dashboard — should complete without Sass errors.
  • Optionally compare projects/packages/forms/build/jetpack-forms-dashboard.css before and after this branch — the output should be byte-identical.
  • Changelog entry added (packages/forms, patch / removed).

@github-actions

github-actions Bot commented Apr 19, 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 update/forms-dead-scss-use branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/forms-dead-scss-use

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

github-actions Bot commented Apr 19, 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!

@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 Apr 19, 2026
@jp-launch-control

jp-launch-control Bot commented Apr 19, 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

@dhasilva
dhasilva marked this pull request as ready for review April 27, 2026 16:22
@dhasilva
dhasilva requested a review from a team April 27, 2026 16:22
@dhasilva dhasilva added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Apr 27, 2026
nerrad added 2 commits April 27, 2026 13:35
Drop @use imports of @wordpress/base-styles/{breakpoints,colors,variables}
in six forms dashboard SCSS files where the namespace was never referenced.

Root cause is the same pattern as #48184 — stale imports left behind when
downstream code removed their only consumer. No effect on compiled CSS:
the base-style partials emit no top-level rules, and @use namespaces are
file-scoped (no @forward exists in the package), so removing the imports
is a pure no-op at build time.

Part of #48160.
Patch / removed entry for the dead-import removal in the previous commit.
@dhasilva
dhasilva force-pushed the update/forms-dead-scss-use branch from 3b8bc49 to aa4b742 Compare April 27, 2026 16:40
@dhasilva
dhasilva merged commit d5c1c38 into trunk Apr 27, 2026
90 of 91 checks passed
@dhasilva
dhasilva deleted the update/forms-dead-scss-use branch April 27, 2026 16:55
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Apr 27, 2026
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