Lint: use recommended components instead of deprecated Jetpack components#49284
Lint: use recommended components instead of deprecated Jetpack components#49284simison wants to merge 6 commits into
Conversation
|
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! |
| "subpaths": { | ||
| "button": "Use `Button` from `@wordpress/ui` instead.", | ||
| "global-notices": "Use `@wordpress/notices` instead.", | ||
| "gravatar": "Use `@gravatar-com/hovercards` or `@wordpress/components` when appropriate.", |
There was a problem hiding this comment.
| "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.", |
There was a problem hiding this comment.
| "jetpack-footer": "Jetpack branding component — remove from denylist to allow.", |
Allow
9da7b22 to
846e88f
Compare
| "H2": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.", | ||
| "H3": "Use `Text` with `variant=\"heading-*\"` from `@wordpress/ui` instead.", |
| "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.", |
There was a problem hiding this comment.
| "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.", |
There was a problem hiding this comment.
| "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.", |
There was a problem hiding this comment.
| "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).", |
| "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.", |
There was a problem hiding this comment.
| "JetpackFooter": "Jetpack branding component — remove from denylist to allow.", |
Allow
| "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.", |
There was a problem hiding this comment.
Allow logos?
| "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).", |
There was a problem hiding this comment.
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.", |
There was a problem hiding this comment.
| "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.", |
There was a problem hiding this comment.
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.", |
| "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`.", |
There was a problem hiding this comment.
Via @keoshi:
ColandContainerseem 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.", |
There was a problem hiding this comment.
@keoshi noted:
DonutMeternot 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
There was a problem hiding this comment.
| "DonutMeter": "Jetpack-specific visualization — remove from denylist to allow.", | |
| "DonutMeter": "Use `PieChart` from `@automattic/charts` instead.", |
See package
Follow-up to #48487
WIP
Disencourage usage of select Jetpack components & primitives and direct to use
@wordpress/uior@wordpress/componentsinstead.Proposed changes
Related product discussion/links
Does this pull request change what data or activity we track or use?
Testing instructions