Skip to content

Commit 608a697

Browse files
authored
Merge pull request #112 from jtpio/prettier-check
Add prettier scripts and check on CI
2 parents b2626d7 + dc6445b commit 608a697

File tree

9 files changed

+75
-38
lines changed

9 files changed

+75
-38
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
run: |
2828
jlpm
2929
jlpm run eslint:check
30+
jlpm run prettier:check
3031
3132
python -m pip install .
3233

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5+
jupyterlab_interactive_dashboard_editor
6+
.vscode
7+
.github

Design/PRESS_RELEASE.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1-
21
# JupyterLab Interactive Dashboard Editor
32

43
### Jupyter users can interactively create and customize dashboards from Jupyter Notebooks.
54

65
Creating a dashboard is a great way to present data analytics and information to general audiences. If you want to share your data, displaying Jupyter notebooks can get pretty lengthy with their cluttered, linear view. As a result, they are not easy to understand for general audiences who want to see your results, not your code.
76

8-
9-
107
The JupyterLab Interactive Dashboard Editor extension is a **live editor** that enables you to intuitively build aesthetic, **interactive** dashboards side-by-side with your notebook. You can rearrange, remove, and customize outputs (plots, widgets, text, etc.) in a **grid layout** by dragging cells directly from your notebook onto the dashboard.
118

