Skip to content

Conversation

@siltomato
Copy link
Collaborator

@siltomato siltomato commented Oct 23, 2025

This PR refactors the app to use standalone components and modern Angular provider patterns. Also AppModule and main.ts are migrated to the new Angular standalone bootstrapping API.

Used migration script ng g @angular/core:standalone with all three modes:

  1. Convert declarations to standalone.
  2. Remove unnecessary NgModules.
  3. Switch to standalone bootstrapping API.

Afterwards, manual migrations were needed, following these principles:

Provider functions over Modules

  • Used provideX() functions returning Provider[] or EnvironmentProviders instead of Angular modules (@NgModule)
  • Examples: provideI18nStory(), provideRouter(), provideTestRealtime()

Individual Directive/Pipe imports

  • Replaced CommonModule imports with specific directives: AsyncPipe, NgClass, KeyValuePipe (import only what's actually used in the component template)

Routing configuration

  • Used provideRouter(routes) in providers array instead of RouterModule.forRoot() or RouterModule.forChild() in imports

Test Module wrapper elimination

  • Removed wrapper @NgModule test classes (e.g., TestModule, DialogTestModule)
  • Imported dependencies directly in configureTestingModule() imports array

This change is Reviewable

@siltomato siltomato added the will require testing PR should not be merged until testers confirm testing is complete label Oct 23, 2025
@Nateowami Nateowami added the e2e Run e2e tests for this pull request label Oct 23, 2025
@codecov
Copy link

codecov bot commented Oct 23, 2025

❌ 19 Tests Failed:

Tests completed Failed Passed Skipped
4518 19 4499 3
View the top 3 failed test(s) by shortest run time
.JsonViewerComponent::JsonViewerComponent should display empty array
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:69:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display nested objects correctly
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:106:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display null value
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:22:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display string values with proper escaping
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:50:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should handle complex nested structure
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:148:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should handle mixed data types in array
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:136:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should handle undefined data
Stack Traces | 0s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:15:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent token generation::JsonViewerComponent token generation should generate correct token types for different values
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:205:19)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent token generation::JsonViewerComponent token generation should generate tokens with correct indent levels
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:233:19)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display array with values
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:77:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display boolean values
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:29:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display empty object
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:85:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display nested arrays correctly
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:124:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display number values
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:39:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should display object with key-value pairs
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:93:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should handle null data
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:8:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should include newline breaks
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:188:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should include proper indentation tokens
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:177:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.JsonViewerComponent::JsonViewerComponent should update tokens when data changes
Stack Traces | 0.001s run time
Error: Unexpected "HostComponent" found in the "declarations" array of the "TestBed.configureTestingModule" call, "HostComponent" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?
    at forEach (node_modules/@.../core/fesm2022/testing.mjs:769:23)
    at Array.forEach (<anonymous>)
    at assertNoStandaloneComponents (node_modules/@.../core/fesm2022/testing.mjs:765:11)
    at TestBedCompiler.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:844:13)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1976:23)
    at TestBedImpl.configureTestingModule (node_modules/@.../core/fesm2022/testing.mjs:1791:37)
    at new TestEnvironment (.../shared/json-viewer/json-viewer.component.spec.ts:258:13)
    at UserContext.apply (.../shared/json-viewer/json-viewer.component.spec.ts:194:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@siltomato siltomato force-pushed the task/convert-to-angular-standalone-components branch from 1346006 to 915e185 Compare October 23, 2025 17:49
@siltomato siltomato force-pushed the task/convert-to-angular-standalone-components branch from 915e185 to 18ec72f Compare October 24, 2025 15:31
@siltomato siltomato marked this pull request as ready for review October 24, 2025 22:35
@siltomato siltomato force-pushed the task/convert-to-angular-standalone-components branch from 6e057b5 to 7c59b63 Compare October 27, 2025 18:16
@Nateowami Nateowami requested a review from Copilot October 27, 2025 20:57
Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pmachapman pmachapman self-requested a review October 27, 2025 22:05
Copy link
Collaborator

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

This review has turned out to be more epic than I initially thought! I'm submitting a partial review of what I have so far.

Also, I noticed that these two files need to be updated to remove standalone: true and standalone: false:

  • src/SIL.XForge.Scripture/ClientApp/src/app/shared/json-viewer/json-viewer.component.ts
  • src/SIL.XForge.Scripture/ClientApp/src/app/shared/json-viewer/json-viewer.component.spec.ts

@pmachapman reviewed 203 of 305 files at r1, all commit messages.
Reviewable status: 203 of 305 files reviewed, 4 unresolved discussions


src/SIL.XForge.Scripture/ClientApp/src/app/my-projects/my-projects.stories.ts line 195 at r1 (raw file):

      imports: [
        UICommonModule,
        SharedModule.forRoot(),

I think that the change to the chromatic tests is from this removal. (I don't think we should add provideUICommon() - I just wanted to flag what I think the possible cause is)

Code quote:

        UICommonModule,
        SharedModule.forRoot(),

src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/job-events-dialog.component.ts line 39 at r1 (raw file):

  imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatIcon, JsonViewerComponent]
})
export class JobEventsDialogComponent {

RE: Your merge conflict, this class is now JobDetailsDialogComponent (job-details-dialog.component.ts)

Code quote:

export class JobEventsDialogComponent {

src/SIL.XForge.Scripture/ClientApp/src/app/event-metrics/event-metric-dialog.component.html line 2 at r1 (raw file):

<ng-container *transloco="let t; read: 'event_metric_dialog'">
  <div [dir]="i18n.direction">

I'm guessing this was changed because <mat-dialog> is not a valid tag?

I did a quick search and this tag is still being used in:

