-
Notifications
You must be signed in to change notification settings - Fork 16
radio button: remove MDC dependency #3642
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
Conversation
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.
Pull Request Overview
This PR refactors checkbox and radio button components to use a shared boolean input styling system, consolidating duplicated styles and improving maintainability.
Key changes:
- Creates a new shared boolean input style file (
boolean-input.scss) to consolidate common styling patterns - Updates checkbox and radio button components to use the shared styling system
- Removes Material Design Component (MDC) dependencies from radio buttons in favor of custom styling
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/style/internal/boolean-input.scss |
New shared style file defining common boolean input patterns and variables |
src/components/list/radio-button/radio-button.template.tsx |
Updated template structure to use new boolean input classes instead of MDC classes |
src/components/list/radio-button/radio-button.scss |
Replaced MDC imports with shared boolean input styles and custom radio-specific styling |
src/components/checkbox/checkbox.template.tsx |
Added boolean input class and updated label class name for consistency |
src/components/checkbox/checkbox.scss |
Refactored to use shared boolean input styles, removing duplicated code |
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3642/ |
📝 WalkthroughWalkthroughRefactors checkbox and radio button components to use a shared boolean-input SCSS module. Rewrites component SCSS and templates to remove MDC dependencies and centralize styling via CSS variables and a new .boolean-input/.box structure with inline SVG (checkbox). Adds @forward exports of the shared module and introduces the new internal stylesheet. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (5)**/*.{tsx,scss}⚙️ CodeRabbit Configuration File
Files:
**/*.tsx📄 CodeRabbit Inference Engine (.cursor/rules/wrap-multiple-jsx-elements-in-host-not-in-array.mdc)
Files:
⚙️ CodeRabbit Configuration File
Files:
**/*.{ts,tsx}⚙️ CodeRabbit Configuration File
Files:
src/components/**/*.tsx⚙️ CodeRabbit Configuration File
Files:
src/components/**/*.scss📄 CodeRabbit Inference Engine (.cursor/rules/css-class-names-in-components-using-shadow-dom.mdc)
Files:
🧠 Learnings (2)📚 Learning: 2025-08-07T14:39:00.045ZApplied to files:
📚 Learning: 2025-08-12T14:01:27.827ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (18)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
The checkbox styles are good, but only when the component has `shadow: true`, and styles are encapsulated. However, since the `CheckboxTemplate` is designed to be imported to other consumer components, and such components are expected to import `checkbox.scss` into their own styles file. We need to ensure that the consumer's styles are not affected by the styles within the `checkbox.scss`, as much as possible without jeopardizing readability of the code.
Previously, the styles were specifically written for a checkbox element. However, the plan is to share a part of the styles with the radio button element, which also is going to lose its dependency to MDC. Therefore, adding instead of styling based on a `.checkbox` class, we now style things based on a more generic class name called `.boolean-input`, which can cover both radio and checkboxes
Since the plan is to refactor radio buttons and remove their MDC dependency, we need a shared file to style both checkbox and radio buttons.
d4fd093 to
cc27214
Compare
LucyChyzhova
left a comment
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.
love it! great job Kia! 🚀
|
🎉 This PR is included in version 38.21.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
New Features
Refactor
Documentation
Review:
Browsers tested:
(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)
Windows:
Linux:
macOS:
Mobile: