Skip to content

Commit

Permalink
upgrade to jupyterlab4
Browse files Browse the repository at this point in the history
  • Loading branch information
ogiorgis committed Jul 10, 2023
1 parent 4b49b83 commit 338777d
Show file tree
Hide file tree
Showing 7 changed files with 10,222 additions and 8,245 deletions.
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
75 changes: 40 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyterlab-tour",
"version": "3.1.4",
"version": "3.2.0",
"description": "A JupyterLab UI Tour.",
"keywords": [
"jupyter",
Expand Down Expand Up @@ -46,49 +46,53 @@
"watch:src": "tsc -w"
},
"dependencies": {
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
"@jupyterlab/mainmenu": "^3.0.0",
"@jupyterlab/notebook": "^3.0.0",
"@jupyterlab/settingregistry": "^3.0.0",
"@jupyterlab/statedb": "^3.0.0",
"@jupyterlab/translation": "^3.0.0",
"@lumino/coreutils": "^1.5.3",
"@lumino/disposable": "^1.4.3",
"@lumino/signaling": "^1.4.3",
"@lumino/widgets": "^1.17.0",
"jupyterlab_toastify": "^4.1.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"@jupyterlab/application": "^4.0.2",
"@jupyterlab/apputils": "^4.0.2",
"@jupyterlab/mainmenu": "^4.0.2",
"@jupyterlab/notebook": "^4.0.2",
"@jupyterlab/settingregistry": "^4.0.2",
"@jupyterlab/statedb": "^4.0.2",
"@jupyterlab/translation": "^4.0.2",
"@lumino/coreutils": "^2.1.1",
"@lumino/disposable": "^2.1.1",
"@lumino/signaling": "^2.1.1",
"@lumino/widgets": "^2.1.1",
"jupyterlab_toastify": "^4.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-joyride": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@jupyterlab/builder": "^3.0.0",
"@jupyterlab/testutils": "^3.0.0",
"@types/jest": "^26.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "^4.0.5",
"genversion": "^2.2.1",
"jest": "^26.0.0",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@jupyterlab/builder": "^4.0.2",
"@jupyterlab/testutils": "^4.0.2",
"@types/jest": "^29.5.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.6.0",
"genversion": "^3.1.1",
"jest": "^29.6.1",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"ts-jest": "^26.0.0",
"typescript": "~4.1.3"
"ts-jest": "^29.1.1",
"typescript": "~5.0.4"
},
"sideEffects": [
"style/*.css",
"style/index.js"
],
"resolutions": {
"@types/react": "^18.0.26",
"react": "^18.2.0"
},
"jupyterlab": {
"extension": true,
"schemaDir": "schema",
Expand All @@ -99,5 +103,6 @@
}
}
},
"styleModule": "style/index.js"
"styleModule": "style/index.js",
"packageManager": "yarn@3.6.1"
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["jupyter_packaging~=0.7.9", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]
requires = ["jupyter_packaging~=0.7.9", "jupyterlab>=3.0.0", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
50 changes: 25 additions & 25 deletions src/defaults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ILabShell, JupyterFrontEnd } from '@jupyterlab/application';
import {
INotebookTracker,
NotebookActions,
NotebookPanel
NotebookPanel,
} from '@jupyterlab/notebook';
import { CommandRegistry } from '@lumino/commands';
import React from 'react';
Expand All @@ -25,7 +25,7 @@ function addWelcomeTour(

welcomeTour.options = {
...welcomeTour.options,
hideBackButton: true
hideBackButton: true,
};

welcomeTour.addStep({
Expand All @@ -34,7 +34,7 @@ function addWelcomeTour(
'The following tour will point out some of the main UI components within JupyterLab.'
),
placement: 'center',
title: __('Welcome to JupyterLab!')
title: __('Welcome to JupyterLab!'),
});

welcomeTour.addStep({
Expand All @@ -56,7 +56,7 @@ function addWelcomeTour(
opacity: '0.7',
position: 'relative',
top: '15px',
width: '30px'
width: '30px',
}}
/>
<span
Expand All @@ -72,7 +72,7 @@ function addWelcomeTour(
opacity: '0.9',
position: 'relative',
top: '-30px',
width: '60px'
width: '60px',
}}
/>
</div>
Expand All @@ -83,7 +83,7 @@ function addWelcomeTour(
),
target: '#jp-main-dock-panel',
placement: 'center',
title: __('Some information on the tour, first.')
title: __('Some information on the tour, first.'),
});

