refactor(icon): remove disableSvgIcons from ´provideIconConfig()` o…#2239
refactor(icon): remove disableSvgIcons from ´provideIconConfig()` o…#2239spliffone wants to merge 2 commits into
disableSvgIcons from ´provideIconConfig()` o…#2239Conversation
add2e3e to
cc49bf8
Compare
There was a problem hiding this comment.
Code Review
This pull request removes the disableSvgIcons configuration option from the SiIconComponent and its corresponding tests, simplifying the icon rendering logic. Feedback on these changes suggests removing the now-obsolete icon configuration infrastructure (IconConfig, ICON_CONFIG, and provideIconConfig) entirely to prevent dead code, as well as cleaning up the empty TestBed.configureTestingModule({}) call in the unit tests since it is redundant for standalone components.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
| export interface IconConfig {} | ||
|
|
||
| const ICON_CONFIG = new InjectionToken<IconConfig>('ICON_CONFIG', { | ||
| providedIn: 'root', | ||
| factory: () => ({ disableSvgIcons: false }) | ||
| factory: () => ({}) | ||
| }); |
There was a problem hiding this comment.
Since disableSvgIcons was the only configuration option and has been removed, the entire icon configuration infrastructure (IconConfig, ICON_CONFIG, and provideIconConfig) is now unused dead code. Keeping an empty interface and bypassing the linter with // eslint-disable-next-line @typescript-eslint/no-empty-object-type is a code smell.
Unless there are plans to introduce other configuration options in the near future, please consider removing the configuration infrastructure entirely:
- Remove
IconConfig,ICON_CONFIG, andprovideIconConfig. - Remove the unused
InjectionTokenandProviderimports from@angular/core.
…ptions fixes #1510 BREAKING CHANGE: removed `disableSvgIcons` from ´provideIconConfig()` configuration Consumer which want to provide their own custom icons must call `addIcons` during application bootstrap.
cc49bf8 to
021e471
Compare
…ptions
fixes #1510
BREAKING CHANGE: removed
disableSvgIconsfrom ´provideIconConfig()` configurationConsumer which want to provide their own custom icons must call
addIconsduring application bootstrap.Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: