Skip to content

MDC Migration: Fix styling for runs_group_menu #6605

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 1 commit into from
Sep 28, 2023
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 @@ -31,13 +31,11 @@
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.EXPERIMENT"
(click)="onGroupByChange.emit({key: GroupByKey.EXPERIMENT})"
>
<span>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.EXPERIMENT"
svgIcon="done_24px"
></mat-icon>
</span>
<label>Experiment</label>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.EXPERIMENT"
svgIcon="done_24px"
></mat-icon>
<span>Experiment</span>
</button>
<button
mat-menu-item
Expand All @@ -46,13 +44,11 @@
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.RUN"
(click)="onGroupByChange.emit({key: GroupByKey.RUN})"
>
<span>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.RUN"
svgIcon="done_24px"
></mat-icon>
</span>
<label>Run</label>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.RUN"
svgIcon="done_24px"
></mat-icon>
<span>Run</span>
</button>
<button
mat-menu-item
Expand All @@ -61,13 +57,11 @@
[attr.aria-checked]="selectedGroupBy.key === GroupByKey.REGEX"
(click)="onGroupByRegexClick()"
>
<span>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.REGEX"
svgIcon="done_24px"
></mat-icon>
</span>
<label>Regex</label>
<mat-icon
*ngIf="selectedGroupBy.key === GroupByKey.REGEX"
svgIcon="done_24px"
></mat-icon>
<span>Regex</span>
</button>
<button
mat-menu-item
Expand All @@ -76,10 +70,8 @@
(click)="onRegexStringEdit()"
class="display-regex-string"
>
<span>
<mat-icon svgIcon="edit_24px"></mat-icon>
</span>
<label *ngIf="regexString">{{regexString}}</label>
<label *ngIf="!regexString" class="none-set-string">(none set)</label>
<mat-icon svgIcon="edit_24px"></mat-icon>
<span *ngIf="regexString">{{regexString}}</span>
<span *ngIf="!regexString" class="none-set-string">(none set)</span>
</button>
</mat-menu>
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ limitations under the License.
pointer-events: none;
}

button {
display: grid;
gap: 2px 10px;
grid-template-columns: $_icon-size auto;
}

mat-icon {
height: $_icon-size;
width: $_icon-size;
Expand Down
5 changes: 3 additions & 2 deletions tensorboard/webapp/runs/views/runs_table/runs_table_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ describe('runs_table', () => {
const items = getOverlayMenuItems();

expect(
items.map((element) => element.querySelector('label')!.textContent)
items.map((element) => element.querySelector('span')!.textContent)
).toEqual(['Experiment', 'Run', 'Regex', '(none set)']);
});

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

openColorGroupDialog(fixture);
const items = getOverlayMenuItems();
console.log('items', items);

expect(
items.map((element) => element.querySelector('label')!.textContent)
items.map((element) => element.querySelector('span')!.textContent)
).toEqual(['Run', 'Regex', '(none set)']);
});

Expand Down