welcomeTour.addStep({
Expand Down Expand Up @@ -138,9 +138,9 @@ function addWelcomeTour(
styles: {
tooltipContent: {
overflowY: 'auto',
maxHeight: '200px'
}
}
maxHeight: '200px',
},
},
});

welcomeTour.addStep({
Expand Down Expand Up @@ -170,14 +170,14 @@ function addWelcomeTour(
),
placement: 'left-end',
target: '#jp-main-dock-panel',
title: __('Main Work Area')
title: __('Main Work Area'),
});

welcomeTour.addStep({
target: '#jp-main-statusbar',
content: <p>{__('Various information are reported on the status bar.')}</p>,
placement: 'top',
title: __('Status Bar')
title: __('Status Bar'),
});

welcomeTour.addStep({
Expand All @@ -201,7 +201,7 @@ function addWelcomeTour(
),
placement: 'right',
target: '.jp-SideBar.jp-mod-left',
title: __('Left Side Bar')
title: __('Left Side Bar'),
});

welcomeTour.addStep({
Expand All @@ -223,7 +223,7 @@ function addWelcomeTour(
),
placement: 'right',
target: '#filebrowser',
title: __('File Browser')
title: __('File Browser'),
});

welcomeTour.addStep({
Expand All @@ -245,7 +245,7 @@ function addWelcomeTour(
),
placement: 'center',
target: '#jp-main-dock-panel',
title: __('Command Palette')
title: __('Command Palette'),
});

welcomeTour.stepChanged.connect((_, data) => {
Expand Down Expand Up @@ -284,7 +284,7 @@ function addNotebookTour(
notebookTour.options = {
...notebookTour.options,
hideBackButton: true,
disableScrolling: true
disableScrolling: true,
};

let currentNbPanel: NotebookPanel | null = null;
Expand All @@ -300,7 +300,7 @@ function addNotebookTour(
</p>
),
placement: 'center',
title: __('Working with notebooks!')
title: __('Working with notebooks!'),
});

notebookTour.addStep({
Expand All @@ -312,7 +312,7 @@ function addNotebookTour(
{__('This is the first cell.')}
</p>
),
placement: 'bottom'
placement: 'bottom',
});

notebookTour.addStep({
Expand All @@ -335,7 +335,7 @@ function addNotebookTour(
</li>
</ul>
</>
)
),
});

notebookTour.addStep({
Expand All @@ -348,7 +348,7 @@ function addNotebookTour(
)}
</p>
),
placement: 'bottom'
placement: 'bottom',
});

notebookTour.addStep({
Expand All @@ -360,7 +360,7 @@ function addNotebookTour(
)}
</p>
),
placement: 'right'
placement: 'right',
});

notebookTour.addStep({
Expand All @@ -372,7 +372,7 @@ function addNotebookTour(
)}
</p>
),
placement: 'bottom'
placement: 'bottom',
});

notebookTour.addStep({
Expand All @@ -388,7 +388,7 @@ function addNotebookTour(
)}
</p>
),
placement: 'bottom'
placement: 'bottom',
});

notebookTour.addStep({
Expand All @@ -402,7 +402,7 @@ function addNotebookTour(
)}
</p>
),
placement: 'right'
placement: 'right',
});

notebookTour.addStep({
Expand All @@ -412,7 +412,7 @@ function addNotebookTour(
{__('Metadata (like tags) can be added to cells through this tab.')}
</p>
),
placement: 'left'
placement: 'left',
});

notebookTour.stepChanged.connect((_, data) => {
Expand Down Expand Up @@ -443,7 +443,7 @@ function addNotebookTour(
const activeCell = notebook.activeCell;
addedCellIndex = notebook.activeCellIndex;
if (activeCell) {
activeCell.model.value.text = 'a = 2\na';
activeCell.model.sharedModel.setSource('a = 2\na');
}
}
}
Expand Down
Loading

0 comments on commit 338777d

Please sign in to comment.