Skip to content

Commit f19edc9

Browse files
committed
MDC Migration: Fix styling for runs_group_menu
1 parent 21fa3b2 commit f19edc9

File tree

3 files changed

+21
-34
lines changed

3 files changed

+21
-34
lines changed

Diff for: tensorboard/webapp/runs/views/runs_table/runs_group_menu_button_component.ng.html

+18-26
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@
3131
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.EXPERIMENT"
3232
(click)="onGroupByChange.emit({key: GroupByKey.EXPERIMENT})"
3333
>
34-
<span>
35-
<mat-icon
36-
*ngIf="selectedGroupBy.key === GroupByKey.EXPERIMENT"
37-
svgIcon="done_24px"
38-
></mat-icon>
39-
</span>
40-
<label>Experiment</label>
34+
<mat-icon
35+
*ngIf="selectedGroupBy.key === GroupByKey.EXPERIMENT"
36+
svgIcon="done_24px"
37+
></mat-icon>
38+
<span>Experiment</span>
4139
</button>
4240
<button
4341
mat-menu-item
@@ -46,13 +44,11 @@
4644
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.RUN"
4745
(click)="onGroupByChange.emit({key: GroupByKey.RUN})"
4846
>
49-
<span>
50-
<mat-icon
51-
*ngIf="selectedGroupBy.key === GroupByKey.RUN"
52-
svgIcon="done_24px"
53-
></mat-icon>
54-
</span>
55-
<label>Run</label>
47+
<mat-icon
48+
*ngIf="selectedGroupBy.key === GroupByKey.RUN"
49+
svgIcon="done_24px"
50+
></mat-icon>
51+
<span>Run</span>
5652
</button>
5753
<button
5854
mat-menu-item
@@ -61,13 +57,11 @@
6157
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.REGEX"
6258
(click)="onGroupByRegexClick()"
6359
>
64-
<span>
65-
<mat-icon
66-
*ngIf="selectedGroupBy.key === GroupByKey.REGEX"
67-
svgIcon="done_24px"
68-
></mat-icon>
69-
</span>
70-
<label>Regex</label>
60+
<mat-icon
61+
*ngIf="selectedGroupBy.key === GroupByKey.REGEX"
62+
svgIcon="done_24px"
63+
></mat-icon>
64+
<span>Regex</span>
7165
</button>
7266
<button
7367
mat-menu-item
@@ -76,10 +70,8 @@
7670
(click)="onRegexStringEdit()"
7771
class="display-regex-string"
7872
>
79-
<span>
80-
<mat-icon svgIcon="edit_24px"></mat-icon>
81-
</span>
82-
<label *ngIf="regexString">{{regexString}}</label>
83-
<label *ngIf="!regexString" class="none-set-string">(none set)</label>
73+
<mat-icon svgIcon="edit_24px"></mat-icon>
74+
<span *ngIf="regexString">{{regexString}}</span>
75+
<span *ngIf="!regexString" class="none-set-string">(none set)</span>
8476
</button>
8577
</mat-menu>

Diff for: tensorboard/webapp/runs/views/runs_table/runs_group_menu_button_component.scss

-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ limitations under the License.
2727
pointer-events: none;
2828
}
2929

30-
button {
31-
display: grid;
32-
gap: 2px 10px;
33-
grid-template-columns: $_icon-size auto;
34-
}
35-
3630
mat-icon {
3731
height: $_icon-size;
3832
width: $_icon-size;

Diff for: tensorboard/webapp/runs/views/runs_table/runs_table_test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ describe('runs_table', () => {
638638
const items = getOverlayMenuItems();
639639

640640
expect(
641-
items.map((element) => element.querySelector('label')!.textContent)
641+
items.map((element) => element.querySelector('span')!.textContent)
642642
).toEqual(['Experiment', 'Run', 'Regex', '(none set)']);
643643
});
644644

@@ -655,9 +655,10 @@ describe('runs_table', () => {
655655

656656
openColorGroupDialog(fixture);
657657
const items = getOverlayMenuItems();
658+
console.log('items', items);
658659

659660
expect(
660-
items.map((element) => element.querySelector('label')!.textContent)
661+
items.map((element) => element.querySelector('span')!.textContent)
661662
).toEqual(['Run', 'Regex', '(none set)']);
662663
});
663664

0 commit comments

Comments
 (0)