Skip to content

Commit

Permalink
Removes obsolete entryComponents from ngModules (#6677)
Browse files Browse the repository at this point in the history
## Motivation for features / changes
As of Angular 12 the entryComponents aren't required anymore.

## Technical description of changes
Removes entryComponents properties fields from all ngModules calls.

## Screenshots of UI changes (or N/A)

## Detailed steps to verify changes work correctly (as executed by you)

## Alternate designs / implementations considered (or N/A)
  • Loading branch information
hoonji authored Nov 8, 2023
1 parent 1346620 commit 98a8380
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ import {TimelineModule} from './views/timeline/timeline_module';
PluginRegistryModule.forPlugin(PLUGIN_ID, DebuggerContainer),
],
exports: [DebuggerContainer],
entryComponents: [DebuggerContainer],
})
export class DebuggerModule {}
4 changes: 0 additions & 4 deletions tensorboard/webapp/alert/views/alert_snackbar_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,5 @@ import {AlertSnackbarContainer} from './alert_snackbar_container';
declarations: [AlertSnackbarContainer, AlertDisplaySnackbarContainer],
exports: [AlertSnackbarContainer],
imports: [CommonModule, MatButtonModule, MatSnackBarModule],
entryComponents: [
// Required for non-Ivy Angular apps.
AlertDisplaySnackbarContainer,
],
})
export class AlertSnackbarModule {}
1 change: 0 additions & 1 deletion tensorboard/webapp/app_routing/route_registry_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export class RouteRegistryModule {
* imports: [
* RouteRegistryModule.registerRoutes(routesProvider),
* ],
* entryComponents: [ScalarsDashboard]
* })
*/
static registerRoutes(
Expand Down
8 changes: 1 addition & 7 deletions tensorboard/webapp/app_routing/views/router_outlet_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ describe('router_outlet', () => {
SecondTestableComponent,
],
schemas: [NO_ERRORS_SCHEMA],
})
.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [FirstTestableComponent, SecondTestableComponent],
},
})
.compileComponents();
}).compileComponents();

store = TestBed.inject<Store<State>>(Store) as MockStore<State>;
store.overrideSelector(getActiveRoute, null);
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/customization/customizable_component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import {
*
* @NgModule({
* declarations: [MyCustomButtonComponent],
* entryComponents: [MyCustomButtonComponent],
* providers: [{
* provide: CustomizableButton,
* useClass: MyCustomButtonComponent,
Expand Down
2 changes: 0 additions & 2 deletions tensorboard/webapp/customization/customization_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export class ParentComponent {
@NgModule({
imports: [CustomizationModule],
declarations: [ParentComponent],
entryComponents: [ParentComponent],
})
export class ParentComponentModule {}

Expand All @@ -65,7 +64,6 @@ export class CustomizableComponent {}
*/
@NgModule({
declarations: [CustomizableComponent],
entryComponents: [CustomizableComponent],
providers: [
{
provide: CustomizableComponentType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ import {FeatureFlagDialogContainer} from './feature_flag_dialog_container';
declarations: [FeatureFlagDialogComponent, FeatureFlagDialogContainer],
imports: [CommonModule, MatButtonModule, MatSelectModule],
exports: [FeatureFlagDialogContainer],
entryComponents: [FeatureFlagDialogContainer],
})
export class FeatureFlagDialogModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ import {FeatureFlagDialogModule} from './feature_flag_dialog_module';
declarations: [FeatureFlagModalTriggerContainer],
imports: [CommonModule, FeatureFlagDialogModule],
exports: [FeatureFlagModalTriggerContainer],
entryComponents: [FeatureFlagModalTriggerContainer],
})
export class FeatureFlagModalTriggerModule {}
1 change: 0 additions & 1 deletion tensorboard/webapp/metrics/metrics_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,5 @@ export function getRangeSelectionHeadersFactory() {
useValue: METRICS_SETTINGS_DEFAULT,
},
],
entryComponents: [MetricsDashboardContainer],
})
export class MetricsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ import {DataDownloadDialogContainer} from './data_download_dialog_container';
MatSelectModule,
MetricsDataSourceModule,
],
entryComponents: [DataDownloadDialogContainer],
})
export class DataDownloadModule {}
1 change: 0 additions & 1 deletion tensorboard/webapp/plugins/plugin_registry_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class PluginRegistryModule {
* imports: [
* PluginRegistryModule.forPlugin('scalars', ScalarsDashboard)
* ],
* entryComponents: [ScalarsDashboard]
* })
*/
static forPlugin(
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/plugins/testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ export class ExtraDashboardComponent {}
imports: [
PluginRegistryModule.forPlugin('extra-plugin', ExtraDashboardComponent),
],
entryComponents: [ExtraDashboardComponent],
})
export class ExtraDashboardModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import {RunsTableContainer} from './runs_table_container';
AlertModule,
],
exports: [RunsTableContainer],
entryComponents: [RegexEditDialogContainer],
declarations: [
RegexEditDialogComponent,
RegexEditDialogContainer,
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/settings/_views/settings_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {SettingsDialogContainer} from './settings_dialog_container';
SettingsDialogContainer,
SettingsPolymerInteropContainer,
],
entryComponents: [SettingsDialogContainer],
imports: [
CommonModule,
FormsModule,
Expand Down
8 changes: 1 addition & 7 deletions tensorboard/webapp/settings/_views/settings_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@ describe('settings test', () => {
SettingsButtonComponent,
SettingsButtonContainer,
],
})
.overrideModule(BrowserDynamicTestingModule, {
set: {
entryComponents: [SettingsDialogContainer],
},
})
.compileComponents();
}).compileComponents();
store = TestBed.inject<Store>(Store) as MockStore;
dispatchSpy = spyOn(store, 'dispatch');
overlayContainer = TestBed.inject(OverlayContainer);
Expand Down
1 change: 0 additions & 1 deletion tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ import {TensorBoardWrapperComponent} from './tb_wrapper_component';
declarations: [TensorBoardWrapperComponent],
imports: [CommonModule, PluginsModule, ReloaderModule],
exports: [TensorBoardWrapperComponent],
entryComponents: [TensorBoardWrapperComponent],
})
export class TensorBoardWrapperModule {}

0 comments on commit 98a8380

Please sign in to comment.