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: snack-bar

PiperOrigin-RevId: 565194998
  • Loading branch information
zzzaries authored and copybara-github committed Sep 18, 2023
1 parent 907c805 commit 43cbd9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/app/common/angular/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ts_library(
)

ts_library(
name = "angular_material_legacy_snack_bar",
name = "angular_material_snack_bar",
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 @@ -21,8 +21,8 @@ xprof_ng_module(
"@npm//rxjs",
"@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_legacy_snack_bar",
"@org_xprof//frontend/app/common/angular:angular_material_progress_spinner",
"@org_xprof//frontend/app/common/angular:angular_material_snack_bar",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/components/capture_profile/capture_profile_dialog",
"@org_xprof//frontend/app/services/data_service",
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,6 +1,6 @@
import {Component, OnDestroy} from '@angular/core';
import {MatDialog} from '@angular/material/dialog';
import {MatLegacySnackBar} from '@angular/material/legacy-snack-bar';
import {MatSnackBar} from '@angular/material/snack-bar';
import {Store} from '@ngrx/store';
import {CaptureProfileOptions, CaptureProfileResponse} from 'org_xprof/frontend/app/common/interfaces/capture_profile';
import {DataService} from 'org_xprof/frontend/app/services/data_service/data_service';
Expand Down Expand Up @@ -28,7 +28,7 @@ export class CaptureProfile implements OnDestroy {

constructor(
private readonly dialog: MatDialog,
private readonly snackBar: MatLegacySnackBar,
private readonly snackBar: MatSnackBar,
private readonly dataService: DataService,
private readonly store: Store<{}>) {
this.capturingProfile = this.store.select(getCapturingProfileState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core';
import {MatButtonModule} from '@angular/material/button';
import {MatDialogModule} from '@angular/material/dialog';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacySnackBarModule} from '@angular/material/legacy-snack-bar';
import {MatSnackBarModule} from '@angular/material/snack-bar';

import {CaptureProfile} from './capture_profile';
import {CaptureProfileDialog} from './capture_profile_dialog/capture_profile_dialog';
Expand All @@ -18,7 +18,7 @@ import {CaptureProfileDialogModule} from './capture_profile_dialog/capture_profi
MatDialogModule,
MatProgressSpinnerModule,
CaptureProfileDialogModule,
MatLegacySnackBarModule,
MatSnackBarModule,
],
exports: [CaptureProfile],
entryComponents: [CaptureProfileDialog],
Expand Down
1 change: 1 addition & 0 deletions frontend/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ $theme: mat.define-light-theme(
@include mat.progress-bar-theme($theme);
@include mat.slide-toggle-theme(map-merge($theme, (density: -5)));
@include mat.radio-theme($theme);
@include mat.snack-bar-theme($theme);
@include mat.slider-theme($theme);

html, body {
Expand Down

0 comments on commit 43cbd9f

Please sign in to comment.