-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
There was a problem hiding this 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>; |
There was a problem hiding this comment.
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
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