Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launchpad: Remove unused Badge #99734

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Launchpad: Remove unused Badge #99734

merged 1 commit into from
Feb 14, 2025

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Feb 13, 2025

Proposed Changes

Remove the unused Badge component - seems like it hasn't been used since its creation.

Why are these changes being made?

Just cleaning up. Spotted this when I was reviewing yet another instance of a Badge in #99343.

Testing Instructions

  • Verify the removed code is not in use.
  • All checks should be green.

@tyxla tyxla added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial [Feature] Launchpad The onboarding Launchpad that guides users through setting up their site and getting it launched. [Feature Group] Launchpad labels Feb 13, 2025
@tyxla tyxla requested a review from a team February 13, 2025 14:03
@tyxla tyxla self-assigned this Feb 13, 2025
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug remove/launchpad-badge on your sandbox.

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

const Badge: React.FunctionComponent< BadgeProps > = ( props ) => {
const className = props.className;
const type = props.type || 'warning';
return <div className={ clsx( `badge badge--${ type }`, className ) }>{ props.children }</div>;
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like there are a few references to the .badge classname in packages/launchpad/src/checklist-item/style.scss but I assume they're targeting the Badge from @automattic/components, which also happens to use the .badge classname 🤦

  • using the .badge classname should be avoided as it breaks style encapsulation
  • we should definitely improve the classnames and scope them (or obfuscate them), as @mirka also recently reported in another PR

@tyxla tyxla merged commit 9fdc5dc into trunk Feb 14, 2025
16 of 17 checks passed
@tyxla tyxla deleted the remove/launchpad-badge branch February 14, 2025 12:43
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Launchpad [Feature] Launchpad The onboarding Launchpad that guides users through setting up their site and getting it launched. [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants