Skip to content

Unblock mat lsc #6998

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

Merged
merged 3 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -13,10 +13,12 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;

@mixin debugger-op-type {
background-color: /*m2*/ mat.get-color-from-palette(
/*m2$*/ mat.$blue-grey-palette,
background-color: matm2.get-color-from-palette(
matm2var.$blue-grey-palette,
50
);
@include tb-theme-foreground-prop(border, border, 1px solid);
Expand All @@ -29,18 +31,19 @@ limitations under the License.
width: max-content;

@include tb-dark-theme {
background-color: /*m2*/ mat.get-color-from-palette(
/*m2$*/ mat.$blue-grey-palette,
background-color: matm2.get-color-from-palette(
matm2var.$blue-grey-palette,
700
);
}
}

@mixin debugger-highlight-background {
background-color: #fff099;

@include tb-dark-theme {
background-color: /*m2*/ mat.get-color-from-palette(
/*m2$*/ mat.$orange-palette,
background-color: matm2.get-color-from-palette(
matm2var.$orange-palette,
900
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

.debug-tensor-values-table {
Expand Down Expand Up @@ -45,19 +47,16 @@ limitations under the License.
}

.focus-execution-container {
background-color: /*m2*/ mat.get-color-from-palette(
/*m2$*/ mat.$orange-palette,
200
);
background-color: matm2.get-color-from-palette(matm2var.$orange-palette, 200);
border-radius: 4px;
font-size: 12px;
height: 120px;
padding: 5px;
width: 360px;

@include tb-dark-theme {
background-color: /*m2*/ mat.get-color-from-palette(
/*m2$*/ mat.$orange-palette,
background-color: matm2.get-color-from-palette(
matm2var.$orange-palette,
900
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';
@import '../common/lib';

Expand All @@ -31,7 +33,8 @@ limitations under the License.
padding: 2px 6px;
text-align: right;
width: 200px;
$grey-600: /*m2*/ mat.get-color-from-palette(mat.$gray-palette, 600);
$grey-600: matm2.get-color-from-palette(matm2var.$grey-palette, 600);

@include tb-dark-theme {
box-shadow: 1px 3px $grey-600;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

.message {
.warning {
color: /*m2*/ mat.get-color-from-palette($tb-warn);
color: matm2.get-color-from-palette($tb-warn);
}

margin-bottom: 16px;
}

.note-1 {
color: /*m2*/ mat.get-color-from-palette($tb-accent);
color: matm2.get-color-from-palette($tb-accent);
}

.scrolling-page {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';
@import '../common';

Expand Down Expand Up @@ -153,7 +155,7 @@ $_title-to-heading-gap: 12px;
}

:host ::ng-deep .mat-slider-min-value .mat-slider-thumb {
background-color: /*m2*/ mat.get-color-from-palette($tb-primary);
background-color: matm2.get-color-from-palette($tb-primary);
}

:host ::ng-deep .hide-slider.mat-slider-horizontal .mat-slider-track-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';
@import '../common';

Expand Down Expand Up @@ -42,6 +44,7 @@ $_data_table_initial_height: 100px;
.always-visible {
display: flex;
flex-direction: column;

&:not(:has(.expand-button)) {
flex-grow: 1;
}
Expand Down Expand Up @@ -196,13 +199,10 @@ $_data_table_initial_height: 100px;
align-items: center;

.expand-button {
color: /*m2*/ mat.get-color-from-palette($tb-foreground, secondary-text);
color: matm2.get-color-from-palette($tb-foreground, secondary-text);

@include tb-dark-theme {
color: /*m2*/ mat.get-color-from-palette(
$tb-dark-foreground,
secondary-text
);
color: matm2.get-color-from-palette($tb-dark-foreground, secondary-text);
background-color: map-get($tb-dark-background, background);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

:host {
color: /*m2*/ mat.get-color-from-palette(
map-get(/*m2*/ mat.get-color-config($tb-theme), warn),
color: matm2.get-color-from-palette(
map-get(matm2.get-color-config($tb-theme), warn),
700
);
height: 1em;
line-height: 0;
display: inline-flex;

@include tb-dark-theme {
color: /*m2*/ mat.get-color-from-palette(
map-get(/*m2*/ mat.get-color-config($tb-dark-theme), warn),
color: matm2.get-color-from-palette(
map-get(matm2.get-color-config($tb-dark-theme), warn),
700
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

.tag-filter {
Expand All @@ -28,7 +30,7 @@ tb-filter-input {
@include tb-theme-foreground-prop(color, text);

&:not(.valid) {
$_error-color: /*m2*/ mat.get-color-from-palette($tb-warn, 800);
$_error-color: matm2.get-color-from-palette($tb-warn, 800);

color: $_error-color;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';
@import '../common';

Expand Down Expand Up @@ -86,10 +88,7 @@ mat-button-toggle-group.filter-view {
.main,
.sidebar {
contain: strict;
background-color: /*m2*/ mat.get-color-from-palette(
$tb-background,
background
);
background-color: matm2.get-color-from-palette($tb-background, background);
overflow-x: hidden;
overflow-y: auto;
will-change: transform, scroll-position;
Expand All @@ -100,7 +99,7 @@ mat-button-toggle-group.filter-view {
}

.main {
background-color: /*m2*/ mat.get-color-from-palette($tf-slate, 200);
background-color: matm2.get-color-from-palette($tf-slate, 200);
flex: 1 1;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -156,19 +155,16 @@ mat-button-toggle-group.filter-view {

/** TODO(psybuzz): consider making a tb-button instead. */
:host .settings-button {
color: /*m2*/ mat.get-color-from-palette($tb-foreground, secondary-text);
color: matm2.get-color-from-palette($tb-foreground, secondary-text);
display: inline-flex;

@include tb-dark-theme {
color: /*m2*/ mat.get-color-from-palette(
$tb-dark-foreground,
secondary-text
);
color: matm2.get-color-from-palette($tb-dark-foreground, secondary-text);
}

&.checked {
@include tb-theme-background-prop(background-color, selected-button);
border-color: /*m2*/ mat.get-color-from-palette(mat.$gray-palette, 300);
border-color: matm2.get-color-from-palette(matm2var.$grey-palette, 300);
}

::ng-deep .mat-button-wrapper {
Expand All @@ -182,10 +178,7 @@ mat-button-toggle-group.filter-view {
}

.slide-out-menu {
background-color: /*m2*/ mat.get-color-from-palette(
$tb-background,
background
);
background-color: matm2.get-color-from-palette($tb-background, background);
// Make the menu the full height minus the size of the toolbar.
height: calc(100% - 49px);
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';
@import '../common';

Expand Down Expand Up @@ -65,7 +67,7 @@ mat-icon {

.new-card-pinned {
animation: pinned-view-fade-out 3s linear;
background: /*m2*/ mat.get-color-from-palette(mat.$red-palette, 500);
background: matm2.get-color-from-palette(matm2var.$red-palette, 500);
border-radius: 5px;
color: #fff;
display: inline-block;
Expand Down
15 changes: 7 additions & 8 deletions tensorboard/webapp/metrics/views/metrics_container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

:host {
Expand All @@ -26,10 +28,10 @@ limitations under the License.

.notice {
background-color: rgba(
/*m2*/ mat.get-color-from-palette(mat.$yellow-palette, 200),
matm2.get-color-from-palette(matm2var.$yellow-palette, 200),
0.85
);
$yellow-500: /*m2*/ mat.get-color-from-palette(mat.$yellow-palette, 500);
$yellow-500: matm2.get-color-from-palette(matm2var.$yellow-palette, 500);
border-bottom: 1px solid $yellow-500;
color: map-get($tb-foreground, text);
display: block;
Expand All @@ -42,18 +44,15 @@ tb-dashboard-layout {
}

nav {
background-color: /*m2*/ mat.get-color-from-palette(
$tb-background,
background
);
$border: /*m2*/ mat.get-color-from-palette($tb-foreground, border);
background-color: matm2.get-color-from-palette($tb-background, background);
$border: matm2.get-color-from-palette($tb-foreground, border);
border-right: 1px solid $border;
flex: none;
width: 340px;

@include tb-dark-theme {
background-color: map-get($tb-dark-background, background);
border-right-color: /*m2*/ mat.get-color-from-palette(
border-right-color: matm2.get-color-from-palette(
$tb-dark-foreground,
border
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
@use '@angular/material' as mat;
@use '@angular/material' as matm2;
@use '@angular/material' as matm2var;
@import 'tensorboard/webapp/theme/tb_theme';

:host {
Expand Down
Loading