feat(theme): support dynamic dom target in SiThemeService - #2591
Open
chintankavathia wants to merge 1 commit into
Open
feat(theme): support dynamic dom target in SiThemeService#2591chintankavathia wants to merge 1 commit into
SiThemeService#2591chintankavathia wants to merge 1 commit into
Conversation
chintankavathia
force-pushed
the
feat/theme/scoped/theme-service
branch
from
August 20, 2026 06:15
8716d40 to
01f793c
Compare
chintankavathia
marked this pull request as ready for review
August 20, 2026 06:34
dr-itz
reviewed
Aug 20, 2026
| import { DOCUMENT, inject, InjectionToken } from '@angular/core'; | ||
| import { Meta } from '@angular/platform-browser'; | ||
|
|
||
| export type SiResolvedColorScheme = 'dark' | 'light'; |
Member
There was a problem hiding this comment.
In theme service we have type ThemeType = 'dark' | 'light' | 'auto'. So this is the same minus the 'auto'.
Can we instead have something like
export type ColorScheme = 'light' | 'dark';
export type ThemeType = ColorScheme | 'auto'so that the relation is clear. Guess si-theme.model.ts is the right place for this
Allows SiThemeService to target specified DOM root instead of hardcoded document element which fails in case of micro frontends loading element on shadow dom host. `siShadowRoot` can now preconfigure target element for `SiThemeService`.
chintankavathia
force-pushed
the
feat/theme/scoped/theme-service
branch
from
August 20, 2026 14:09
01f793c to
563c9ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows
SiThemeServiceto target specified DOM root instead of hardcoded document element which fails in case of micro frontends loading element on shadow dom host.siShadowRootcan now preconfigure target element forSiThemeService.Background
The theme service previously applied theme state only to the document root. Content rendered in a Shadow DOM using :host as root selector therefore did not reliably receive theme classes, color scheme, or generated theme styles.
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: