Skip to content

Commit 910f105

Browse files
committed
refactor: add explicit changeDetection property on all components.
1 parent fe3782a commit 910f105

87 files changed

Lines changed: 485 additions & 179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/debugger_container.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component, OnDestroy, OnInit} from '@angular/core';
15+
import {
16+
ChangeDetectionStrategy,
17+
Component,
18+
OnDestroy,
19+
OnInit,
20+
} from '@angular/core';
1621
import {createSelector, select, Store} from '@ngrx/store';
1722
import {debuggerLoaded, debuggerUnloaded} from './actions';
1823
import {getActiveRunId, getDebuggerRunListing} from './store';
1924
import {State} from './store/debugger_types';
2025

2126
@Component({
27+
changeDetection: ChangeDetectionStrategy.Default,
2228
standalone: false,
2329
selector: 'tf-debugger-v2',
2430
template: `

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/testing/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
import {Component, NgModule} from '@angular/core';
16+
import {ChangeDetectionStrategy, Component, NgModule} from '@angular/core';
1717
import {Store} from '@ngrx/store';
1818
import {
1919
createInitialExecutionsState,
@@ -354,6 +354,7 @@ export function createState(
354354
// that use it.
355355

356356
@Component({
357+
changeDetection: ChangeDetectionStrategy.Default,
357358
standalone: false,
358359
selector: 'tf-debugger-v2',
359360
template: ``,

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/alerts/alerts_component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component, EventEmitter, Input, Output} from '@angular/core';
15+
import {
16+
ChangeDetectionStrategy,
17+
Component,
18+
EventEmitter,
19+
Input,
20+
Output,
21+
} from '@angular/core';
1622
import {AlertType} from '../../store/debugger_types';
1723

1824
export interface AlertTypeDisplay {
@@ -23,6 +29,7 @@ export interface AlertTypeDisplay {
2329
}
2430

2531
@Component({
32+
changeDetection: ChangeDetectionStrategy.Default,
2633
standalone: false,
2734
selector: 'alerts-component',
2835
templateUrl: './alerts_component.ng.html',

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/debug_tensor_value/debug_tensor_value_component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component, Input} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
1616
import {DebugTensorValue} from '../../store/debugger_types';
1717

1818
const basicDebugInfoStyle = `
@@ -30,6 +30,7 @@ const basicDebugInfoStyle = `
3030
`;
3131

3232
@Component({
33+
changeDetection: ChangeDetectionStrategy.Default,
3334
standalone: false,
3435
selector: 'debug-tensor-dtype',
3536
template: ` {{ dtype }} `,
@@ -41,6 +42,7 @@ export class DebugTensorDTypeComponent {
4142
}
4243

4344
@Component({
45+
changeDetection: ChangeDetectionStrategy.Default,
4446
standalone: false,
4547
selector: 'debug-tensor-rank',
4648
template: ` {{ rank }}D `,
@@ -52,6 +54,7 @@ export class DebugTensorRankComponent {
5254
}
5355

5456
@Component({
57+
changeDetection: ChangeDetectionStrategy.Default,
5558
standalone: false,
5659
selector: 'debug-tensor-shape',
5760
template: ` shape:{{ shapeString }} `,
@@ -75,6 +78,7 @@ export class DebugTensorShapeComponent {
7578
}
7679

7780
@Component({
81+
changeDetection: ChangeDetectionStrategy.Default,
7882
standalone: false,
7983
selector: 'debug-tensor-numeric-breakdown',
8084
template: `
@@ -209,6 +213,7 @@ export class DebugTensorNumericBreakdownComponent {
209213
}
210214

211215
@Component({
216+
changeDetection: ChangeDetectionStrategy.Default,
212217
standalone: false,
213218
selector: 'debug-tensor-has-inf-or-nan',
214219
template: `
@@ -247,6 +252,7 @@ export class DebugTensorHasInfOrNaNComponent {
247252
}
248253

249254
@Component({
255+
changeDetection: ChangeDetectionStrategy.Default,
250256
standalone: false,
251257
selector: 'debug-tensor-value',
252258
template: `

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/execution_data/execution_data_component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component, Input} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
1616
import {Execution, TensorDebugMode} from '../../store/debugger_types';
1717
import {parseDebugTensorValue} from '../../store/debug_tensor_value';
1818

1919
@Component({
20+
changeDetection: ChangeDetectionStrategy.Default,
2021
standalone: false,
2122
selector: 'execution-data-component',
2223
templateUrl: './execution_data_component.ng.html',

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/execution_data/execution_data_container.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component, Input} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
1616
import {createSelector, select, Store} from '@ngrx/store';
1717
import {getFocusedExecutionData} from '../../store';
1818
import {Execution, State, TensorDebugMode} from '../../store/debugger_types';
@@ -21,6 +21,7 @@ import {DTYPE_ENUM_TO_NAME} from '../../tf_dtypes';
2121
const UNKNOWN_DTYPE_NAME = 'Unknown dtype';
2222

2323
@Component({
24+
changeDetection: ChangeDetectionStrategy.Default,
2425
standalone: false,
2526
selector: 'tf-debugger-v2-execution-data',
2627
template: `

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/graph/graph_container.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component} from '@angular/core';
1616
import {select, Store} from '@ngrx/store';
1717
import {graphOpFocused} from '../../actions';
1818
import {
@@ -23,6 +23,7 @@ import {
2323
import {State} from '../../store/debugger_types';
2424

2525
@Component({
26+
changeDetection: ChangeDetectionStrategy.Default,
2627
standalone: false,
2728
selector: 'tf-debugger-v2-graph',
2829
template: `

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/graph/graph_op_component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
import {Component, EventEmitter, Input, Output} from '@angular/core';
16+
import {
17+
ChangeDetectionStrategy,
18+
Component,
19+
EventEmitter,
20+
Input,
21+
Output,
22+
} from '@angular/core';
1723
import {GraphOpInfo} from '../../store/debugger_types';
1824

1925
@Component({
26+
changeDetection: ChangeDetectionStrategy.Default,
2027
standalone: false,
2128
selector: 'graph-op',
2229
templateUrl: 'graph_op_component.ng.html',

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/graph_executions/graph_executions_container.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component} from '@angular/core';
1616
import {createSelector, select, Store} from '@ngrx/store';
1717
import {
1818
graphExecutionFocused,
@@ -27,6 +27,7 @@ import {
2727
import {State} from '../../store/debugger_types';
2828

2929
@Component({
30+
changeDetection: ChangeDetectionStrategy.Default,
3031
standalone: false,
3132
selector: 'tf-debugger-v2-graph-executions',
3233
template: `

tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/inactive/inactive_component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
import {Component} from '@angular/core';
15+
import {ChangeDetectionStrategy, Component} from '@angular/core';
1616

1717
@Component({
18+
changeDetection: ChangeDetectionStrategy.Default,
1819
standalone: false,
1920
selector: 'inactive-component',
2021
templateUrl: './inactive_component.ng.html',

0 commit comments

Comments
 (0)