-
Notifications
You must be signed in to change notification settings - Fork 332
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
chore: [M3-7803] - Clean up Chip
component
#10223
chore: [M3-7803] - Clean up Chip
component
#10223
Conversation
Coverage Report: β |
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.
Nice cleanup π§Ή
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.
The cleanup looks good mostly but I noticed a couple of instances where chips were adversely impacted
{hasUpgrade && ( | ||
<Chip | ||
clickable | ||
inTable | ||
label="UPGRADE" | ||
onClick={openUpgradeDialog} | ||
size="small" | ||
/> | ||
) : null} | ||
)} |
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.
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.
<Stack | ||
alignItems="center" | ||
aria-label={`Linode status ${linodeStatus}`} | ||
component="span" | ||
data-qa-linode-status | ||
hasSecondaryStatus={hasSecondaryStatus} | ||
isOffline={isOffline} | ||
isOther={isOther} | ||
isRunning={isRunning} | ||
isSummaryView={isSummaryView} | ||
label={formattedStatus} | ||
pill={true} | ||
/> | ||
direction="row" | ||
spacing={1.5} | ||
sx={{ paddingLeft: 2 }} | ||
> | ||
<StatusIcon status={getLinodeIconStatus(linodeStatus)} /> | ||
<Typography sx={(theme) => ({ fontFamily: theme.font.bold })}> | ||
{formattedStatus} | ||
</Typography> | ||
</Stack> | ||
{isRebootNeeded && ( | ||
<TooltipIcon | ||
status="help" | ||
sxTooltipIcon={{ padding: 0 }} | ||
text={VPC_REBOOT_MESSAGE} | ||
/> | ||
)} |
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.
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.
Fixed in 63bb02e
Description π
After talking about Chips in our cafe meeting, I looked at the Chip component and I couldn't un-see some of this code π©π€
This PR simplifies our override of MUI's
<Chip />
and removes some styled components that went way too farPreview π·
Note
The goal of this PR is to clean up Chip related code, but not change to how it looks ποΈ
How to test π§ͺ
Chip
you can think of in Cloud ManagerAs an Author I have considered π€