Skip to content

Migrate Kyper AttentionFilled Icon to MXUI - #356

Open
mwclemy wants to merge 6 commits into
masterfrom
cmwimo/CT-2388
Open

Migrate Kyper AttentionFilled Icon to MXUI#356
mwclemy wants to merge 6 commits into
masterfrom
cmwimo/CT-2388

Conversation

@mwclemy

@mwclemy mwclemy commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Before(Kyper)

Screenshot 2026-07-29 at 12 47 04 Screenshot 2026-07-29 at 12 43 09 Screenshot 2026-07-29 at 12 43 32

After(MXUI)

Screenshot 2026-07-29 at 12 39 41 Screenshot 2026-07-29 at 12 37 42 Screenshot 2026-07-29 at 12 31 33

fill={true}
name="error"
size={16}
sx={{ color: '#E32727', marginRight: tokens.Spacing.Tiny }}

@platypus801 platypus801 Jul 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Let's not hardcode #E32727 here. We should be using tokens.

size={16}
sx={{ color: '#E32727', marginRight: tokens.Spacing.Tiny }}
/>
<Text color="#E32727" sx={{ fontSize: '12px' }} variant="XSmall">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same here. let's use tokens instead of raw values.

fill={true}
name="error"
size={32}
sx={{ color: '#4D4D4D', marginBottom: tokens.Spacing.Large }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same issue here. we should be using color tokens rather than raw color values.

fill={true}
name="error"
size={32}
sx={{ color: '#4D4D4D', marginBottom: tokens.Spacing.Large }}

@wesrisenmay-mx wesrisenmay-mx Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Most of the time I think using Stack spacing={?} is better than adding margins to create space between things.

https://share.gemini.google/nmado7l7jsei

fill={true}
name="error"
size={16}
sx={{ color: '#E32727', marginRight: tokens.Spacing.Tiny }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same spacing comment here

{isSubmitted && !selectedReason && (
<section role="alert" style={styles.errorContent}>
<AttentionFilled color={tokens.Color.Error300} />
<Icon fill={true} name="error" size={16} sx={{ color: tokens.Color.Error300 }} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

color prop here as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@platypus801 The token value here would be error.300 right?

fill={true}
name="error"
size={48}
sx={{ color: tokens.TextColor.Default, marginBottom: tokens.Spacing.XLarge }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Color prop and stack

fill={true}
name="error"
size={24}
sx={{ color: tokens.BackgroundColor.MessageBoxError }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given that we're trying to get rid of kyper we shouldn't use kyper tokens

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@platypus801 tokens.BackgroundColor.MessageBoxError is #DF320C. What would that translate to in MUI?

{isSubmitted && _isEmpty(selectedOption) && (
<section role="alert" style={styles.errorContent}>
<AttentionFilled color={tokens.Color.Error300} />
<Icon fill={true} name="error" size={16} sx={{ color: tokens.Color.Error300 }} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

error prop

{isSubmitted && _isEmpty(selectedOption) && (
<section role="alert" style={styles.errorContent}>
<AttentionFilled color={tokens.Color.Error300} />
<Icon fill={true} name="error" size={16} sx={{ color: tokens.Color.Error300 }} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

color prop

<div style={styles.container}>
<div style={styles.iconContainer}>
<AttentionFilled color={tokens.Color.NeutralWhite} size={24} />
<Icon fill={true} name="error" size={24} sx={{ color: tokens.Color.NeutralWhite }} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Because we are moving towards css modules we should use our css variables. Unfortuntely we don't get these until we migrate to MXUI v2.

@ash-wright123 and I came up with a strategy to define these global styles somewhere, and then delete that file when we move to MXUI v2. We are only planning to define the variables that we actually use for now.

You can find the list of variables here: https://mxui.kube.qa.internal.mx/?path=/story/mui-components-toggle-button--group

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The link you shared is taking me to the Toggle button group component. Where are those variables defined? In MXUI or somewhere else?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also, I'm curious whether those variables match what MXUI v2 has.

fill={true}
name="error"
size={48}
sx={{ color: tokens.TextColor.Default, marginBottom: tokens.Spacing.XLarge }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i believe icons have a color prop so we don't need to use sx. https://mxui.kube.qa.internal.mx/?path=/story/mxui-components-icon--icons. i believe it uses inherit by default to match the text it is with.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants