Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDC Migration: Merging feature branch with all new Angular Components Styled as desired. #6631

Merged
merged 19 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
50d7782
Angular Component Migration
JamesHollyer Aug 17, 2023
21fa3b2
rebase + depend on legacy mat slider
JamesHollyer Sep 20, 2023
bdd7eaa
MDCMigration: Restyle the header tabs (#6606)
rileyajones Sep 28, 2023
c47369b
MDC Migration: Fix styling for runs_group_menu (#6605)
JamesHollyer Sep 28, 2023
ad8114d
MDC Migration: Fix styling for runs table context menu (#6607)
JamesHollyer Sep 28, 2023
be5cc5c
MDCMigration: Style right pane dropdowns for MDC migration. (#6614)
bmd3k Oct 2, 2023
9cf30c5
MDCMigration: Style run table and right pane checkboxes. (#6615)
bmd3k Oct 3, 2023
9757188
MDCMigration: Style tje plugins selector component for MDC migration.…
bmd3k Oct 3, 2023
21bef1b
MDC Migration: Globally restyle `mat-icon-button` (#6608)
rileyajones Oct 3, 2023
9784a65
MDCMigration: Style runs data table column selector for MDC migration…
bmd3k Oct 4, 2023
33dcfc0
MDCMigration: Style runs data table row heights for MDC migration. (#…
bmd3k Oct 4, 2023
5663200
MDCMigration: Style readme button for MDC migration. (#6620)
bmd3k Oct 5, 2023
c640857
MDCMigration: Style Settings button and Plugin picker for MDC migrati…
bmd3k Oct 5, 2023
526f9c1
MDCMigration: Style alert snackbar for MDC migration. (#6619)
bmd3k Oct 5, 2023
d7fd4ad
MDCMigration: fix Column Editor Style (#6623)
JamesHollyer Oct 5, 2023
2d69040
MDCMigration: fix settings modal style (#6629)
JamesHollyer Oct 9, 2023
a0651da
MDCMigration: set padding in regex modal (#6630)
JamesHollyer Oct 10, 2023
389f4b6
MDCMigration: 2 dialog style changes
JamesHollyer Oct 10, 2023
ac373d6
Merge MDCMigration feature branch
JamesHollyer Oct 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ tf_ng_module(
"//tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/store",
"//tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/store:types",
"//tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/views/execution_data",
"//tensorboard/webapp/angular:expect_angular_legacy_material_button",
"//tensorboard/webapp/angular:expect_angular_legacy_material_slider",
"//tensorboard/webapp/angular:expect_angular_material_button",
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@ngrx/store",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.

import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatButtonModule} from '@angular/material/button';
import {MatLegacySliderModule} from '@angular/material/legacy-slider';
import {ExecutionDataModule} from '../execution_data/execution_data_module';
import {TimelineComponent} from './timeline_component';
Expand All @@ -26,7 +26,7 @@ import {TimelineContainer} from './timeline_container';
imports: [
CommonModule,
ExecutionDataModule,
MatLegacyButtonModule,
MatButtonModule,
MatLegacySliderModule,
],
// TODO(cais): The following two providers are meant to make the mat-slider
Expand Down
8 changes: 4 additions & 4 deletions tensorboard/webapp/alert/views/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ tf_ng_module(
"//tensorboard/webapp/alert:types",
"//tensorboard/webapp/alert/store",
"//tensorboard/webapp/alert/store:types",
"//tensorboard/webapp/angular:expect_angular_legacy_material_button",
"//tensorboard/webapp/angular:expect_angular_legacy_material_snackbar",
"//tensorboard/webapp/angular:expect_angular_material_button",
"//tensorboard/webapp/angular:expect_angular_material_snackbar",
"//tensorboard/webapp/util:string",
"@npm//@angular/common",
"@npm//@angular/core",
Expand All @@ -49,8 +49,8 @@ tf_ts_library(
"//tensorboard/webapp/alert/store:testing",
"//tensorboard/webapp/angular:expect_angular_cdk_overlay",
"//tensorboard/webapp/angular:expect_angular_core_testing",
"//tensorboard/webapp/angular:expect_angular_legacy_material_button",
"//tensorboard/webapp/angular:expect_angular_legacy_material_snackbar",
"//tensorboard/webapp/angular:expect_angular_material_button",
"//tensorboard/webapp/angular:expect_angular_material_snackbar",
"//tensorboard/webapp/angular:expect_angular_platform_browser_animations",
"//tensorboard/webapp/angular:expect_ngrx_store_testing",
"@npm//@angular/core",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ limitations under the License.
margin-left: auto;
}

button {
button.mat-mdc-button {
color: inherit;
text-transform: uppercase;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';
import {
MatLegacySnackBarRef,
MAT_LEGACY_SNACK_BAR_DATA,
} from '@angular/material/legacy-snack-bar';
import {MatSnackBarRef, MAT_SNACK_BAR_DATA} from '@angular/material/snack-bar';
import {Store} from '@ngrx/store';
import {State} from '../../app_state';
import {splitByURL} from '../../util/string';
Expand All @@ -33,8 +30,8 @@ export class AlertDisplaySnackbarContainer {
readonly splitByURL = splitByURL;

constructor(
private readonly snackBarRef: MatLegacySnackBarRef<AlertDisplaySnackbarContainer>,
@Inject(MAT_LEGACY_SNACK_BAR_DATA) readonly unknownData: unknown,
private readonly snackBarRef: MatSnackBarRef<AlertDisplaySnackbarContainer>,
@Inject(MAT_SNACK_BAR_DATA) readonly unknownData: unknown,
private readonly store: Store<State>
) {
this.alert = unknownData as AlertInfo;
Expand Down
4 changes: 2 additions & 2 deletions tensorboard/webapp/alert/views/alert_snackbar_container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
OnDestroy,
OnInit,
} from '@angular/core';
import {MatLegacySnackBar} from '@angular/material/legacy-snack-bar';
import {MatSnackBar} from '@angular/material/snack-bar';
import {Store} from '@ngrx/store';
import {Subject} from 'rxjs';
import {filter, takeUntil} from 'rxjs/operators';
Expand All @@ -40,7 +40,7 @@ export class AlertSnackbarContainer implements OnInit, OnDestroy {

constructor(
private readonly store: Store<State>,
private readonly snackBar: MatLegacySnackBar
private readonly snackBar: MatSnackBar
) {}

ngOnInit() {
Expand Down
6 changes: 3 additions & 3 deletions tensorboard/webapp/alert/views/alert_snackbar_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ limitations under the License.
==============================================================================*/
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatLegacySnackBarModule} from '@angular/material/legacy-snack-bar';
import {MatButtonModule} from '@angular/material/button';
import {MatSnackBarModule} from '@angular/material/snack-bar';
import {AlertDisplaySnackbarContainer} from './alert_display_snackbar_container';
import {AlertSnackbarContainer} from './alert_snackbar_container';

Expand All @@ -25,7 +25,7 @@ import {AlertSnackbarContainer} from './alert_snackbar_container';
@NgModule({
declarations: [AlertSnackbarContainer, AlertDisplaySnackbarContainer],
exports: [AlertSnackbarContainer],
imports: [CommonModule, MatLegacyButtonModule, MatLegacySnackBarModule],
imports: [CommonModule, MatButtonModule, MatSnackBarModule],
entryComponents: [
// Required for non-Ivy Angular apps.
AlertDisplaySnackbarContainer,
Expand Down
17 changes: 5 additions & 12 deletions tensorboard/webapp/alert/views/alert_snackbar_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ limitations under the License.
==============================================================================*/
import {OverlayContainer} from '@angular/cdk/overlay';
import {TestBed} from '@angular/core/testing';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {
MatLegacySnackBar,
MatLegacySnackBarModule,
} from '@angular/material/legacy-snack-bar';
import {MatButtonModule} from '@angular/material/button';
import {MatSnackBar, MatSnackBarModule} from '@angular/material/snack-bar';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {Action, createAction, props, Store} from '@ngrx/store';
import {MockStore, provideMockStore} from '@ngrx/store/testing';
Expand All @@ -45,15 +42,11 @@ describe('alert snackbar', () => {
let snackBarOpenSpy: jasmine.Spy;
let recordedActions: Action[] = [];
let overlayContainer: OverlayContainer;
let snackbar: MatLegacySnackBar;
let snackbar: MatSnackBar;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
MatLegacyButtonModule,
MatLegacySnackBarModule,
],
imports: [NoopAnimationsModule, MatButtonModule, MatSnackBarModule],
providers: [
provideMockStore({
initialState: buildStateFromAlertState(buildAlertState({})),
Expand All @@ -67,7 +60,7 @@ describe('alert snackbar', () => {
recordedActions.push(action);
});
overlayContainer = TestBed.inject(OverlayContainer);
snackbar = TestBed.inject(MatLegacySnackBar);
snackbar = TestBed.inject(MatSnackBar);
snackBarOpenSpy = spyOn(snackbar, 'openFromComponent').and.callThrough();
});

Expand Down
47 changes: 19 additions & 28 deletions tensorboard/webapp/angular/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/autocomplete dependency.
tf_ts_library(
name = "expect_angular_legacy_material_autocomplete",
name = "expect_angular_material_autocomplete",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -87,15 +87,6 @@ tf_ts_library(
],
)

# This is a dummy rule used as a @angular/material/legacy_checkbox dependency.
tf_ts_library(
name = "expect_angular_legacy_material_checkbox",
srcs = [],
deps = [
"@npm//@angular/material",
],
)

# This is a dummy rule used as a @angular/material/checkbox/testing dependency.
tf_ts_library(
name = "expect_angular_material_checkbox_testing",
Expand All @@ -107,7 +98,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/button dependency.
tf_ts_library(
name = "expect_angular_legacy_material_button",
name = "expect_angular_material_button",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -125,7 +116,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/chips dependency.
tf_ts_library(
name = "expect_angular_legacy_material_chips",
name = "expect_angular_material_chips",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -134,7 +125,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/dialog dependency.
tf_ts_library(
name = "expect_angular_legacy_material_dialog",
name = "expect_angular_material_dialog",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -143,7 +134,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/dialog/testing dependency.
tf_ts_library(
name = "expect_angular_legacy_material_dialog_testing",
name = "expect_angular_material_dialog_testing",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -152,7 +143,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/expansion dependency.
tf_ts_library(
name = "expect_angular_legacy_material_expansion",
name = "expect_angular_material_expansion",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -161,7 +152,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/expansion dependency.
tf_ts_library(
name = "expect_angular_legacy_material_form_field",
name = "expect_angular_material_form_field",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -188,7 +179,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/input dependency.
tf_ts_library(
name = "expect_angular_legacy_material_input",
name = "expect_angular_material_input",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -197,7 +188,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/menu dependency.
tf_ts_library(
name = "expect_angular_legacy_material_menu",
name = "expect_angular_material_menu",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -206,7 +197,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/menu/testing dependency.
tf_ts_library(
name = "expect_angular_legacy_material_menu_testing",
name = "expect_angular_material_menu_testing",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -215,7 +206,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/paginator dependency.
tf_ts_library(
name = "expect_angular_legacy_material_paginator",
name = "expect_angular_material_paginator",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -224,7 +215,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/progress_spinner dependency.
tf_ts_library(
name = "expect_angular_legacy_material_progress_spinner",
name = "expect_angular_material_progress_spinner",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -233,7 +224,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/select dependency.
tf_ts_library(
name = "expect_angular_legacy_material_select",
name = "expect_angular_material_select",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -242,7 +233,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/select/testing dependency.
tf_ts_library(
name = "expect_angular_legacy_material_select_testing",
name = "expect_angular_material_select_testing",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -251,7 +242,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/slide_toggle dependency.
tf_ts_library(
name = "expect_angular_legacy_material_slide_toggle",
name = "expect_angular_material_slide_toggle",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -269,7 +260,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/snackbar dependency.
tf_ts_library(
name = "expect_angular_legacy_material_snackbar",
name = "expect_angular_material_snackbar",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -287,7 +278,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/table dependency.
tf_ts_library(
name = "expect_angular_legacy_material_table",
name = "expect_angular_material_table",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -296,7 +287,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/tabs dependency.
tf_ts_library(
name = "expect_angular_legacy_material_tabs",
name = "expect_angular_material_tabs",
srcs = [],
deps = [
"@npm//@angular/material",
Expand All @@ -314,7 +305,7 @@ tf_ts_library(

# This is a dummy rule used as a @angular/material/tooltip dependency.
tf_ts_library(
name = "expect_angular_legacy_material_tooltip",
name = "expect_angular_material_tooltip",
srcs = [],
deps = [
"@npm//@angular/material",
Expand Down
2 changes: 1 addition & 1 deletion tensorboard/webapp/core/views/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tf_ng_module(
],
assets = [":layout_styles"],
deps = [
"//tensorboard/webapp/angular:expect_angular_legacy_material_button",
"//tensorboard/webapp/angular:expect_angular_material_button",
"//tensorboard/webapp/angular:expect_angular_material_icon",
"//tensorboard/webapp/core:state",
"//tensorboard/webapp/core:types",
Expand Down
4 changes: 2 additions & 2 deletions tensorboard/webapp/core/views/layout_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {LayoutContainer} from './layout_container';

Expand All @@ -24,6 +24,6 @@ import {LayoutContainer} from './layout_container';
@NgModule({
declarations: [LayoutContainer],
exports: [LayoutContainer],
imports: [CommonModule, MatIconModule, MatLegacyButtonModule],
imports: [CommonModule, MatIconModule, MatButtonModule],
})
export class LayoutModule {}
Loading