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: card

PiperOrigin-RevId: 565173655
  • Loading branch information
zzzaries authored and copybara-github committed Sep 15, 2023
1 parent fdb11fa commit 396a3aa
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion frontend/app/common/angular/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ts_library(
)

ts_library(
name = "angular_material_legacy_card",
name = "angular_material_card",
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
@@ -1,5 +1,5 @@
load("//defs:defs.bzl", "xprof_ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//defs:defs.bzl", "xprof_ng_module")

package(default_visibility = ["//frontend:internal"])

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//defs:defs.bzl", "xprof_ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//defs:defs.bzl", "xprof_ng_module")

package(default_visibility = ["//frontend:internal"])

Expand Down
1 change: 0 additions & 1 deletion frontend/app/components/diagnostics_view/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ xprof_ng_module(
],
deps = [
"@npm//@angular/core",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/interfaces",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ xprof_ng_module(
],
deps = [
"@npm//@angular/core",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_tooltip",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';
import {MatLegacyTooltipModule} from '@angular/material/legacy-tooltip';

import {MemoryProfileSummary} from './memory_profile_summary';
Expand All @@ -9,7 +9,7 @@ import {MemoryProfileSummary} from './memory_profile_summary';
declarations: [MemoryProfileSummary],
imports: [
CommonModule,
MatLegacyCardModule,
MatCardModule,
MatLegacyTooltipModule,
],
exports: [MemoryProfileSummary]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ xprof_ng_module(
deps = [
"@npm//@angular/core",
"@npm//@types/google.visualization",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {MemoryTimelineGraph} from './memory_timeline_graph';

@NgModule({
declarations: [MemoryTimelineGraph],
imports: [MatLegacyCardModule],
imports: [MatCardModule],
exports: [MemoryTimelineGraph]
})
export class MemoryTimelineGraphModule {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/memory_viewer/buffer_details/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ xprof_ng_module(
"@npm//@angular/core",
"@npm//@ngrx/store",
"@npm//rxjs",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
"@org_xprof//frontend/app/store",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {BufferDetails} from './buffer_details';

/** A buffer details view module. */
@NgModule({
declarations: [BufferDetails],
imports: [MatLegacyCardModule],
imports: [MatCardModule],
exports: [BufferDetails]
})
export class BufferDetailsModule {
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/components/op_profile/op_details/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//defs:defs.bzl", "xprof_ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//defs:defs.bzl", "xprof_ng_module")

package(default_visibility = ["//frontend:internal"])

Expand All @@ -19,8 +19,8 @@ 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_card",
"@org_xprof//frontend/app/common/angular:angular_material_icon",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/interfaces:op_metrics_proto_defs",
"@org_xprof//frontend/app/common/interfaces:op_profile_proto_defs",
"@org_xprof//frontend/app/common/utils",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ mat-card {
.bar {
height: 24px;
line-height: 24px;
max-width: 100%;
}

.expression {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material/button';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {OpDetails} from './op_details';

/** An op details view module. */
@NgModule({
declarations: [OpDetails],
imports:
[CommonModule, MatLegacyCardModule, MatIconModule, MatButtonModule],
[CommonModule, MatCardModule, MatIconModule, MatButtonModule],
exports: [OpDetails]
})
export class OpDetailsModule {
Expand Down
1 change: 0 additions & 1 deletion frontend/app/components/overview/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ xprof_ng_module(
"@npm//@ngrx/store",
"@npm//@types/google.visualization",
"@npm//rxjs",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
"@org_xprof//frontend/app/components/diagnostics_view",
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/overview/performance_summary/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ xprof_ng_module(
deps = [
"@npm//@angular/common",
"@npm//@angular/core",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/angular:angular_material_icon",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_tooltip",
"@org_xprof//frontend/app/common/interfaces",
],
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 {MatIconModule} from '@angular/material/icon';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';
import {MatLegacyTooltipModule} from '@angular/material/legacy-tooltip';

import {PerformanceSummary} from './performance_summary';
Expand All @@ -10,7 +10,7 @@ import {PerformanceSummary} from './performance_summary';
declarations: [PerformanceSummary],
imports: [
CommonModule,
MatLegacyCardModule,
MatCardModule,
MatIconModule,
MatLegacyTooltipModule,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ xprof_ng_module(
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@ngrx/store",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
"@org_xprof//frontend/app/store",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {RecommendationResultView} from './recommendation_result_view';

@NgModule({
declarations: [RecommendationResultView],
imports: [
CommonModule,
MatLegacyCardModule,
MatCardModule,
],
exports: [RecommendationResultView]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ xprof_ng_module(
],
deps = [
"@npm//@angular/core",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/interfaces",
],
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {RunEnvironmentView} from './run_environment_view';

@NgModule({
declarations: [RunEnvironmentView],
imports: [MatLegacyCardModule],
imports: [MatCardModule],
exports: [RunEnvironmentView]
})
export class RunEnvironmentViewModule {
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/overview/step_time_graph/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ xprof_ng_module(
deps = [
"@npm//@angular/core",
"@npm//@types/google.visualization",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/interfaces",
],
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {StepTimeGraph} from './step_time_graph';

@NgModule({
declarations: [StepTimeGraph],
imports: [MatLegacyCardModule],
imports: [MatCardModule],
exports: [StepTimeGraph]
})
export class StepTimeGraphModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ xprof_ng_module(
"@npm//@angular/core",
"@npm//@ngrx/store",
"@npm//rxjs",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/angular:angular_material_card",
"@org_xprof//frontend/app/common/constants",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/utils",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatCardModule} from '@angular/material/card';

import {PodViewerDetails} from './pod_viewer_details';

Expand All @@ -9,7 +9,7 @@ import {PodViewerDetails} from './pod_viewer_details';
declarations: [PodViewerDetails],
imports: [
CommonModule,
MatLegacyCardModule,
MatCardModule,
],
exports: [PodViewerDetails]
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/tensorflow_stats/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("//defs:defs.bzl", "xprof_ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//defs:defs.bzl", "xprof_ng_module")

package(default_visibility = ["//frontend:internal"])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ xprof_ng_module(
],
deps = [
"@npm//@angular/core",
"@org_xprof//frontend/app/common/angular:angular_material_legacy_card",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/common/interfaces:chart",
"@org_xprof//frontend/app/components/chart",
Expand Down
1 change: 1 addition & 0 deletions frontend/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $theme: mat.define-light-theme(
@include mat.fab-theme($theme);
@include mat.button-theme($theme);
@include mat.icon-button-theme($theme);
@include mat.card-theme($theme);

html, body {
height: 100%;
Expand Down

0 comments on commit 396a3aa

Please sign in to comment.