Skip to content

Commit

Permalink
Hide the Last Modified column on a narrow filebrowser.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed May 24, 2019
1 parent 7fb34cd commit 3215508
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/filebrowser/src/listing.ts
Expand Up @@ -786,6 +786,12 @@ export class DirListing extends Widget {
this._prevPath = this._model.path;
}

onResize(msg: Widget.ResizeMessage) {
const { width } =
msg.width === -1 ? this.node.getBoundingClientRect() : msg;
this.toggleClass('jp-DirListing-narrow', width < 250);
}

/**
* Handle the `'click'` event for the widget.
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/filebrowser/style/index.css
Expand Up @@ -120,6 +120,10 @@
text-align: right;
}

.jp-DirListing-narrow .jp-id-modified, .jp-DirListing-narrow .jp-DirListing-itemModified {
display: none;
}

.jp-DirListing-headerItem.jp-mod-selected {
font-weight: 600;
}
Expand Down

0 comments on commit 3215508

Please sign in to comment.