Skip to content

Commit

Permalink
Use latest nbdime (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Apr 17, 2021
1 parent 9df3562 commit b582faf
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 139 deletions.
96 changes: 51 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupyterlab/git",
"version": "0.30.0-beta.3",
"version": "0.30.0",
"description": "A JupyterLab extension for version control using git",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -45,48 +45,6 @@
"style/index.js"
],
"styleModule": "style/index.js",
"jupyterlab": {
"discovery": {
"server": {
"managers": [
"pip",
"conda"
],
"base": {
"name": "jupyterlab-git"
}
}
},
"extension": true,
"schemaDir": "schema",
"sharedPackages": {
"@material-ui/core": {
"singleton": true
},
"@material-ui/icons": {
"singleton": true
},
"@material-ui/lab": {
"singleton": true
},
"codemirror": {
"bundled": false,
"singleton": true
},
"nbdime": {
"singleton": true
},
"react": {
"bundled": false,
"singleton": true
},
"react-dom": {
"bundled": false,
"singleton": true
}
},
"outputDir": "jupyterlab_git/labextension"
},
"dependencies": {
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
Expand Down Expand Up @@ -114,7 +72,8 @@
"@material-ui/icons": "^4.5.1",
"@material-ui/lab": "^4.0.0-alpha.54",
"diff-match-patch": "^1.0.4",
"nbdime": "^6.1.0-beta.1",
"nbdime": "^6.1.0",
"nbdime-jupyterlab": "^2.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-textarea-autosize": "^7.1.2",
Expand All @@ -125,7 +84,7 @@
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@jupyterlab/builder": "^3.0.0-rc.13",
"@jupyterlab/builder": "^3.0.0",
"@jupyterlab/testutils": "^3.0.0",
"@types/codemirror": "^0.0.97",
"@types/diff-match-patch": "^1.0.32",
Expand Down Expand Up @@ -186,5 +145,52 @@
"homepage": "https://github.com/jupyterlab/jupyterlab-git",
"resolutions": {
"@types/react": "^17.0.0"
},
"jupyterlab": {
"discovery": {
"server": {
"managers": [
"pip",
"conda"
],
"base": {
"name": "jupyterlab-git"
}
}
},
"extension": true,
"schemaDir": "schema",
"sharedPackages": {
"@material-ui/core": {
"singleton": true
},
"@material-ui/icons": {
"singleton": true
},
"@material-ui/lab": {
"singleton": true
},
"codemirror": {
"bundled": false,
"singleton": true
},
"nbdime": {
"bundled": false,
"singleton": true
},
"nbdime-jupyterlab": {
"bundled": false,
"singleton": true
},
"react": {
"bundled": false,
"singleton": true
},
"react-dom": {
"bundled": false,
"singleton": true
}
},
"outputDir": "jupyterlab_git/labextension"
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
packages=setuptools.find_packages(),
install_requires=[
"jupyter_server",
"nbdime~=3.0.0b1",
"nbdime~=3.0",
"nbformat",
"packaging",
"pexpect",
Expand Down
11 changes: 0 additions & 11 deletions style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

/* Import same style from nbdime than nbdime-jupyterlab
* see index.ts
*/
@import url('~nbdime/lib/common/collapsible.css');
@import url('~nbdime/lib/upstreaming/flexpanel.css');
@import url('~nbdime/lib/common/dragpanel.css');
@import url('~nbdime/lib/styles/variables.css');
@import url('~nbdime/lib/styles/common.css');
@import url('~nbdime/lib/styles/diff.css');
@import url('~nbdime/lib/styles/merge.css');

@import url('diff-common.css');
@import url('diff-nb.css');
@import url('diff-text.css');
Expand Down
82 changes: 0 additions & 82 deletions style/diff-nb.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,85 +60,3 @@
background-color: var(--jp-git-diff-deleted-color);
border: none;
}

/* Imported from nbdime-jupyterlab */
.jp-git-diff-root .nbdime-Widget {
display: flex;
flex-direction: column;
}

.jp-git-diff-root .nbdime-root {
padding: var(--jp-notebook-padding);
min-width: 50px;
min-height: 50px;
outline: none;
overflow: auto;
background: var(--jp-layout-color0);
color: var(--jp-ui-font-color0);
flex: 1 1 auto;
}


/* Header syling */

.jp-git-diff-root .nbdime-Diff {
border-bottom: var(--jp-border-width) solid var(--jp-toolbar-border-color);
box-shadow: var(--jp-toolbar-box-shadow);
background: var(--jp-toolbar-background);
color: var(--jp-ui-font-color1);
flex: 0 0 auto;
padding: 2px;
z-index: 1;
}

/* Hiding unchanged cells if told to */
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff.jp-Diff-unchanged {
display: none;
}

/* Show a marker with the number of cells hidden before */
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenBefore]::before,
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenBefore]::before {
content: attr(data-nbdime-NCellsHiddenBefore) " unchanged cell(s) hidden";
position: absolute;
width: 100%;
top: 0;
background-color: var(--jp-layout-color2);
border-top: solid var(--jp-layout-color3) 1px;
border-bottom: solid var(--jp-layout-color3) 1px;
text-align: center;
}

/* Show a marker with the number of cells hidden after (for hidden cells at end) */
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenAfter]::after,
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenAfter]::after {
content: attr(data-nbdime-NCellsHiddenAfter) " unchanged cell(s) hidden";
position: absolute;
width: 100%;
bottom: 0;
background-color: var(--jp-layout-color2);
border-top: solid var(--jp-layout-color3) 1px;
border-bottom: solid var(--jp-layout-color3) 1px;
text-align: center;
}

.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenBefore],
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenBefore] {
padding-top: 40px;
}

.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenAfter],
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenAfter] {
padding-bottom: 40px;
}

/* Marker for when all cells are unchanged and hidden */
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Notebook-diff[data-nbdime-AllCellsHidden]::after {
content: "No changes, " attr(data-nbdime-AllCellsHidden) " unchanged cell(s) hidden";
display: block;
width: 100%;
background-color: var(--jp-layout-color2);
border-top: solid var(--jp-layout-color3) 1px;
border-bottom: solid var(--jp-layout-color3) 1px;
text-align: center;
}
10 changes: 10 additions & 0 deletions style/index.css
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/* Import same style from nbdime and nbdime-jupyterlab (see index.ts) */
@import url('~nbdime/lib/common/collapsible.css');
@import url('~nbdime/lib/upstreaming/flexpanel.css');
@import url('~nbdime/lib/common/dragpanel.css');
@import url('~nbdime/lib/styles/variables.css');
@import url('~nbdime/lib/styles/common.css');
@import url('~nbdime/lib/styles/diff.css');
@import url('~nbdime/lib/styles/merge.css');
@import url('~nbdime-jupyterlab/style/index.css');

@import url('base.css');

0 comments on commit b582faf

Please sign in to comment.