  • src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-confirmation-dialog/import-questions-confirmation-dialog.component.html
  • src/SIL.XForge.Scripture/ClientApp/src/app/settings/delete-project-dialog/delete-project-dialog.component.html

Code quote:

<div [dir]="i18n.direction">

src/SIL.XForge.Scripture/ClientApp/.storybook/preview.ts line 13 at r1 (raw file):

import docJson from '../documentation.json';
import { provideSFTabs } from '../src/app/shared/sf-tab-group';
import { provideUICommon } from '../src/xforge-common/ui-common-providers';

NIT: This should be:

import { provideUICommon } from 'xforge-common/ui-common-providers';

Code quote:

import { provideUICommon } from '../src/xforge-common/ui-common-providers';

src/SIL.XForge.Scripture/ClientApp/src/main.ts line 10 at r1 (raw file):

} from '@angular/core';

import { ExceptionHandlingService } from 'xforge-common/exception-handling.service';

NIT: If the new lines are removed from above and below this line, the imports will sort correctly.

Suggestion:

import { ExceptionHandlingService } from 'xforge-common/exception-handling.service';

@siltomato siltomato force-pushed the task/convert-to-angular-standalone-components branch from 7c59b63 to 96691a4 Compare October 28, 2025 17:09
Copy link
Collaborator Author

@siltomato siltomato left a comment

Choose a reason for hiding this comment

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

Reviewable status: 203 of 305 files reviewed, 2 unresolved discussions (waiting on @pmachapman)


src/SIL.XForge.Scripture/ClientApp/.storybook/preview.ts line 13 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

NIT: This should be:

import { provideUICommon } from 'xforge-common/ui-common-providers';

Done.


src/SIL.XForge.Scripture/ClientApp/src/main.ts line 10 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

NIT: If the new lines are removed from above and below this line, the imports will sort correctly.

Done.


src/SIL.XForge.Scripture/ClientApp/src/app/event-metrics/event-metric-dialog.component.html line 2 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

I'm guessing this was changed because <mat-dialog> is not a valid tag?

I did a quick search and this tag is still being used in:

  • src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-confirmation-dialog/import-questions-confirmation-dialog.component.html
  • src/SIL.XForge.Scripture/ClientApp/src/app/settings/delete-project-dialog/delete-project-dialog.component.html

Good catch, thanks!


src/SIL.XForge.Scripture/ClientApp/src/app/my-projects/my-projects.stories.ts line 195 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

I think that the change to the chromatic tests is from this removal. (I don't think we should add provideUICommon() - I just wanted to flag what I think the possible cause is)

Yeah, maybe it is related to removal of UICommonModule, although provideUICommon() is now being applied to all stories via preview.ts.


src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/job-events-dialog.component.ts line 39 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

RE: Your merge conflict, this class is now JobDetailsDialogComponent (job-details-dialog.component.ts)

Thanks for the heads up!

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

Labels

e2e Run e2e tests for this pull request will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants