Skip to content

Commit

Permalink
Migration to use the new MDC-based Angular Components. Components mig…
Browse files Browse the repository at this point in the history
…rated: dialog

PiperOrigin-RevId: 565826702
  • Loading branch information
zzzaries authored and copybara-github committed Sep 16, 2023
1 parent 1e24668 commit a53fc3e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion frontend/app/common/angular/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ts_library(
)

ts_library(
name = "angular_material_legacy_dialog",
name = "angular_material_dialog",
srcs = [],
deps = [
"@npm//@angular/material",
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/capture_profile/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ xprof_ng_module(
"@npm//@ngrx/store",
"@npm//rxjs",
"@org_xprof//frontend/app/common/angular:angular_material_button",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_dialog",
"@org_xprof//frontend/app/common/angular:angular_material_dialog",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_progress_spinner",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_snack_bar",
"@org_xprof//frontend/app/common/interfaces",
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/components/capture_profile/capture_profile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, OnDestroy} from '@angular/core';
import {MatLegacyDialog} from '@angular/material/legacy-dialog';
import {MatDialog} from '@angular/material/dialog';
import {MatLegacySnackBar} from '@angular/material/legacy-snack-bar';
import {Store} from '@ngrx/store';
import {CaptureProfileOptions, CaptureProfileResponse} from 'org_xprof/frontend/app/common/interfaces/capture_profile';
Expand Down Expand Up @@ -27,7 +27,7 @@ export class CaptureProfile implements OnDestroy {
capturingProfile: Observable<boolean>;

constructor(
private readonly dialog: MatLegacyDialog,
private readonly dialog: MatDialog,
private readonly snackBar: MatLegacySnackBar,
private readonly dataService: DataService,
private readonly store: Store<{}>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ xprof_ng_module(
"@npm//@angular/forms",
"@npm//@angular/platform-browser",
"@org_xprof//frontend/app/common/angular:angular_material_button",
"@org_xprof//frontend/app/common/angular:angular_material_dialog",
"@org_xprof//frontend/app/common/angular:angular_material_expansion",
"@org_xprof//frontend/app/common/angular:angular_material_form_field",
"@org_xprof//frontend/app/common/angular:angular_material_input",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_dialog",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_radio",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_tooltip",
"@org_xprof//frontend/app/common/angular:angular_material_select",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {MatLegacyDialogRef} from '@angular/material/legacy-dialog';
import {MatDialogRef} from '@angular/material/dialog';

/** A capture profile dialog component. */
@Component({
Expand All @@ -25,7 +25,7 @@ export class CaptureProfileDialog {
delay = 0;

constructor(private readonly dialogRef:
MatLegacyDialogRef<CaptureProfileDialog>) {}
MatDialogRef<CaptureProfileDialog>) {}

addressTypeChanged(value: string) {
this.isTpuName = value === 'tpu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatExpansionModule} from '@angular/material/expansion';
import {MatButtonModule} from '@angular/material/button';
import {MatLegacyDialogModule} from '@angular/material/legacy-dialog';
import {MatDialogModule} from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';
import {MatLegacyRadioModule} from '@angular/material/legacy-radio';
Expand All @@ -21,7 +21,7 @@ import {CaptureProfileDialog} from './capture_profile_dialog';
CommonModule,
FormsModule,
MatButtonModule,
MatLegacyDialogModule,
MatDialogModule,
MatExpansionModule,
MatFormFieldModule,
MatInputModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatButtonModule} from '@angular/material/button';
import {MatLegacyDialogModule} from '@angular/material/legacy-dialog';
import {MatDialogModule} from '@angular/material/dialog';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {MatLegacySnackBarModule} from '@angular/material/legacy-snack-bar';

Expand All @@ -15,7 +15,7 @@ import {CaptureProfileDialogModule} from './capture_profile_dialog/capture_profi
imports: [
CommonModule,
MatButtonModule,
MatLegacyDialogModule,
MatDialogModule,
MatLegacyProgressSpinnerModule,
CaptureProfileDialogModule,
MatLegacySnackBarModule,
Expand Down
1 change: 1 addition & 0 deletions frontend/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $theme: mat.define-light-theme(
@include mat.form-field-theme($theme);
@include mat.checkbox-theme($theme);
@include mat.select-theme($theme);
@include mat.dialog-theme($theme);

html, body {
height: 100%;
Expand Down

0 comments on commit a53fc3e

Please sign in to comment.