Skip to content

Commit

Permalink
Merge branch 'master' into update-search-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Apr 2, 2019
2 parents 0f03721 + c930c97 commit fdd406d
Show file tree
Hide file tree
Showing 59 changed files with 379 additions and 156 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -56,7 +56,7 @@ conda install -c conda-forge jupyterlab

#### pip

pip is a package management system for installing and updating Python packages, and comes with any Python installation. On Ubuntu and Fedora Linux, use the system package manager to install the `python3-pip` package. [\_The Hitchhiker's Guide to Python_provides guidance on how to install Python](https://docs.python-guide.org/starting/installation/); Another option is to [install Python directly from python.org](https://www.python.org/getit/). We suggest you [upgrade pip](https://pip.pypa.io/en/stable/installing/) before using it to install other programs.
pip is a package management system for installing and updating Python packages, and comes with any Python installation. On Ubuntu, SUSE Enterprise Linux, openSUSE, and Fedora Linux, use the system package manager to install the `python3-pip` package. [\_The Hitchhiker's Guide to Python_provides guidance on how to install Python](https://docs.python-guide.org/starting/installation/); Another option is to [install Python directly from python.org](https://www.python.org/getit/). We suggest you [upgrade pip](https://pip.pypa.io/en/stable/installing/) before using it to install other programs.

JupyterLab requires Python 3.5 or higher.

Expand Down
4 changes: 2 additions & 2 deletions dev_mode/package.json
Expand Up @@ -103,8 +103,8 @@
"marked": "0.5.1",
"moment": "~2.21.0",
"path-posix": "~1.0.0",
"react": "~16.4.2",
"react-dom": "~16.4.2",
"react": "~16.8.4",
"react-dom": "~16.8.4",
"react-paginate": "^5.2.3",
"sanitize-html": "~1.18.2",
"semver": "^5.5.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting_started/changelog.rst
Expand Up @@ -440,7 +440,7 @@ Command palette items

.. code:: json
"notebook:run-in-console": {
{
"command": "notebook:run-in-console",
"keys": ["Ctrl G"],
"selector": ".jp-Notebook.jp-mod-editMode"
Expand Down
7 changes: 7 additions & 0 deletions docs/source/getting_started/faq.rst
Expand Up @@ -21,3 +21,10 @@ Development
- `How can you
contribute? <https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md>`__
- :ref:`How can you extend or customize JupyterLab? <user_extensions>`

Tips and Tricks
---------------

- How do I start JupyterLab with a clean workspace every time?

Add `'c.NotebookApp.default_url = '/lab?reset'` to your `jupyter_notebook_config.py`. See [How to create a jupyter_notebook_config.py](https://jupyter-notebook.readthedocs.io/en/stable/config.html) for more information.
2 changes: 1 addition & 1 deletion docs/source/getting_started/overview.rst
Expand Up @@ -3,7 +3,7 @@
Overview
--------

JupyterLab is the next-generation web-based user interface for Project Jupyter.
JupyterLab is a next-generation web-based user interface for Project Jupyter.

.. image:: ../user/images/interface_jupyterlab.png
:align: center
Expand Down
9 changes: 0 additions & 9 deletions git-hooks/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions git-hooks/install-hooks.sh

This file was deleted.

4 changes: 0 additions & 4 deletions git-hooks/post-checkout

This file was deleted.

4 changes: 0 additions & 4 deletions git-hooks/post-merge

This file was deleted.

4 changes: 2 additions & 2 deletions jupyterlab/staging/package.json
Expand Up @@ -103,8 +103,8 @@
"marked": "0.5.1",
"moment": "~2.21.0",
"path-posix": "~1.0.0",
"react": "~16.4.2",
"react-dom": "~16.4.2",
"react": "~16.8.4",
"react-dom": "~16.8.4",
"react-paginate": "^5.2.3",
"sanitize-html": "~1.18.2",
"semver": "^5.5.0",
Expand Down
25 changes: 25 additions & 0 deletions jupyterlab/staging/yarn.lock
Expand Up @@ -4743,6 +4743,15 @@ react-dom@~16.4.2:
object-assign "^4.1.1"
prop-types "^15.6.0"

react-dom@~16.8.3:
version "16.8.3"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.3.tgz#ae236029e66210783ac81999d3015dfc475b9c32"
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.13.3"

react-highlighter@^0.4.0:
version "0.4.3"
resolved "https://registry.yarnpkg.com/react-highlighter/-/react-highlighter-0.4.3.tgz#e32c84d053259c30ca72c615aa759036d0d23048"
Expand Down Expand Up @@ -4810,6 +4819,15 @@ react@~16.4.2:
object-assign "^4.1.1"
prop-types "^15.6.0"

react@~16.8.3:
version "16.8.3"
resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9"
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.13.3"

"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
Expand Down Expand Up @@ -5063,6 +5081,13 @@ sax@^1.2.4, sax@~1.2.1, sax@~1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"

scheduler@^0.13.3:
version "0.13.3"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.3.tgz#bed3c5850f62ea9c716a4d781f9daeb9b2a58896"
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"

schema-utils@^0.4.3, schema-utils@^0.4.4, schema-utils@^0.4.5:
version "0.4.7"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -51,7 +51,7 @@
"test:firefox": "lerna run test:firefox --scope \"@jupyterlab/test-*\" --concurrency 1 --stream",
"test:ie": "lerna run test:ie --scope \"@jupyterlab/test-*\" --concurrency 1 --stream",
"tslint": "tslint --fix -c tslint.json --project tsconfigbase.json '**/*{.ts,.tsx}'",
"tslint:check": "tslint -c tslint.json '**/*{.ts,.tsx}'",
"tslint:check": "tslint -c tslint.json --project tsconfigbase.json '**/*{.ts,.tsx}'",
"prettier": "prettier --write '**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}'",
"prettier:check": "prettier --list-different '**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}'",
"update:dependency": "node buildutils/lib/update-dependency.js --lerna",
Expand Down
2 changes: 1 addition & 1 deletion packages/application-extension/package.json
Expand Up @@ -35,7 +35,7 @@
"@jupyterlab/apputils": "^1.0.0-alpha.3",
"@jupyterlab/coreutils": "^3.0.0-alpha.3",
"@phosphor/algorithm": "^1.1.2",
"react": "~16.4.2"
"react": "~16.8.4"
},
"devDependencies": {
"rimraf": "~2.6.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/application/style/icons.css
Expand Up @@ -213,6 +213,10 @@
background-image: var(--jp-icon-run);
}

.jp-RunningIcon {
background-image: var(--jp-icon-stop-circle);
}

.jp-SaveIcon {
background-image: var(--jp-icon-save);
}
Expand Down
82 changes: 82 additions & 0 deletions packages/application/style/scrollbar.css
Expand Up @@ -3,6 +3,88 @@
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

/*
* Mozilla scrollbar styling
*/

/* use standard opaque scrollbars for most nodes */
div.jp-LabShell[data-theme-scrollbars='true'] {
scrollbar-color: rgb(var(--jp-scrollbar-thumb-color))
var(--jp-scrollbar-background-color);
}

/* for code nodes, use a transparent style of scrollbar */
[data-theme-scrollbars='true'] .CodeMirror-hscrollbar,
[data-theme-scrollbars='true'] .CodeMirror-vscrollbar {
scrollbar-color: rgba(var(--jp-scrollbar-thumb-color), 0.5) transparent;
}

/*
* Webkit scrollbar styling
*/

/* use standard opaque scrollbars for most nodes */

[data-theme-scrollbars='true'] ::-webkit-scrollbar,
[data-theme-scrollbars='true'] ::-webkit-scrollbar-corner {
background: var(--jp-scrollbar-background-color);
}

[data-theme-scrollbars='true'] ::-webkit-scrollbar-thumb {
background: rgb(var(--jp-scrollbar-thumb-color));
border: var(--jp-scrollbar-thumb-margin) solid transparent;
background-clip: content-box;
border-radius: var(--jp-scrollbar-thumb-radius);
}

[data-theme-scrollbars='true'] ::-webkit-scrollbar-track:horizontal {
border-left: var(--jp-scrollbar-endpad) solid
var(--jp-scrollbar-background-color);
border-right: var(--jp-scrollbar-endpad) solid
var(--jp-scrollbar-background-color);
}

[data-theme-scrollbars='true'] ::-webkit-scrollbar-track:vertical {
border-top: var(--jp-scrollbar-endpad) solid
var(--jp-scrollbar-background-color);
border-bottom: var(--jp-scrollbar-endpad) solid
var(--jp-scrollbar-background-color);
}

/* for code nodes, use a transparent style of scrollbar */

[data-theme-scrollbars='true'] .CodeMirror-hscrollbar::-webkit-scrollbar,
[data-theme-scrollbars='true'] .CodeMirror-vscrollbar::-webkit-scrollbar,
[data-theme-scrollbars='true'] .CodeMirror-hscrollbar::-webkit-scrollbar-corner,
[data-theme-scrollbars='true']
.CodeMirror-vscrollbar::-webkit-scrollbar-corner {
background-color: transparent;
}

[data-theme-scrollbars='true'] .CodeMirror-hscrollbar::-webkit-scrollbar-thumb,
[data-theme-scrollbars='true'] .CodeMirror-vscrollbar::-webkit-scrollbar-thumb {
background: rgba(var(--jp-scrollbar-thumb-color), 0.5);
border: var(--jp-scrollbar-thumb-margin) solid transparent;
background-clip: content-box;
border-radius: var(--jp-scrollbar-thumb-radius);
}

[data-theme-scrollbars='true']
.CodeMirror-hscrollbar::-webkit-scrollbar-track:horizontal {
border-left: var(--jp-scrollbar-endpad) solid transparent;
border-right: var(--jp-scrollbar-endpad) solid transparent;
}

[data-theme-scrollbars='true']
.CodeMirror-vscrollbar::-webkit-scrollbar-track:vertical {
border-top: var(--jp-scrollbar-endpad) solid transparent;
border-bottom: var(--jp-scrollbar-endpad) solid transparent;
}

/*
* Phosphor
*/

.p-ScrollBar[data-orientation='horizontal'] {
min-height: 16px;
max-height: 16px;
Expand Down
6 changes: 6 additions & 0 deletions packages/apputils-extension/schema/themes.json
Expand Up @@ -9,6 +9,12 @@
"title": "Selected Theme",
"description": "Application-level visual styling theme",
"default": "JupyterLab Light"
},
"theme-scrollbars": {
"type": "boolean",
"title": "Scrollbar Theming",
"description": "Enable/disable styling of the application scrollbars",
"default": false
}
},
"type": "object"
Expand Down
8 changes: 8 additions & 0 deletions packages/apputils-extension/src/index.ts
Expand Up @@ -149,6 +149,14 @@ const themes: JupyterFrontEndPlugin<IThemeManager> = {
currentTheme = args.newValue;
app.shell.dataset.themeLight = String(manager.isLight(currentTheme));
app.shell.dataset.themeName = currentTheme;
if (
app.shell.dataset.themeScrollbars !==
String(manager.themeScrollbars(currentTheme))
) {
app.shell.dataset.themeScrollbars = String(
manager.themeScrollbars(currentTheme)
);
}
commands.notifyCommandChanged(CommandIDs.changeTheme);
});

Expand Down
8 changes: 4 additions & 4 deletions packages/apputils/package.json
Expand Up @@ -44,13 +44,13 @@
"@phosphor/signaling": "^1.2.2",
"@phosphor/virtualdom": "^1.1.2",
"@phosphor/widgets": "^1.6.0",
"@types/react": "~16.4.13",
"react": "~16.4.2",
"react-dom": "~16.4.2",
"@types/react": "~16.8.8",
"react": "~16.8.4",
"react-dom": "~16.8.4",
"sanitize-html": "~1.18.2"
},
"devDependencies": {
"@types/react-dom": "~16.0.7",
"@types/react-dom": "~16.8.2",
"@types/sanitize-html": "~1.18.0",
"rimraf": "~2.6.2",
"typedoc": "^0.14.2",
Expand Down
31 changes: 29 additions & 2 deletions packages/apputils/src/thememanager.ts
Expand Up @@ -151,6 +151,17 @@ export class ThemeManager {
return this._themes[name].isLight;
}

/**
* Test whether a given theme styles scrollbars,
* and if the user has scrollbar styling enabled.
*/
themeScrollbars(name: string): boolean {
return (
!!this._settings.composite['theme-scrollbars'] &&
!!this._themes[name].themeScrollbars
);
}

/**
* Handle the current settings.
*/
Expand Down Expand Up @@ -245,13 +256,23 @@ export class ThemeManager {
return Promise.all([old, themes[theme].load()])
.then(() => {
this._current = theme;
Private.fitAll(this._host);
splash.dispose();
this._themeChanged.emit({
name: 'theme',
oldValue: current,
newValue: theme
});

// Need to force a redraw of the app here to avoid a Chrome rendering
// bug that can leave the scrollbars in an invalid state
this._host.hide();

// If we hide/show the widget too quickly, no redraw will happen.
// requestAnimationFrame delays until after the next frame render.
requestAnimationFrame(() => {
this._host.show();
Private.fitAll(this._host);
splash.dispose();
});
})
.catch(reason => {
this._onError(reason);
Expand Down Expand Up @@ -333,6 +354,12 @@ export namespace ThemeManager {
*/
isLight: boolean;

/**
* Whether the theme includes styling for the scrollbar.
* If set to false, this theme will leave the native scrollbar untouched.
*/
themeScrollbars?: boolean;

/**
* Load the theme.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/apputils/src/toolbar.tsx
Expand Up @@ -435,7 +435,7 @@ export namespace ToolbarButtonComponent {
*/
export function ToolbarButtonComponent(props: ToolbarButtonComponent.IProps) {
// In some browsers, a button click event moves the focus from the main
// content to the button (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus).
// content to the button (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus).
// We avoid a click event by calling preventDefault in mousedown, and
// we bind the button action to `mousedown`.
const handleMouseDown = (event: React.MouseEvent) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/apputils/style/commandpalette.css
Expand Up @@ -43,8 +43,8 @@
}

.p-CommandPalette.p-mod-focused .p-CommandPalette-wrapper {
box-shadow: inset 0 0 0 1px rgba(19, 124, 189, 0.3),
inset 0 0 0 3px rgba(19, 124, 189, 0.3);
box-shadow: inset 0 0 0 1px var(--jp-input-active-box-shadow-color),
inset 0 0 0 3px var(--jp-input-active-box-shadow-color);
}

.p-CommandPalette-wrapper::after {
Expand Down
4 changes: 2 additions & 2 deletions packages/cells/package.json
Expand Up @@ -46,10 +46,10 @@
"@phosphor/signaling": "^1.2.2",
"@phosphor/virtualdom": "^1.1.2",
"@phosphor/widgets": "^1.6.0",
"react": "~16.4.2"
"react": "~16.8.4"
},
"devDependencies": {
"@types/react": "~16.4.13",
"@types/react": "~16.8.8",
"rimraf": "~2.6.2",
"typedoc": "^0.14.2",
"typescript": "~3.3.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/codemirror/package.json
Expand Up @@ -43,7 +43,7 @@
"@phosphor/signaling": "^1.2.2",
"@phosphor/widgets": "^1.6.0",
"codemirror": "~5.42.0",
"react": "~16.4.2"
"react": "~16.8.4"
},
"devDependencies": {
"@types/codemirror": "~0.0.70",
Expand Down

0 comments on commit fdd406d

Please sign in to comment.