Skip to content

fix(checkbox,ripple): restore theme inheritance for scoped tick mark - #17571

Merged
simeonoff merged 2 commits into
masterfrom
simeonoff/fix-15021-22.2.x
Sep 3, 2026
Merged

fix(checkbox,ripple): restore theme inheritance for scoped tick mark#17571
simeonoff merged 2 commits into
masterfrom
simeonoff/fix-15021-22.2.x

Conversation

@simeonoff

Copy link
Copy Markdown
Member

Closes #15021

Description

  • IgxCheckboxComponent
    • Fixed the tick-mark icon rendering with the Indigo shape (rounded rect + custom path) inside CSS-scoped subtrees that use a different design system than the application's global theme, e.g. a material-themed widget nested inside an indigo-themed app. Both tick-mark variants are now always rendered and toggled purely via CSS (@container style(--ig-theme: indigo)), removing the dependency on JS-side theme detection that could go stale in nested/multi-theme scenarios (Checkbox SVG icon displays incorrectly in applications with multiple themes #15021).
  • Ripple
    • Fixed [igxRipple] unconditionally stamping --ig-theme/--ig-theme-variant (from its own compile-time schema) onto its host element, which broke runtime theme inheritance for any content nested inside a ripple host (e.g. a checkbox's tick mark) when that content sat in a differently CSS-scoped theme than the app's global one.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

Checkbox, Days View, Ripple, Input Group

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Fixed the tick-mark icon rendering with the Indigo shape (rounded rect +
custom path) inside CSS-scoped subtrees that use a different design
system than the application's global theme, e.g. a `material`-themed
widget nested inside an `indigo`-themed app. Both tick-mark variants are
now always rendered and toggled purely via CSS (`@container
style(--ig-theme: indigo)`), removing the dependency on JS-side theme
detection that could go stale in nested/multi-theme scenarios (#15021)
Copilot AI lite review requested due to automatic review settings September 3, 2026 12:35
@desig9stein desig9stein added the ✅ status: verified Applies to PRs that have passed manual verification label Sep 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

CheckboxBaseDirective uses takeUntil(this.destroy$) but never triggers destroy$, so statusChanges subscriptions can leak on teardown.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR fixes multi-theme behavior regressions by making theme selection fully CSS-driven (via --ig-theme scoping and container style queries), ensuring nested/scoped theme contexts render correctly without relying on potentially stale JS-side theme detection.

Changes:

  • Update checkbox tick-mark rendering to always stamp both SVG variants and switch visibility purely via CSS-scoped theme signals.
  • Fix ripple theme styling so [igxRipple] no longer breaks runtime theme inheritance for nested content by overriding --ig-theme/--ig-theme-variant to inherit.
  • Add regression unit tests and update getComponentTheme() to read --ig-theme (the live scoping source of truth).
File summaries
File Description
projects/igniteui-angular/input-group/src/input-group/input-group.component.spec.ts Adds regression test ensuring getComponentTheme() reflects locally scoped --ig-theme rather than only global theme.
projects/igniteui-angular/directives/src/directives/checkbox/checkbox-base.directive.ts Removes ThemeToken-based theme tracking from the checkbox base directive.
projects/igniteui-angular/core/src/core/utils.ts Switches getComponentTheme() to read --ig-theme and documents intended semantics.
projects/igniteui-angular/core/src/core/styles/components/ripple/_ripple-theme.scss Restores theme inheritance under ripple hosts/wrappers by forcing --ig-theme/variant to inherit.
projects/igniteui-angular/checkbox/src/checkbox/themes/shared/_indigo.scss Makes Indigo tick-mark styling target the Indigo mark variant and hides non-Indigo mark within Indigo theme scoping.
projects/igniteui-angular/checkbox/src/checkbox/themes/_base.scss Hides the Indigo mark by default for non-Indigo themes.
projects/igniteui-angular/checkbox/src/checkbox/checkbox.component.ts Removes host theme-class bindings, relying on CSS-scoped theming instead.
projects/igniteui-angular/checkbox/src/checkbox/checkbox.component.spec.ts Adds regression tests for nested theme scoping (issue #15021) validating mark visibility.
projects/igniteui-angular/checkbox/src/checkbox/checkbox.component.html Always renders both tick-mark SVG variants and relies on CSS to toggle visibility.
projects/igniteui-angular/calendar/src/calendar/days-view/days-view.component.ts Removes ThemeToken-based theme-class bindings from days view.
CHANGELOG.md Documents the checkbox and ripple theming bug fixes under 22.2.0.
Review details

Suppressed comments (1)

projects/igniteui-angular/directives/src/directives/checkbox/checkbox-base.directive.ts:235

  • destroy$ is never emitted/completed, so the statusChanges subscription in ngAfterViewInit() that uses takeUntil(this.destroy$) won't unsubscribe when the directive is destroyed. Hooking the Subject into DestroyRef ensures proper cleanup for all derived components (including those that override ngOnDestroy).
    constructor() {
        if (this.ngControl !== null) {
            this.ngControl.valueAccessor = this;
        }
    }
  • Files reviewed: 11/11 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1 to 5
import { Directive, EventEmitter, HostListener, HostBinding, Input, Output, ViewChild, ElementRef, ChangeDetectorRef, booleanAttribute, inject, AfterViewInit } from '@angular/core';
import { NgControl, Validators } from '@angular/forms';
import { IBaseEventArgs, getComponentTheme } from 'igniteui-angular/core';
import { IBaseEventArgs } from 'igniteui-angular/core';
import { noop, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@simeonoff simeonoff added checkbox ripple ✨ themes version: 22.2.x ✅ status: verified Applies to PRs that have passed manual verification and removed ✅ status: verified Applies to PRs that have passed manual verification labels Sep 3, 2026
@simeonoff
simeonoff enabled auto-merge (squash) September 3, 2026 12:48
@simeonoff
simeonoff merged commit e8c7e25 into master Sep 3, 2026
7 checks passed
@simeonoff
simeonoff deleted the simeonoff/fix-15021-22.2.x branch September 3, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

checkbox ripple ✨ themes version: 22.2.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox SVG icon displays incorrectly in applications with multiple themes

3 participants