Skip to content

Conversation

@Kiarokh
Copy link
Contributor

@Kiarokh Kiarokh commented Aug 5, 2025

As a first step of getting rid of MDC, we need to make sure that the component renders correctly, without relying on any styles applied by MDC.

fix #3632

Summary by CodeRabbit

  • Refactor

    • Checkbox component styles were fully rewritten to use custom CSS, removing all dependencies on Material Design Components. Visual appearance and interaction states have been improved and are now fully custom.
    • Checkbox template markup was simplified, flattening the structure and centralizing state-based class management.
  • Style

    • Improved checkbox alignment, sizing, and transitions for a smoother user experience.
    • Adjusted dynamic label spacing for a more compact layout.
    • Updated table row selector and list item styles for better checkbox integration.
  • Chores

    • Removed unused helper text styles related to the checkbox component.

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

@coderabbitai
Copy link

coderabbitai bot commented Aug 5, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The checkbox component's SCSS and template were refactored to remove all dependencies on Material Design Components (MDC), replacing them with custom styles and markup. Related styles in list and table components were updated to accommodate the new checkbox styling. The dynamic label's gap was slightly reduced, and a helper text partial was deleted.

Changes

Cohort / File(s) Change Summary
Checkbox SCSS Refactor
src/components/checkbox/checkbox.scss
Complete rewrite of checkbox styles to remove MDC dependencies, introduce custom variables, mixins, and interaction states.
Checkbox Template Simplification
src/components/checkbox/checkbox.template.tsx
Flattened markup, centralized state-based classes, removed MDC-specific class names, simplified checkmark SVG and box structure.
Removed Helper Text Partial
src/components/checkbox/partial-styles/_helper-text.scss
Deleted SCSS partial for helper text mixin, eliminating related helper line styling.
Dynamic Label Gap Adjustment
src/components/dynamic-label/dynamic-label.scss
Reduced flex gap between items from 0.5rem to 0.25rem.
List Checkbox Integration Update
src/components/list/list.scss
Removed checkbox SCSS import and mixin, added conditional margin rule for checkboxes in list meta.
Table Row Selector Checkbox Update
src/components/table/partial-styles/_row-selection.scss
Replaced MDC variables with custom property for min-height, adjusted padding for row selector alignment.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CheckboxComponent
    participant CustomStyles
    participant DOM

    User->>CheckboxComponent: Interacts (click/check/uncheck)
    CheckboxComponent->>DOM: Updates input state
    CheckboxComponent->>CustomStyles: Applies custom classes/styles (checked, disabled, etc.)
    CustomStyles->>DOM: Renders custom visuals (box, checkmark, label)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Assessment against linked issues

