xtralab 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/fileBrowser/index.js +1 -1
- package/lib/git/diffWidget.js +1 -1
- package/lib/git/index.js +1 -1
- package/package.json +1 -1
- package/src/fileBrowser/commands.ts +4 -1
- package/src/fileBrowser/fileBrowser.tsx +1 -4
- package/src/fileBrowser/index.ts +1 -1
- package/src/git/diffWidget.tsx +3 -8
- package/src/git/index.ts +1 -1
- package/src/git/notebookDiff.tsx +1 -4
- package/src/git/panelComponent.tsx +4 -13
- package/style/base.css +1 -3
- package/style/git.css +1 -2
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ override versions and Jupyter configuration in the usual ways.
|
|
|
44
44
|
news from the Jupyter news feed and does not check for application updates.
|
|
45
45
|
- The Table of Contents, Debugger, and Notebook Tools panels are disabled so
|
|
46
46
|
they do not show up in the right sidebar by default.
|
|
47
|
+
- `dockPanelPadding` is off, so the main dock area is flush with the
|
|
48
|
+
surrounding chrome.
|
|
47
49
|
|
|
48
50
|
The JupyterLab frontend defaults are shipped as `labconfig/*.d/00-xtralab.json`
|
|
49
51
|
fragments so downstream meta-packages can add their own Lab configuration
|
package/lib/fileBrowser/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const plugin = {
|
|
|
22
22
|
void app.commands.execute('docmanager:open', { path: serverPath });
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
app.shell.add(browser, 'left', { rank:
|
|
25
|
+
app.shell.add(browser, 'left', { rank: 50 });
|
|
26
26
|
if (restorer) {
|
|
27
27
|
restorer.add(browser, browser.id);
|
|
28
28
|
}
|
package/lib/git/diffWidget.js
CHANGED
|
@@ -528,7 +528,7 @@ function DiffViewer(props) {
|
|
|
528
528
|
writeStoredSplitRatio(DEFAULT_SPLIT_RATIO);
|
|
529
529
|
}, []);
|
|
530
530
|
if (state.loading) {
|
|
531
|
-
return
|
|
531
|
+
return React.createElement("div", { className: "jp-xtralab-DiffWidget-status" }, "Loading diff\u2026");
|
|
532
532
|
}
|
|
533
533
|
if (state.error !== null) {
|
|
534
534
|
return (React.createElement("div", { className: "jp-xtralab-DiffWidget-status", "data-error": "true" }, state.error));
|
package/lib/git/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xtralab",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "An opinionated JupyterLab meta-package that bundles a curated set of extensions, ships a path-first file browser and a VS Code-style git changes panel, and applies a quieter default workspace configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -123,7 +123,10 @@ function getOpenPaths(
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/** True iff there is an actionable target for a command on the right-click. */
|
|
126
|
-
function hasTarget(
|
|
126
|
+
function hasTarget(
|
|
127
|
+
app: JupyterFrontEnd,
|
|
128
|
+
browser: IXtralabFileBrowser
|
|
129
|
+
): boolean {
|
|
127
130
|
return getTargetPath(app, browser) !== undefined;
|
|
128
131
|
}
|
|
129
132
|
|
|
@@ -247,10 +247,7 @@ export function FileBrowserComponent(
|
|
|
247
247
|
try {
|
|
248
248
|
model.add(canonicalPath);
|
|
249
249
|
} catch (err) {
|
|
250
|
-
console.error(
|
|
251
|
-
`xtralab: failed to add path "${canonicalPath}"`,
|
|
252
|
-
err
|
|
253
|
-
);
|
|
250
|
+
console.error(`xtralab: failed to add path "${canonicalPath}"`, err);
|
|
254
251
|
return;
|
|
255
252
|
}
|
|
256
253
|
}
|
package/src/fileBrowser/index.ts
CHANGED
|
@@ -37,7 +37,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
|
|
|
37
37
|
void app.commands.execute('docmanager:open', { path: serverPath });
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
app.shell.add(browser, 'left', { rank:
|
|
40
|
+
app.shell.add(browser, 'left', { rank: 50 });
|
|
41
41
|
if (restorer) {
|
|
42
42
|
restorer.add(browser, browser.id);
|
|
43
43
|
}
|
package/src/git/diffWidget.tsx
CHANGED
|
@@ -99,8 +99,7 @@ function writeStoredSplitRatio(ratio: number): void {
|
|
|
99
99
|
*/
|
|
100
100
|
type NotebookDiffViewMode = 'notebook' | 'json';
|
|
101
101
|
|
|
102
|
-
const NOTEBOOK_DIFF_VIEW_MODE_STORAGE_KEY =
|
|
103
|
-
'xtralab:notebook-diff-view-mode';
|
|
102
|
+
const NOTEBOOK_DIFF_VIEW_MODE_STORAGE_KEY = 'xtralab:notebook-diff-view-mode';
|
|
104
103
|
|
|
105
104
|
function readStoredNotebookViewMode(): NotebookDiffViewMode {
|
|
106
105
|
try {
|
|
@@ -720,9 +719,7 @@ function DiffViewer(
|
|
|
720
719
|
}, []);
|
|
721
720
|
|
|
722
721
|
if (state.loading) {
|
|
723
|
-
return
|
|
724
|
-
<div className="jp-xtralab-DiffWidget-status">Loading diff…</div>
|
|
725
|
-
);
|
|
722
|
+
return <div className="jp-xtralab-DiffWidget-status">Loading diff…</div>;
|
|
726
723
|
}
|
|
727
724
|
if (state.error !== null) {
|
|
728
725
|
return (
|
|
@@ -748,9 +745,7 @@ function DiffViewer(
|
|
|
748
745
|
|
|
749
746
|
if (!showNotebookView && !showFileDiff) {
|
|
750
747
|
return (
|
|
751
|
-
<div className="jp-xtralab-DiffWidget-status">
|
|
752
|
-
No content to diff.
|
|
753
|
-
</div>
|
|
748
|
+
<div className="jp-xtralab-DiffWidget-status">No content to diff.</div>
|
|
754
749
|
);
|
|
755
750
|
}
|
|
756
751
|
|
package/src/git/index.ts
CHANGED
package/src/git/notebookDiff.tsx
CHANGED
|
@@ -623,10 +623,7 @@ function LuminoWidget(props: {
|
|
|
623
623
|
MessageLoop.sendMessage(widget, Widget.Msg.BeforeDetach);
|
|
624
624
|
MessageLoop.sendMessage(widget, Widget.Msg.AfterDetach);
|
|
625
625
|
} catch (err) {
|
|
626
|
-
console.warn(
|
|
627
|
-
'xtralab: Widget detach messaging failed',
|
|
628
|
-
err
|
|
629
|
-
);
|
|
626
|
+
console.warn('xtralab: Widget detach messaging failed', err);
|
|
630
627
|
}
|
|
631
628
|
}
|
|
632
629
|
}
|
|
@@ -367,10 +367,7 @@ function PanelHeader(props: {
|
|
|
367
367
|
<div className="jp-xtralab-GitPanel-headerInfo">
|
|
368
368
|
<div className="jp-xtralab-GitPanel-title">Source Control</div>
|
|
369
369
|
{repoName !== null ? (
|
|
370
|
-
<div
|
|
371
|
-
className="jp-xtralab-GitPanel-repo"
|
|
372
|
-
title={topLevel ?? ''}
|
|
373
|
-
>
|
|
370
|
+
<div className="jp-xtralab-GitPanel-repo" title={topLevel ?? ''}>
|
|
374
371
|
{repoName}
|
|
375
372
|
</div>
|
|
376
373
|
) : null}
|
|
@@ -414,9 +411,7 @@ function ChangeSection(props: {
|
|
|
414
411
|
<span className="jp-xtralab-GitPanel-sectionChevron">
|
|
415
412
|
{collapsed ? '▸' : '▾'}
|
|
416
413
|
</span>
|
|
417
|
-
<span className="jp-xtralab-GitPanel-sectionLabel">
|
|
418
|
-
{label}
|
|
419
|
-
</span>
|
|
414
|
+
<span className="jp-xtralab-GitPanel-sectionLabel">{label}</span>
|
|
420
415
|
{actions !== undefined ? (
|
|
421
416
|
<span className="jp-xtralab-GitPanel-sectionActions">
|
|
422
417
|
{actions.map(action => (
|
|
@@ -435,14 +430,10 @@ function ChangeSection(props: {
|
|
|
435
430
|
))}
|
|
436
431
|
</span>
|
|
437
432
|
) : null}
|
|
438
|
-
<span className="jp-xtralab-GitPanel-sectionCount">
|
|
439
|
-
{count}
|
|
440
|
-
</span>
|
|
433
|
+
<span className="jp-xtralab-GitPanel-sectionCount">{count}</span>
|
|
441
434
|
</div>
|
|
442
435
|
{!collapsed ? (
|
|
443
|
-
<div className="jp-xtralab-GitPanel-sectionBody">
|
|
444
|
-
{children}
|
|
445
|
-
</div>
|
|
436
|
+
<div className="jp-xtralab-GitPanel-sectionBody">{children}</div>
|
|
446
437
|
) : null}
|
|
447
438
|
</div>
|
|
448
439
|
);
|
package/style/base.css
CHANGED
package/style/git.css
CHANGED