-
Notifications
You must be signed in to change notification settings - Fork 373
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
refactor: [M3-9431] [Akamai Design System] Radio Button Component #11878
refactor: [M3-9431] [Akamai Design System] Radio Button Component #11878
Conversation
…Design System specs
9064908
to
50e483a
Compare
'& $checked': { | ||
color: primaryColors.main, | ||
'&:active': { | ||
color: theme.tokens.radio.Active.Active.Border, |
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 can be a little confusing, but Border
is the correct property to use here for color (confirmed with Design). Some aspects of the radio button needed additional handling with Color.Neutrals
.
Coverage Report: ✅ |
@bill-akamai I believe those e2e failures are relevant to these changes. You may have to adjust a few things in those tests (or the ui util) - please let me know if you need help with this! edit: maybe only some of them - I see some firewall tests failing on other PRs |
@bill-akamai you also need to address the changes made to our tokens by rebasing/merging this PR with develop |
…-component
@abailly-akamai I was able to get these to pass (locally) by adding a longer timeout to the
Should we make this change in a separate PR? |
@bill-akamai if that's unrelated to your PR then we should probably let @jdamore-linode handle it 👍 Will review! |
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.
Great work! clean code and accurate usage of tokens. 🥇
Confirmed styles and behavior of Radios in app and storybook, both light and dark themes. ✅
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 seems like the radio icons are slightly larger in dark mode (also existing issue in dev) - not sure if this is intentional 🤔
Preview
Screen.Recording.2025-03-21.at.2.32.27.PM.mov
Great pick up @hana-akamai - just addressed this. |
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.
Input size is also slightly different in dark mode but looks good otherwise!
Preview
Screen.Recording.2025-03-21.at.3.39.31.PM.mov
'.MuiSvgIcon-fontSizeMedium': { | ||
fontSize: '20px', | ||
}, | ||
}, |
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.
I think setting the size in light.ts will apply to both
dark.ts inherits light.ts defaults via deep merge (dark.ts is basically an override)
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.
@hana-akamai input size updated, thanks!
@abailly-akamai something might be incorrect in our implementation here. I had to explicitly add the adjustments in dark.ts
to see that change take effect. The deep merge doesn't seem to be carrying over all style properties as expected. I'll look to see why.
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.
Ah I see. Maybe something has changed recently. perhaps @jaalah-akamai has input?
I still find the theme setup quite mysterious in many aspects
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.
@abailly-akamai I'm a bit new to this setup myself but I've found that the theme inheritance works differently based on how styles are defined. Static styles defined as objects (like MuiSvgIcon
) get inherited between themes, but functional styles (like the MuiRadio
styles that use ({ theme }) => ({}))
don't do this inheritance. So no prob when light.ts
defines the shared style as the static object but the functional styles would need a shared constant or utility function to avoid duplication if I'm understanding things correctly.
Cloud Manager UI test results🔺 1 failing test on test run #9 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/linodes/linode-config.spec.ts" |
…-component
Description 📝
This PR updates the Radio Button component to conform to the Akamai Design System specifications.
Changes 🔄
Preview 📷
Verification steps
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