Skip to content

Lint: use recommended components instead of deprecated Jetpack components#49284

Draft
simison wants to merge 6 commits into
trunkfrom
update/use-recommended-components-jetpack-comps
Draft

Lint: use recommended components instead of deprecated Jetpack components#49284
simison wants to merge 6 commits into
trunkfrom
update/use-recommended-components-jetpack-comps

Conversation

@simison
Copy link
Copy Markdown
Member

@simison simison commented May 29, 2026

Follow-up to #48487

WIP

Disencourage usage of select Jetpack components & primitives and direct to use @wordpress/ui or @wordpress/components instead.

Proposed changes

Related product discussion/links

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

Testing instructions

  • Go to '..'

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

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 May 29, 2026
"subpaths": {
"button": "Use `Button` from `@wordpress/ui` instead.",
"global-notices": "Use `@wordpress/notices` instead.",
"gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",

Allow.

"button": "Use `Button` from `@wordpress/ui` instead.",
"global-notices": "Use `@wordpress/notices` instead.",
"gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",
"jetpack-footer": "Jetpack branding component — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"jetpack-footer": "Jetpack branding component — remove from denylist to allow.",

Allow

@simison simison force-pushed the update/use-recommended-components-jetpack-comps branch from 9da7b22 to 846e88f Compare June 2, 2026 09:48
Comment on lines +31 to +32
"H2": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.",
"H3": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.",
Copy link
Copy Markdown
Member Author

@simison simison Jun 2, 2026

Choose a reason for hiding this comment

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

Would be good to map to a specific variants.

"DiffViewer": "Jetpack-specific component — remove from denylist to allow.",
"DonutMeter": "Jetpack-specific visualization — remove from denylist to allow.",
"DotPager": "Jetpack-specific component — remove from denylist to allow.",
"getProductCheckoutUrl": "Jetpack utility — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"getProductCheckoutUrl": "Jetpack utility — remove from denylist to allow.",

Remove utility.

"getProductCheckoutUrl": "Jetpack utility — remove from denylist to allow.",
"GlobalNotices": "Use `@wordpress/notices` instead.",
"globalNoticesStore": "Use `@wordpress/notices` instead.",
"Gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"Gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",

Gravatar component is fine until we have something in UI and/or Gravatar package.

"Gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.",
"H2": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.",
"H3": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.",
"IconTooltip": "Use `Tooltip` from `@wordpress/ui` instead.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"IconTooltip": "Use `Tooltip` from `@wordpress/ui` instead.",
"IconTooltip": "Use combination of `Icon` and `Tooltip` from `@wordpress/ui` instead.",

"H3": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.",
"IconTooltip": "Use `Tooltip` from `@wordpress/ui` instead.",
"IconsCard": "Jetpack-specific component — remove from denylist to allow.",
"IndeterminateProgressBar": "Use `Spinner` from `@wordpress/components` (no `@wordpress/ui` equivalent yet).",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Recommend Spinner and/or ProgressBar?

"IconsCard": "Jetpack-specific component — remove from denylist to allow.",
"IndeterminateProgressBar": "Use `Spinner` from `@wordpress/components` (no `@wordpress/ui` equivalent yet).",
"isFirstMonthTrial": "Jetpack utility — remove from denylist to allow.",
"JetpackFooter": "Jetpack branding component — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"JetpackFooter": "Jetpack branding component — remove from denylist to allow.",

Allow

Comment on lines +38 to +41
"JetpackProtectLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackSearchLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVaultPressBackupLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVideoPressLogo": "Jetpack branding component — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Allow logos?

Suggested change
"JetpackProtectLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackSearchLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVaultPressBackupLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVideoPressLogo": "Jetpack branding component — remove from denylist to allow.",

"JetpackSearchLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVaultPressBackupLogo": "Jetpack branding component — remove from denylist to allow.",
"JetpackVideoPressLogo": "Jetpack branding component — remove from denylist to allow.",
"LoadingPlaceholder": "Use `Placeholder` from `@wordpress/components` (no `@wordpress/ui` equivalent yet).",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Incorrect, Placeholder has a different purpose.

Keep allowing or migrate to Spinner/ProgressBar for now?

"ProductOffer": "Jetpack-specific pricing component — remove from denylist to allow.",
"ProductPrice": "Jetpack-specific pricing component — remove from denylist to allow.",
"ProgressBar": "Use `ProgressBar` from `@wordpress/components` (no `@wordpress/ui` equivalent yet).",
"QRCode": "Jetpack-specific component — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"QRCode": "Jetpack-specific component — remove from denylist to allow.",

Used twice in the repo.

"TermsOfService": "Jetpack-specific component — remove from denylist to allow.",
"Testimonials": "Jetpack-specific component — remove from denylist to allow.",
"Text": "Use `Text` from `@wordpress/ui` instead.",
"ThemeProvider": "Use `@wordpress/theme` instead.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This might still continue provide Jetpack brand color but that said, it's a bit heavy-handed way to supply it.

"Testimonials": "Jetpack-specific component — remove from denylist to allow.",
"Text": "Use `Text` from `@wordpress/ui` instead.",
"ThemeProvider": "Use `@wordpress/theme` instead.",
"Title": "Use `Text` from `@wordpress/ui` instead.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Would be good to pin a specific variant.

@simison simison requested a review from keoshi June 2, 2026 10:17
Comment on lines +16 to +17
"Col": "Jetpack layout component — remove from denylist to allow or use `Stack` from `@wordpress/ui`.",
"Container": "Jetpack layout component — remove from denylist to allow or use `Stack` from `@wordpress/ui`.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Via @keoshi:

Col and Container seem good to deprecate in favor of Stack . The instruction seems a bit conservative, but we should do it.

"DetailsViewer": "Jetpack-specific component — remove from denylist to allow.",
"Dialog": "Use `Dialog` from `@wordpress/ui` instead.",
"DiffViewer": "Jetpack-specific component — remove from denylist to allow.",
"DonutMeter": "Jetpack-specific visualization — remove from denylist to allow.",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@keoshi noted:

DonutMeter not related to wp-ui, but we are consolidating all data viz pieces in the chart library; e.g.: https://automattic.github.io/jetpack-storybook/?path=/docs/js-packages-charts-library-charts-pie-chart--docs

Copy link
Copy Markdown
Member Author

@simison simison Jun 2, 2026

Choose a reason for hiding this comment

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

Suggested change
"DonutMeter": "Jetpack-specific visualization — remove from denylist to allow.",
"DonutMeter": "Use `PieChart` from `@automattic/charts` instead.",

See package

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

Labels

Docs [Status] In Progress [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.

1 participant