Skip to content

Commit

Permalink
File browser CSS tweaks (#6738)
Browse files Browse the repository at this point in the history
* File browser CSS tweaks

* Set tabsMovable to false

* Style file browser buttons

* Add missing headers

* Update Playwright Snapshots

* Update Playwright Snapshots

* Lint

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jtpio and github-actions[bot] authored Feb 20, 2023
1 parent 49dfd72 commit e7b5c37
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/application/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ body {
}

#main-panel {
box-shadow: var(--jp-elevation-z4);
margin-left: auto;
margin-right: auto;
max-width: var(--jp-notebook-max-width);
Expand All @@ -71,6 +70,10 @@ body {

/* Special case notebooks as document oriented pages */

[data-notebook]:not(body[data-notebook='notebooks']) #main-panel {
box-shadow: var(--jp-elevation-z4);
}

body[data-notebook='notebooks'] #main-panel {
margin-left: unset;
margin-right: unset;
Expand Down
1 change: 1 addition & 0 deletions packages/tree-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {

nbTreeWidget.addWidget(browser);
nbTreeWidget.tabBar.addTab(browser.title);
nbTreeWidget.tabsMovable = false;

// Toolbar
toolbarRegistry.addFactory(
Expand Down
17 changes: 17 additions & 0 deletions packages/tree-extension/style/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
|
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

.jp-FileBrowser-toolbar .jp-Toolbar-item.jp-DropdownMenu,
.jp-FileBrowser-toolbar .jp-Toolbar-item.jp-ToolbarButton,
.jp-FileBrowser-toolbar .jp-Toolbar-item.jp-CommandToolbarButton {
border: solid 1px var(--jp-border-color2);
margin: 1px;
padding: 0px;
}

.jp-FileBrowser-toolbar button.jp-ToolbarButtonComponent {
height: 100%;
}
8 changes: 8 additions & 0 deletions packages/tree-extension/style/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
|
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

@import url('~@jupyterlab/filebrowser/style/index.css');

@import url('~@jupyter-notebook/tree/style/index.css');

@import './base.css';
2 changes: 2 additions & 0 deletions packages/tree-extension/style/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import '@jupyterlab/filebrowser/style/index.js';

import '@jupyter-notebook/tree/style/index.js';

import './base.css';
1 change: 1 addition & 0 deletions packages/tree/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}

.jp-TreePanel .lm-TabBar-tab {
flex: 0 1 auto;
color: var(--jp-ui-font-color0);
font-size: var(--jp-ui-font-size1);
height: 100%;
Expand Down
Binary file modified ui-tests/test/mobile.spec.ts-snapshots/tree-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/test/mobile.spec.ts-snapshots/tree-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e7b5c37

Please sign in to comment.