Objective Addressed Explanation
Remove MDC styles from checkbox component (#3632)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related issues

  • Checkbox: Get rid of MDC #3631: The changes directly remove MDC styles and simplify the checkbox template, aligning with the objectives of this related issue.

Suggested labels

visual design, maintenance

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mdc-checkbox-styles

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3634/

@Kiarokh Kiarokh force-pushed the mdc-checkbox-styles branch 4 times, most recently from 2a11807 to f840d04 Compare August 6, 2025 13:06
@Kiarokh Kiarokh marked this pull request as ready for review August 6, 2025 13:06
Copilot AI review requested due to automatic review settings August 6, 2025 13:06
Copy link
Contributor

Copilot AI left a 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 the checkbox component to remove dependency on Material Design Components (MDC) styles while maintaining visual consistency. The changes implement custom CSS styling to replace MDC-specific classes and variables.

  • Removes MDC-specific CSS classes and variables from checkbox templates and styles
  • Implements custom CSS for checkbox appearance, states, and interactions
  • Updates related components (table, list, dynamic-label) to work with the new checkbox implementation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/components/checkbox/checkbox.scss Complete rewrite with custom CSS replacing MDC styles, including box styling, states, and animations
src/components/checkbox/checkbox.template.tsx Simplified template structure removing MDC classes and elements
src/components/checkbox/partial-styles/_helper-text.scss Removed file as helper text logic moved to main stylesheet
src/components/table/partial-styles/_row-selection.scss Updated to use new checkbox CSS variables instead of MDC variables
src/components/list/list.scss Removed MDC checkbox imports and added margin adjustment for checkbox elements
src/components/dynamic-label/dynamic-label.scss Reduced gap size to accommodate new checkbox styling
Comments suppressed due to low confidence (1)

src/components/checkbox/checkbox.scss:103

  • The :has() pseudo-class has limited browser support, especially in older browsers. Consider using a class-based approach or feature detection for better compatibility.
    .checkbox:has(input[type='checkbox']:checked) & {

@coderabbitai coderabbitai bot changed the title @coderabbitai Refactor checkbox component to remove MDC dependencies and update styles Aug 6, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d22d12 and f840d04.

📒 Files selected for processing (6)
  • src/components/checkbox/checkbox.scss (1 hunks)
  • src/components/checkbox/checkbox.template.tsx (1 hunks)
  • src/components/checkbox/partial-styles/_helper-text.scss (0 hunks)
  • src/components/dynamic-label/dynamic-label.scss (1 hunks)
  • src/components/list/list.scss (1 hunks)
  • src/components/table/partial-styles/_row-selection.scss (2 hunks)
💤 Files with no reviewable changes (1)
  • src/components/checkbox/partial-styles/_helper-text.scss
🧰 Additional context used
📓 Path-based instructions (5)
src/components/**/*.scss

📄 CodeRabbit Inference Engine (.cursor/rules/css-class-names-in-components-using-shadow-dom.mdc)

Do not use BEM-style class names in CSS for components, as components use shadow-DOM.

Files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
**/*.{tsx,scss}

⚙️ CodeRabbit Configuration File

**/*.{tsx,scss}: Almost all our components use shadow-DOM. Therefore, we have no need of BEM-style class names in our CSS.

Files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/checkbox/checkbox.template.tsx
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
**/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/wrap-multiple-jsx-elements-in-host-not-in-array.mdc)

When returning multiple JSX elements from the render method, never wrap them in an array literal. Instead, always wrap them in the special <Host> element. When there is already a single top-level element, it does not have to be wrapped in <Host>.

Files:

  • src/components/checkbox/checkbox.template.tsx

⚙️ CodeRabbit Configuration File

**/*.tsx: Our .tsx files are typically using StencilJS, not React. When a developer wants to return multiple top-level JSX elements from the render method, they will sometimes wrap them in an array literal. In these cases, rather than recommending they add key properties to the elements, recommend removing the hardcoded array literal. Recommend wrapping the elements in StencilJS's special <Host> element.

Files:

  • src/components/checkbox/checkbox.template.tsx
**/*.{ts,tsx}

⚙️ CodeRabbit Configuration File

**/*.{ts,tsx}: Imports from other files in the same module (lime-elements) must use relative paths. Using absolute paths for imports will cause the production build to fail.

Files:

  • src/components/checkbox/checkbox.template.tsx
src/components/**/*.tsx

⚙️ CodeRabbit Configuration File

src/components/**/*.tsx: When contributors add new props to existing components in the lime-elements repository, they should always add documentation examples that demonstrate the new prop's usage and explain how it works. This helps with user adoption, feature discoverability, and maintains comprehensive documentation.

Files:

  • src/components/checkbox/checkbox.template.tsx
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
PR: Lundalogik/lime-elements#0
File: .cursor/rules/css-class-names-in-components-using-shadow-dom.mdc:0-0
Timestamp: 2025-07-21T00:27:58.489Z
Learning: Applies to src/components/**/*.scss : Do not use BEM-style class names in CSS for components, as components use shadow-DOM.
📚 Learning: in the lime-elements repository, css custom properties prefixed with `--lime-` are considered intern...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:1-3
Timestamp: 2025-04-25T14:23:56.018Z
Learning: In the lime-elements repository, CSS custom properties prefixed with `--lime-` are considered internal implementation details and should not be documented in JSDoc comments, while other custom properties should be documented as they are part of the public API.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: in components using shadow dom (like those in lime-elements), the universal selector `*` is already ...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3529
File: src/components/ai-avatar/ai-avatar.scss:20-22
Timestamp: 2025-04-29T14:15:32.104Z
Learning: In components using Shadow DOM (like those in lime-elements), the universal selector `*` is already scoped to the component's shadow tree and won't cause unwanted side effects outside the component. There's no functional difference between `*` and `:host *` in this context.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: examples in lime elements use shadow dom (with `shadow: true` in the component decorator) for style ...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/notched-outline/examples/notched-outline-basic.scss:11-22
Timestamp: 2025-04-14T10:01:18.721Z
Learning: Examples in Lime Elements use Shadow DOM (with `shadow: true` in the component decorator) for style encapsulation, making additional class-based selectors unnecessary. This ensures styles are automatically scoped to each component without leaking to the rest of the application.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: in lime-elements, css custom properties follow a specific naming convention: 1. internal use variabl...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:24-28
Timestamp: 2025-04-25T14:22:02.157Z
Learning: In lime-elements, CSS custom properties follow a specific naming convention:
1. Internal use variables (not for consumers) are prefixed with `--limel-component-name-`
2. External use variables (intended for consumers) are prefixed with `--component-name-`
Variables documented with JSDoc comments are typically meant for external use.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: in lime-elements, css custom properties like `--limel-theme-surface-background-color` are applied at...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3624
File: src/components/button-group/button-group.scss:115-118
Timestamp: 2025-07-30T14:20:41.791Z
Learning: In lime-elements, CSS custom properties like `--limel-theme-surface-background-color` are applied at :root level via `core-styles.scss` and should be expected to be available without fallbacks. The library's architecture guarantees these theme variables are present, so adding fallbacks would be redundant and go against the design intention.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: in lime elements components that use shadow dom (with `shadow: true` in the component decorator), ke...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.scss:96-122
Timestamp: 2025-04-25T14:18:07.755Z
Learning: In Lime Elements components that use Shadow DOM (with `shadow: true` in the component decorator), keyframe animation names don't need to be namespaced as they are automatically scoped to the component and won't collide with animations from other components.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: applies to src/components/**/*.scss : do not use bem-style class names in css for components, as com...
Learnt from: CR
PR: Lundalogik/lime-elements#0
File: .cursor/rules/css-class-names-in-components-using-shadow-dom.mdc:0-0
Timestamp: 2025-07-21T00:27:58.489Z
Learning: Applies to src/components/**/*.scss : Do not use BEM-style class names in CSS for components, as components use shadow-DOM.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: for stenciljs components in lime-elements, prefer using the `` element to wrap child elements ...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.tsx:30-38
Timestamp: 2025-04-25T13:32:56.396Z
Learning: For StencilJS components in lime-elements, prefer using the `<Host>` element to wrap child elements in the render method instead of returning an array of elements. This follows the standard pattern in the codebase and eliminates the need for key attributes.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
📚 Learning: for stenciljs components in lime-elements, prefer using the `` element to wrap child elements ...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3529
File: src/components/lime-ai-avatar/lime-ai-avatar.tsx:30-38
Timestamp: 2025-04-25T13:32:56.396Z
Learning: For StencilJS components in lime-elements, prefer using the `<Host>` element to wrap child elements in the render method instead of returning an array of elements, which eliminates the need for key attributes and follows StencilJS best practices.

Applied to files:

  • src/components/dynamic-label/dynamic-label.scss
  • src/components/list/list.scss
📚 Learning: in tabulator 6, the scss files are located in `dist/scss/tabulator.scss`, not in the old `src/scss/`...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3478
File: package.json:61-61
Timestamp: 2025-07-28T14:35:21.965Z
Learning: In Tabulator 6, the SCSS files are located in `dist/scss/tabulator.scss`, not in the old `src/scss/` path from version 4.x. The correct import path is `node_modules/tabulator-tables/dist/scss/tabulator.scss`.

Applied to files:

  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: in limel-chip-set, the onclick handler should be placed on the content div (
) ra...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3518
File: src/components/chip-set/chip-set.tsx:367-385
Timestamp: 2025-04-14T12:22:22.298Z
Learning: In limel-chip-set, the onClick handler should be placed on the content div (<div slot="content">) rather than on the limel-notched-outline component, and should only be applied when type is 'input'.

Applied to files:

  • src/components/list/list.scss
  • src/components/table/partial-styles/_row-selection.scss
  • src/components/checkbox/checkbox.scss
📚 Learning: for lime-elements, example files should import types from the public api using '@limetech/lime-eleme...
Learnt from: adrianschmidt
PR: Lundalogik/lime-elements#3530
File: src/components/text-editor/examples/text-editor-composite.tsx:4-7
Timestamp: 2025-04-17T09:39:36.254Z
Learning: For lime-elements, example files should import types from the public API using 'limetech/lime-elements' rather than defining duplicate types locally. This includes types like `EditorUiType` which are part of the component's public API.

Applied to files:

  • src/components/table/partial-styles/_row-selection.scss
📚 Learning: lime elements generally does not support unreasonably old browsers, so modern css properties like `s...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3464
File: src/components/text-editor/prosemirror-adapter/plugins/image/view.scss:14-17
Timestamp: 2025-03-11T13:31:46.958Z
Learning: Lime Elements generally does not support unreasonably old browsers, so modern CSS properties like `scale` that have good support in current browsers are preferred over older alternatives.

Applied to files:

  • src/components/table/partial-styles/_row-selection.scss
📚 Learning: in scss files, css property values can be split across multiple lines when properly indented, partic...
Learnt from: Kiarokh
PR: Lundalogik/lime-elements#3567
File: src/components/ai-avatar/ai-avatar.scss:0-0
Timestamp: 2025-05-28T08:37:45.610Z
Learning: In SCSS files, CSS property values can be split across multiple lines when properly indented, particularly for complex values like animation shorthands with CSS custom properties. This is valid SCSS syntax that compiles correctly to CSS and is often the result of auto-formatting tools.

Applied to files:

  • src/components/checkbox/checkbox.scss
🪛 Biome (2.1.2)
src/components/checkbox/checkbox.template.tsx

[error] 79-79: Alternative text title element cannot be empty

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

(lint/a11y/noSvgWithoutTitle)


[error] 53-65: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

⏰ 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)
  • GitHub Check: Docs / Publish Docs
  • GitHub Check: Build
  • GitHub Check: Test
🔇 Additional comments (12)
src/components/dynamic-label/dynamic-label.scss (1)

9-9: LGTM! Clean spacing adjustment.

The reduced gap aligns well with the overall spacing refinements in the checkbox component refactor.

src/components/table/partial-styles/_row-selection.scss (2)

9-9: Good alignment with checkbox refactor.

The custom property --limel-checkbox-min-height properly replaces the removed MDC variables and follows lime-elements naming conventions.


27-27: Appropriate vertical spacing adjustment.

The padding-top adjustment helps align checkboxes properly within table rows. The !important is justified here to override Tabulator's default cell padding.

src/components/list/list.scss (1)

143-145: Modern CSS approach for conditional styling.

Using the :has() pseudo-class to conditionally apply margin when a checkbox is present is cleaner than the previous fixed negative margin approach. This provides better layout flexibility.

src/components/checkbox/checkbox.template.tsx (1)

53-64: Template structure simplification looks good.

The flattened template structure with consolidated conditional classes is cleaner and aligns well with the custom styling approach.

src/components/checkbox/checkbox.scss (7)

1-13: Excellent foundation for the MDC-free implementation.

The new variables and host styling provide a solid foundation. The minimum height prevents layout shifts during state changes, and the CSS custom properties follow lime-elements naming conventions correctly.


21-33: Well-structured container layout.

The flex layout with isolation provides proper stacking context and alignment. The consistent height ensures good integration with forms and table rows.


35-41: Proper native checkbox hiding.

Using the visually-hidden mixin ensures the native checkbox remains accessible to screen readers while being visually hidden.


43-70: Comprehensive label styling with proper state management.

The label styling handles all necessary states (disabled, required, invalid) with appropriate visual feedback. The asterisk for required fields and color changes for invalid states improve usability.


72-166: Sophisticated checkbox box implementation.

The .box styling provides smooth transitions, proper state feedback, and excellent hover/focus states. The pseudo-elements for focus indication and indeterminate state are well-implemented.


168-201: Smooth SVG checkmark animation.

The stroke-dasharray animation provides a pleasant checking experience. The conditional opacity based on checked and indeterminate states works correctly.


203-208: Good integration with related components.

The dynamic label margin adjustments and helper line integration maintain consistency across the component ecosystem.

@Kiarokh Kiarokh force-pushed the mdc-checkbox-styles branch from 6e452a6 to 948122c Compare August 6, 2025 13:56

$checkbox-distance-to-left-edge: 0.5rem;

.select-all,
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, i can't select all by clicking the top check box anymore

Screen.Recording.2025-08-06.at.16.04.27.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great catch. I'll check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

limel-checkbox is used the table component in 2 places. One is in the header row, to display a "select all" checkbox, and one in each individual row, for selecting individual rows.

In the current PR I removed MDC's styles (along with some classes) from limel-checkbox component. This change has made the "select all" checkbox unclickable. It is still possible to tab-focus the checkbox and toggle its state using keyboard. But clicking doesn't work.

When I inspect these two instances of limel-checkbox in limel-table, the only difference I see is presence of a (empty) <label> element on the other row checkboxes. But the one in the header doesn't have a label. I believe that is the reason is for the checkbox not being clickable. It seems that the label element is the only clickable part of the native checkbox element that I am using in CheckboxTemplate. The actual <input type="checkbox" element is hidden using CSS (due to styling needs). The <div class="box" that visualizes the checkbox in a custom way is actually not clickable at all, both due to pointer-events: none; and also even without that style, clicking it doesn't do anything anyways.

I'm currently investigating to see how to best solve this issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

529d1a3

Copy link
Contributor

Choose a reason for hiding this comment

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

great! 💫 I will test once more

Copy link
Contributor

Choose a reason for hiding this comment

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

works perfectly! ❤️

@Kiarokh Kiarokh enabled auto-merge (rebase) August 7, 2025 08:49
Copy link
Contributor

@LucyChyzhova LucyChyzhova left a comment

Choose a reason for hiding this comment

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

great job, Kia! 👏

As a first step of getting rid of MDC, we need to make sure that
the component renders correctly, without relying on any styles
applied by MDC.
@Kiarokh Kiarokh force-pushed the mdc-checkbox-styles branch from 4c574f3 to 7f3d650 Compare August 7, 2025 09:06
@Kiarokh Kiarokh merged commit ecd12c3 into main Aug 7, 2025
12 checks passed
@Kiarokh Kiarokh deleted the mdc-checkbox-styles branch August 7, 2025 09:09
@lime-opensource
Copy link
Collaborator

🎉 This PR is included in version 38.21.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkbox: get rid of MDC styles

4 participants