Skip to content

Commit

Permalink
HParams: Add button to header cells which triggers the context menu (#…
Browse files Browse the repository at this point in the history
…6467)

## Motivation for features / changes
As part of adding hparams columns into the data table we have added a
context menu with a lot of additional options. Because we were worried
about users finding the context menu we decided to add it a button to
trigger it to the header as well.

## Screenshots of UI changes (or N/A)
We've got a lot of icons in the header now...

![header_context_menu](https://github.com/tensorflow/tensorboard/assets/78179109/3cd375e7-c195-4380-a790-c1cc43a6769e)
  • Loading branch information
rileyajones authored Jun 28, 2023
1 parent fd8c4d4 commit f6f6c44
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@
svgIcon="arrow_downward_24px"
></mat-icon>
</div>
<div *ngIf="controlsEnabled" class="context-menu-container">
<button
mat-icon-button
class="context-menu-trigger"
(click)="onContextMenuOpened($event)"
>
<mat-icon svgIcon="more_vert_24px"></mat-icon>
</button>
</div>
</div>
18 changes: 18 additions & 0 deletions tensorboard/webapp/widgets/data_table/header_cell_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ $_accent: map-get(mat.get-color-config($tb-theme), accent);
display: table-cell;
padding: 4px;
vertical-align: bottom;

&:hover {
.context-menu-container {
opacity: 0.8;
}
}
}
.sorting-icon-container {
width: 12px;
Expand Down Expand Up @@ -103,3 +109,15 @@ $_accent: map-get(mat.get-color-config($tb-theme), accent);
.highlight-border-left {
border-left: 2px solid mat.get-color-from-palette($_accent);
}

.context-menu-container {
opacity: 0;

.context-menu-trigger {
width: 12px;

mat-icon {
height: unset;
}
}
}

0 comments on commit f6f6c44

Please sign in to comment.