Skip to content

Commit b582faf

Browse files
authored
Use latest nbdime (#926)
1 parent 9df3562 commit b582faf

File tree

5 files changed

+62
-139
lines changed

5 files changed

+62
-139
lines changed

package.json

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jupyterlab/git",
3-
"version": "0.30.0-beta.3",
3+
"version": "0.30.0",
44
"description": "A JupyterLab extension for version control using git",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -45,48 +45,6 @@
4545
"style/index.js"
4646
],
4747
"styleModule": "style/index.js",
48-
"jupyterlab": {
49-
"discovery": {
50-
"server": {
51-
"managers": [
52-
"pip",
53-
"conda"
54-
],
55-
"base": {
56-
"name": "jupyterlab-git"
57-
}
58-
}
59-
},
60-
"extension": true,
61-
"schemaDir": "schema",
62-
"sharedPackages": {
63-
"@material-ui/core": {
64-
"singleton": true
65-
},
66-
"@material-ui/icons": {
67-
"singleton": true
68-
},
69-
"@material-ui/lab": {
70-
"singleton": true
71-
},
72-
"codemirror": {
73-
"bundled": false,
74-
"singleton": true
75-
},
76-
"nbdime": {
77-
"singleton": true
78-
},
79-
"react": {
80-
"bundled": false,
81-
"singleton": true
82-
},
83-
"react-dom": {
84-
"bundled": false,
85-
"singleton": true
86-
}
87-
},
88-
"outputDir": "jupyterlab_git/labextension"
89-
},
9048
"dependencies": {
9149
"@jupyterlab/application": "^3.0.0",
9250
"@jupyterlab/apputils": "^3.0.0",
@@ -114,7 +72,8 @@
11472
"@material-ui/icons": "^4.5.1",
11573
"@material-ui/lab": "^4.0.0-alpha.54",
11674
"diff-match-patch": "^1.0.4",
117-
"nbdime": "^6.1.0-beta.1",
75+
"nbdime": "^6.1.0",
76+
"nbdime-jupyterlab": "^2.1.0",
11877
"react": "^17.0.1",
11978
"react-dom": "^17.0.1",
12079
"react-textarea-autosize": "^7.1.2",
@@ -125,7 +84,7 @@
12584
"devDependencies": {
12685
"@babel/core": "^7.5.0",
12786
"@babel/preset-env": "^7.5.0",
128-
"@jupyterlab/builder": "^3.0.0-rc.13",
87+
"@jupyterlab/builder": "^3.0.0",
12988
"@jupyterlab/testutils": "^3.0.0",
13089
"@types/codemirror": "^0.0.97",
13190
"@types/diff-match-patch": "^1.0.32",
@@ -186,5 +145,52 @@
186145
"homepage": "https://github.com/jupyterlab/jupyterlab-git",
187146
"resolutions": {
188147
"@types/react": "^17.0.0"
148+
},
149+
"jupyterlab": {
150+
"discovery": {
151+
"server": {
152+
"managers": [
153+
"pip",
154+
"conda"
155+
],
156+
"base": {
157+
"name": "jupyterlab-git"
158+
}
159+
}
160+
},
161+
"extension": true,
162+
"schemaDir": "schema",
163+
"sharedPackages": {
164+
"@material-ui/core": {
165+
"singleton": true
166+
},
167+
"@material-ui/icons": {
168+
"singleton": true
169+
},
170+
"@material-ui/lab": {
171+
"singleton": true
172+
},
173+
"codemirror": {
174+
"bundled": false,
175+
"singleton": true
176+
},
177+
"nbdime": {
178+
"bundled": false,
179+
"singleton": true
180+
},
181+
"nbdime-jupyterlab": {
182+
"bundled": false,
183+
"singleton": true
184+
},
185+
"react": {
186+
"bundled": false,
187+
"singleton": true
188+
},
189+
"react-dom": {
190+
"bundled": false,
191+
"singleton": true
192+
}
193+
},
194+
"outputDir": "jupyterlab_git/labextension"
189195
}
190196
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
packages=setuptools.find_packages(),
7979
install_requires=[
8080
"jupyter_server",
81-
"nbdime~=3.0.0b1",
81+
"nbdime~=3.0",
8282
"nbformat",
8383
"packaging",
8484
"pexpect",

style/base.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
| Distributed under the terms of the Modified BSD License.
44
|----------------------------------------------------------------------------*/
55

6-
/* Import same style from nbdime than nbdime-jupyterlab
7-
* see index.ts
8-
*/
9-
@import url('~nbdime/lib/common/collapsible.css');
10-
@import url('~nbdime/lib/upstreaming/flexpanel.css');
11-
@import url('~nbdime/lib/common/dragpanel.css');
12-
@import url('~nbdime/lib/styles/variables.css');
13-
@import url('~nbdime/lib/styles/common.css');
14-
@import url('~nbdime/lib/styles/diff.css');
15-
@import url('~nbdime/lib/styles/merge.css');
16-
176
@import url('diff-common.css');
187
@import url('diff-nb.css');
198
@import url('diff-text.css');

style/diff-nb.css

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -60,85 +60,3 @@
6060
background-color: var(--jp-git-diff-deleted-color);
6161
border: none;
6262
}
63-
64-
/* Imported from nbdime-jupyterlab */
65-
.jp-git-diff-root .nbdime-Widget {
66-
display: flex;
67-
flex-direction: column;
68-
}
69-
70-
.jp-git-diff-root .nbdime-root {
71-
padding: var(--jp-notebook-padding);
72-
min-width: 50px;
73-
min-height: 50px;
74-
outline: none;
75-
overflow: auto;
76-
background: var(--jp-layout-color0);
77-
color: var(--jp-ui-font-color0);
78-
flex: 1 1 auto;
79-
}
80-
81-
82-
/* Header syling */
83-
84-
.jp-git-diff-root .nbdime-Diff {
85-
border-bottom: var(--jp-border-width) solid var(--jp-toolbar-border-color);
86-
box-shadow: var(--jp-toolbar-box-shadow);
87-
background: var(--jp-toolbar-background);
88-
color: var(--jp-ui-font-color1);
89-
flex: 0 0 auto;
90-
padding: 2px;
91-
z-index: 1;
92-
}
93-
94-
/* Hiding unchanged cells if told to */
95-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff.jp-Diff-unchanged {
96-
display: none;
97-
}
98-
99-
/* Show a marker with the number of cells hidden before */
100-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenBefore]::before,
101-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenBefore]::before {
102-
content: attr(data-nbdime-NCellsHiddenBefore) " unchanged cell(s) hidden";
103-
position: absolute;
104-
width: 100%;
105-
top: 0;
106-
background-color: var(--jp-layout-color2);
107-
border-top: solid var(--jp-layout-color3) 1px;
108-
border-bottom: solid var(--jp-layout-color3) 1px;
109-
text-align: center;
110-
}
111-
112-
/* Show a marker with the number of cells hidden after (for hidden cells at end) */
113-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenAfter]::after,
114-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenAfter]::after {
115-
content: attr(data-nbdime-NCellsHiddenAfter) " unchanged cell(s) hidden";
116-
position: absolute;
117-
width: 100%;
118-
bottom: 0;
119-
background-color: var(--jp-layout-color2);
120-
border-top: solid var(--jp-layout-color3) 1px;
121-
border-bottom: solid var(--jp-layout-color3) 1px;
122-
text-align: center;
123-
}
124-
125-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenBefore],
126-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenBefore] {
127-
padding-top: 40px;
128-
}
129-
130-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Cell-diff[data-nbdime-NCellsHiddenAfter],
131-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Diff-addremchunk[data-nbdime-NCellsHiddenAfter] {
132-
padding-bottom: 40px;
133-
}
134-
135-
/* Marker for when all cells are unchanged and hidden */
136-
.jp-git-diff-root .nbdime-root.jp-mod-hideUnchanged .jp-Notebook-diff[data-nbdime-AllCellsHidden]::after {
137-
content: "No changes, " attr(data-nbdime-AllCellsHidden) " unchanged cell(s) hidden";
138-
display: block;
139-
width: 100%;
140-
background-color: var(--jp-layout-color2);
141-
border-top: solid var(--jp-layout-color3) 1px;
142-
border-bottom: solid var(--jp-layout-color3) 1px;
143-
text-align: center;
144-
}

style/index.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
/* Import same style from nbdime and nbdime-jupyterlab (see index.ts) */
2+
@import url('~nbdime/lib/common/collapsible.css');
3+
@import url('~nbdime/lib/upstreaming/flexpanel.css');
4+
@import url('~nbdime/lib/common/dragpanel.css');
5+
@import url('~nbdime/lib/styles/variables.css');
6+
@import url('~nbdime/lib/styles/common.css');
7+
@import url('~nbdime/lib/styles/diff.css');
8+
@import url('~nbdime/lib/styles/merge.css');
9+
@import url('~nbdime-jupyterlab/style/index.css');
10+
111
@import url('base.css');

0 commit comments

Comments
 (0)