Skip to content

Commit

Permalink
layout: make resizer smaller (#5390)
Browse files Browse the repository at this point in the history
Previously, we used to have a little icon and thick vertical bar to make
resize affordance apparent on the left pane resizer. After surveying
modern apps, it looks like they are often done with pointer in
combination with thicker vertical bar on hover so we adopt those
designs.

In the end, with this change, we give users about 18 pixels back in the
horizontal space.
  • Loading branch information
stephanwlee authored Oct 28, 2021
1 parent a569150 commit f3bf2be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 16 additions & 2 deletions tensorboard/webapp/core/views/layout_container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,36 @@ limitations under the License.
.expand {
@include tb-theme-foreground-prop(border-color, border);
box-sizing: border-box;
flex: 0 0 20px;
flex: 0 0;
justify-self: stretch;
}

.expand {
width: 20px;
}

.resizer {
align-items: center;
border-style: solid;
border-width: 0 1px;
border-width: 0 2px;
cursor: ew-resize;
display: flex;
justify-self: stretch;

.mat-icon {
width: 100%;
}

&:hover {
border-color: #ccc;
outline: 3px solid #ccc;
z-index: 1;

@include tb-dark-theme {
outline-color: #777;
border-color: #777;
}
}
}

.expand {
Expand Down
4 changes: 1 addition & 3 deletions tensorboard/webapp/core/views/layout_container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ import {MouseEventButtons} from '../../util/dom';
*ngIf="(width$ | async) > 0"
class="resizer"
(mousedown)="resizeGrabbed()"
>
<mat-icon svgIcon="drag_indicator_24px"></mat-icon>
</div>
></div>
<ng-content select="[main]"></ng-content>
`,
styleUrls: ['layout_container.css'],
Expand Down

0 comments on commit f3bf2be

Please sign in to comment.