12-
13-
149
Tools like [Voilà](https://github.com/voila-dashboards/voila) can already render dynamic web apps—however, they’re limited in their ability to conveniently customize layout and appearance. Simple tasks such as resizing a graph require you to rewrite templates in a separate templating language. Dashboarding should be as easy as dragging and dropping!
1510

16-
17-
1811
The Interactive Dashboard Editor extension solves this problem by integrating a **drag-and-drop** dashboard editor inside JupyterLab. Simply drag code cells outputs onto the dashboard, then arrange and size them in a live editor. Take advantage of our default design or further customize your dashboards with background colors, typefaces, font sizes/colors, and other adjustments.
1912

20-
21-
2213
> Project Health is a non-profit organization that collects international disease data. “Using the Interactive Dashboard Editor, we were able to easily publish live COVID-19 updates and data analytics directly from Jupyter Notebooks onto an interactive web-app. To ensure effectiveness and understandability, the layout was all custom-rendered, allowing for diverse audiences to read the data. In turn, this increased audience trust while interactive components added depth to the analysis.”
23-
—Project Health manager, Noel James*
14+
> —Project Health manager, Noel James\*
2415
2516
The Interactive Dashboard Editor extension takes the guesswork out of creating beautiful and cohesive dashboards. Save time and resources with the intuitive drag-and-drop interface and tools . Get started right in your Jupyter Notebooks today!
2617

27-
*not a real quote
18+
\*not a real quote

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,50 @@ Interactively create and customize dashboards in JupyterLab
1010
![presto-overview](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/overview.gif)
1111

1212
## Additional Gifs
13+
1314
<details>
1415
<summary>Click to expand</summary>
1516
Add and rearrange outputs on dashboards right from your notebook.
1617

17-
![add-move-resize](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/add_move_resize.gif)
18+
![add-move-resize](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/add_move_resize.gif)
19+
20+
Add outputs from multiple notebooks.
1821

19-
Add outputs from multiple notebooks.
22+
![add-multiple](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/multiple_notebooks.gif)
2023

21-
![add-multiple](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/multiple_notebooks.gif)
24+
See changes immediately.
2225

23-
See changes immediately.
26+
![see-changes](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/update_cells.gif)
2427

25-
![see-changes](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/update_cells.gif)
28+
Preview your dashboard and interact with widgets in present mode.
2629

27-
Preview your dashboard and interact with widgets in present mode.
30+
![present-mode](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/present_edit.gif)
2831

29-
![present-mode](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/present_edit.gif)
32+
Undo and redo.
3033

31-
Undo and redo.
34+
![undo-redo](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/undo_redo.gif)
3235

33-
![undo-redo](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/undo_redo.gif)
36+
Add markdown too.
3437

35-
Add markdown too.
38+
![markdown-too](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/markdown_too.gif)
3639

37-
![markdown-too](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/markdown_too.gif)
40+
Save dashboards to file,
3841

39-
Save dashboards to file,
42+
![save-dashboard](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/save.gif)
4043

41-
![save-dashboard](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/save.gif)
44+
Load them up,
4245

43-
Load them up,
46+
![load-dashboard](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/load.gif)
4447

45-
![load-dashboard](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/load.gif)
48+
And edit them again!
4649

47-
And edit them again!
50+
![edit-again](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/edit_again.gif)
4851

49-
![edit-again](https://github.com/jupytercalpoly/jupyterlab-interactive-dashboard-editor/blob/master/Design/gifs/edit_again.gif)
5052
</details>
5153

5254
## Requirements
5355

54-
* JupyterLab >= 2.0
56+
- JupyterLab >= 2.0
5557

5658
## Install
5759

binder/workspace.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":0,"widgets":[]},"mode":"multiple-document"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","@jupyterlab/toc:plugin","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"demo"}},"metadata":{"id":"/lab"}}
1+
{
2+
"data": {
3+
"layout-restorer:data": {
4+
"main": {
5+
"dock": { "type": "tab-area", "currentIndex": 0, "widgets": [] },
6+
"mode": "multiple-document"
7+
},
8+
"left": {
9+
"collapsed": false,
10+
"current": "filebrowser",
11+
"widgets": [
12+
"filebrowser",
13+
"running-sessions",
14+
"command-palette",
15+
"jp-property-inspector",
16+
"tab-manager",
17+
"@jupyterlab/toc:plugin",
18+
"extensionmanager.main-view"
19+
]
20+
},
21+
"right": { "collapsed": true, "widgets": [] }
22+
},
23+
"file-browser-filebrowser:cwd": { "path": "demo" }
24+
},
25+
"metadata": { "id": "/lab" }
26+
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"eslint": "eslint . --ext .ts,.tsx --fix",
3838
"eslint:check": "eslint . --ext .ts,.tsx",
3939
"prepare": "jlpm run clean && jlpm run build",
40+
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
41+
"prettier:check": "prettier --list-different \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
4042
"watch": "tsc -w"
4143
},
4244
"dependencies": {

src/svg.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
declare module '*.svg' {
33
const value: string;
44
export default value;
5-
}
5+
}

style/base.css

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
width: 100%;
3232
height: 100%;
3333
z-index: 2;
34-
background: rgba(0,0,0,.10);
34+
background: rgba(0, 0, 0, 0.1);
3535
}
3636

3737
.pr-EditableWidget:hover {
@@ -45,7 +45,7 @@
4545
width: 100%;
4646
height: 100%;
4747
z-index: 2;
48-
background: rgba(0,0,0,.10);
48+
background: rgba(0, 0, 0, 0.1);
4949
}
5050

5151
.pr-DashboardArea {
@@ -71,19 +71,32 @@
7171
display: block;
7272
}
7373

74-
7574
.pr-Canvas {
7675
pointer-events: none;
7776
}
7877

7978
.pr-Canvas.pr-FreeLayout {
80-
background-image: linear-gradient(45deg, rgba(160,160,160,.15) 25%, transparent 25%), linear-gradient(-45deg, rgba(160,160,160,.15) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(160,160,160,.15) 75%), linear-gradient(-45deg, transparent 75%, rgba(160,160,160,.15) 70%);
79+
background-image: linear-gradient(
80+
45deg,
81+
rgba(160, 160, 160, 0.15) 25%,
82+
transparent 25%
83+
),
84+
linear-gradient(-45deg, rgba(160, 160, 160, 0.15) 25%, transparent 25%),
85+
linear-gradient(45deg, transparent 75%, rgba(160, 160, 160, 0.15) 75%),
86+
linear-gradient(-45deg, transparent 75%, rgba(160, 160, 160, 0.15) 70%);
8187
background-size: 20px 20px;
8288
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
8389
}
8490

8591
.pr-Canvas.pr-TiledLayout {
86-
background-image: linear-gradient(45deg, rgba(160,160,160,.15) 25%, transparent 25%), linear-gradient(-45deg, rgba(160,160,160,.15) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(160,160,160,.15) 75%), linear-gradient(-45deg, transparent 75%, rgba(160,160,160,.15) 70%);
92+
background-image: linear-gradient(
93+
45deg,
94+
rgba(160, 160, 160, 0.15) 25%,
95+
transparent 25%
96+
),
97+
linear-gradient(-45deg, rgba(160, 160, 160, 0.15) 25%, transparent 25%),
98+
linear-gradient(45deg, transparent 75%, rgba(160, 160, 160, 0.15) 75%),
99+
linear-gradient(-45deg, transparent 75%, rgba(160, 160, 160, 0.15) 70%);
87100
background-size: 64px 64px;
88101
background-position: 0 0, 0 32px, 32px -32px, -32px 0px;
89102
}
@@ -128,4 +141,4 @@ select.pr-ToolbarSelector.jp-mod-styled {
128141
.pr-DragImage {
129142
box-shadow: var(--jp-elevation-z1);
130143
border: var(--jp-border-width) solid var(--jp-brand-color1);
131-
}
144+
}

style/variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,4 +402,4 @@ all of MD as it is not optimized for dense, information rich UIs.
402402
--jp-icon-contrast-color1: var(--md-green-600);
403403
--jp-icon-contrast-color2: var(--md-pink-600);
404404
--jp-icon-contrast-color3: var(--md-blue-600);
405-
}
405+
}

0 commit comments

Comments
 (0)