From 98a83803ee79ab3b67193507b530ea9467fe4419 Mon Sep 17 00:00:00 2001 From: hoonji <736199+hoonji@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:04:48 +0900 Subject: [PATCH] Removes obsolete entryComponents from ngModules (#6677) ## 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) --- .../debugger_v2/tf_debugger_v2_plugin/debugger_module.ts | 1 - tensorboard/webapp/alert/views/alert_snackbar_module.ts | 4 ---- tensorboard/webapp/app_routing/route_registry_module.ts | 1 - .../webapp/app_routing/views/router_outlet_test.ts | 8 +------- .../webapp/customization/customizable_component.ts | 1 - tensorboard/webapp/customization/customization_test.ts | 2 -- .../feature_flag/views/feature_flag_dialog_module.ts | 1 - .../views/feature_flag_modal_trigger_module.ts | 1 - tensorboard/webapp/metrics/metrics_module.ts | 1 - .../metrics/views/card_renderer/data_download_module.ts | 1 - tensorboard/webapp/plugins/plugin_registry_module.ts | 1 - tensorboard/webapp/plugins/testing/index.ts | 1 - .../webapp/runs/views/runs_table/runs_table_module.ts | 1 - tensorboard/webapp/settings/_views/settings_module.ts | 1 - tensorboard/webapp/settings/_views/settings_test.ts | 8 +------- tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts | 1 - 16 files changed, 2 insertions(+), 32 deletions(-) diff --git a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/debugger_module.ts b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/debugger_module.ts index f719f3fd8a..c2aaf43872 100644 --- a/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/debugger_module.ts +++ b/tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/debugger_module.ts @@ -52,6 +52,5 @@ import {TimelineModule} from './views/timeline/timeline_module'; PluginRegistryModule.forPlugin(PLUGIN_ID, DebuggerContainer), ], exports: [DebuggerContainer], - entryComponents: [DebuggerContainer], }) export class DebuggerModule {} diff --git a/tensorboard/webapp/alert/views/alert_snackbar_module.ts b/tensorboard/webapp/alert/views/alert_snackbar_module.ts index 5aa90179fb..6c936bf153 100644 --- a/tensorboard/webapp/alert/views/alert_snackbar_module.ts +++ b/tensorboard/webapp/alert/views/alert_snackbar_module.ts @@ -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 {} diff --git a/tensorboard/webapp/app_routing/route_registry_module.ts b/tensorboard/webapp/app_routing/route_registry_module.ts index fc1fcbdd42..ddb2b12d07 100644 --- a/tensorboard/webapp/app_routing/route_registry_module.ts +++ b/tensorboard/webapp/app_routing/route_registry_module.ts @@ -92,7 +92,6 @@ export class RouteRegistryModule { * imports: [ * RouteRegistryModule.registerRoutes(routesProvider), * ], - * entryComponents: [ScalarsDashboard] * }) */ static registerRoutes( diff --git a/tensorboard/webapp/app_routing/views/router_outlet_test.ts b/tensorboard/webapp/app_routing/views/router_outlet_test.ts index 9724a4b743..84ee2d67f2 100644 --- a/tensorboard/webapp/app_routing/views/router_outlet_test.ts +++ b/tensorboard/webapp/app_routing/views/router_outlet_test.ts @@ -59,13 +59,7 @@ describe('router_outlet', () => { SecondTestableComponent, ], schemas: [NO_ERRORS_SCHEMA], - }) - .overrideModule(BrowserDynamicTestingModule, { - set: { - entryComponents: [FirstTestableComponent, SecondTestableComponent], - }, - }) - .compileComponents(); + }).compileComponents(); store = TestBed.inject>(Store) as MockStore; store.overrideSelector(getActiveRoute, null); diff --git a/tensorboard/webapp/customization/customizable_component.ts b/tensorboard/webapp/customization/customizable_component.ts index 67bc583440..aa809d4341 100644 --- a/tensorboard/webapp/customization/customizable_component.ts +++ b/tensorboard/webapp/customization/customizable_component.ts @@ -67,7 +67,6 @@ import { * * @NgModule({ * declarations: [MyCustomButtonComponent], - * entryComponents: [MyCustomButtonComponent], * providers: [{ * provide: CustomizableButton, * useClass: MyCustomButtonComponent, diff --git a/tensorboard/webapp/customization/customization_test.ts b/tensorboard/webapp/customization/customization_test.ts index c7bb31d512..73211b832f 100644 --- a/tensorboard/webapp/customization/customization_test.ts +++ b/tensorboard/webapp/customization/customization_test.ts @@ -46,7 +46,6 @@ export class ParentComponent { @NgModule({ imports: [CustomizationModule], declarations: [ParentComponent], - entryComponents: [ParentComponent], }) export class ParentComponentModule {} @@ -65,7 +64,6 @@ export class CustomizableComponent {} */ @NgModule({ declarations: [CustomizableComponent], - entryComponents: [CustomizableComponent], providers: [ { provide: CustomizableComponentType, diff --git a/tensorboard/webapp/feature_flag/views/feature_flag_dialog_module.ts b/tensorboard/webapp/feature_flag/views/feature_flag_dialog_module.ts index 1e38417533..4ea4f3e71a 100644 --- a/tensorboard/webapp/feature_flag/views/feature_flag_dialog_module.ts +++ b/tensorboard/webapp/feature_flag/views/feature_flag_dialog_module.ts @@ -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 {} diff --git a/tensorboard/webapp/feature_flag/views/feature_flag_modal_trigger_module.ts b/tensorboard/webapp/feature_flag/views/feature_flag_modal_trigger_module.ts index b46741a6c9..44bd90bf7b 100644 --- a/tensorboard/webapp/feature_flag/views/feature_flag_modal_trigger_module.ts +++ b/tensorboard/webapp/feature_flag/views/feature_flag_modal_trigger_module.ts @@ -25,6 +25,5 @@ import {FeatureFlagDialogModule} from './feature_flag_dialog_module'; declarations: [FeatureFlagModalTriggerContainer], imports: [CommonModule, FeatureFlagDialogModule], exports: [FeatureFlagModalTriggerContainer], - entryComponents: [FeatureFlagModalTriggerContainer], }) export class FeatureFlagModalTriggerModule {} diff --git a/tensorboard/webapp/metrics/metrics_module.ts b/tensorboard/webapp/metrics/metrics_module.ts index 724f7466ee..2e9cedc6aa 100644 --- a/tensorboard/webapp/metrics/metrics_module.ts +++ b/tensorboard/webapp/metrics/metrics_module.ts @@ -189,6 +189,5 @@ export function getRangeSelectionHeadersFactory() { useValue: METRICS_SETTINGS_DEFAULT, }, ], - entryComponents: [MetricsDashboardContainer], }) export class MetricsModule {} diff --git a/tensorboard/webapp/metrics/views/card_renderer/data_download_module.ts b/tensorboard/webapp/metrics/views/card_renderer/data_download_module.ts index 6439660572..af28c21683 100644 --- a/tensorboard/webapp/metrics/views/card_renderer/data_download_module.ts +++ b/tensorboard/webapp/metrics/views/card_renderer/data_download_module.ts @@ -37,6 +37,5 @@ import {DataDownloadDialogContainer} from './data_download_dialog_container'; MatSelectModule, MetricsDataSourceModule, ], - entryComponents: [DataDownloadDialogContainer], }) export class DataDownloadModule {} diff --git a/tensorboard/webapp/plugins/plugin_registry_module.ts b/tensorboard/webapp/plugins/plugin_registry_module.ts index a857d4f8b9..f9ce7850da 100644 --- a/tensorboard/webapp/plugins/plugin_registry_module.ts +++ b/tensorboard/webapp/plugins/plugin_registry_module.ts @@ -53,7 +53,6 @@ export class PluginRegistryModule { * imports: [ * PluginRegistryModule.forPlugin('scalars', ScalarsDashboard) * ], - * entryComponents: [ScalarsDashboard] * }) */ static forPlugin( diff --git a/tensorboard/webapp/plugins/testing/index.ts b/tensorboard/webapp/plugins/testing/index.ts index 0e0f74102c..e33b7edd3d 100644 --- a/tensorboard/webapp/plugins/testing/index.ts +++ b/tensorboard/webapp/plugins/testing/index.ts @@ -26,6 +26,5 @@ export class ExtraDashboardComponent {} imports: [ PluginRegistryModule.forPlugin('extra-plugin', ExtraDashboardComponent), ], - entryComponents: [ExtraDashboardComponent], }) export class ExtraDashboardModule {} diff --git a/tensorboard/webapp/runs/views/runs_table/runs_table_module.ts b/tensorboard/webapp/runs/views/runs_table/runs_table_module.ts index 2385048b97..443fe934e5 100644 --- a/tensorboard/webapp/runs/views/runs_table/runs_table_module.ts +++ b/tensorboard/webapp/runs/views/runs_table/runs_table_module.ts @@ -65,7 +65,6 @@ import {RunsTableContainer} from './runs_table_container'; AlertModule, ], exports: [RunsTableContainer], - entryComponents: [RegexEditDialogContainer], declarations: [ RegexEditDialogComponent, RegexEditDialogContainer, diff --git a/tensorboard/webapp/settings/_views/settings_module.ts b/tensorboard/webapp/settings/_views/settings_module.ts index 3f4119d57d..df1eb0a297 100644 --- a/tensorboard/webapp/settings/_views/settings_module.ts +++ b/tensorboard/webapp/settings/_views/settings_module.ts @@ -40,7 +40,6 @@ import {SettingsDialogContainer} from './settings_dialog_container'; SettingsDialogContainer, SettingsPolymerInteropContainer, ], - entryComponents: [SettingsDialogContainer], imports: [ CommonModule, FormsModule, diff --git a/tensorboard/webapp/settings/_views/settings_test.ts b/tensorboard/webapp/settings/_views/settings_test.ts index c1c24f5e97..c23fc7704b 100644 --- a/tensorboard/webapp/settings/_views/settings_test.ts +++ b/tensorboard/webapp/settings/_views/settings_test.ts @@ -72,13 +72,7 @@ describe('settings test', () => { SettingsButtonComponent, SettingsButtonContainer, ], - }) - .overrideModule(BrowserDynamicTestingModule, { - set: { - entryComponents: [SettingsDialogContainer], - }, - }) - .compileComponents(); + }).compileComponents(); store = TestBed.inject(Store) as MockStore; dispatchSpy = spyOn(store, 'dispatch'); overlayContainer = TestBed.inject(OverlayContainer); diff --git a/tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts b/tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts index 0d16b88d1d..654b0be89e 100644 --- a/tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts +++ b/tensorboard/webapp/tb_wrapper/tb_wrapper_module.ts @@ -25,6 +25,5 @@ import {TensorBoardWrapperComponent} from './tb_wrapper_component'; declarations: [TensorBoardWrapperComponent], imports: [CommonModule, PluginsModule, ReloaderModule], exports: [TensorBoardWrapperComponent], - entryComponents: [TensorBoardWrapperComponent], }) export class TensorBoardWrapperModule {}