Skip to content

Commit 7b9434c

Browse files
committed
Merge branch 'master' of https://github.com/4dn-dcic/react-workflow-viz into May2023-deps
2 parents b3aec7e + 0a24821 commit 7b9434c

File tree

4 files changed

+64
-16
lines changed

4 files changed

+64
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- [View releases on NPM](https://www.npmjs.com/package/@hms-dbmi-bgm/react-workflow-viz?activeTab=versions)
55
- [View releases on Unpkg](https://unpkg.com/browse/@hms-dbmi-bgm/react-workflow-viz/)
66

7+
#### 2023-05-17 (v0.1.9)
8+
- No changes except `package-lock.json` + `package.json` version (new NPM release)
9+
710
#### 2023-05-16 (v0.1.8)
811
- Add new metaworkflow run example to demo page
912

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
11
# react-workflow-viz
22
React component for visualizing CWL-like workflows (and similar data).
33

4-
This is in alpha/beta phase.
4+
This repository is in alpha/beta phase, and is provided with very, very limited support to folks outside of HMS. Hopefully, in the future this will change!
55

6-
7-
This package is being used by HMS-DBMI in the [4DN Data Portal](https://data.4dnucleome.org/experiment-set-replicates/4DNESMU2MA2G/#graph-section) to show provenance of analytical pipeline runs.
6+
Currently, this package is being used by HMS-DBMI in the [4DN Data Portal](https://data.4dnucleome.org/experiment-set-replicates/4DNESMU2MA2G/#graph-section) to show provenance of analytical pipeline runs.
87
Also being used in [CGAP](https://cgap.hms.harvard.edu) for similar purposes.
98

109
Check out a live demo at [unpkg.com/@hms-dbmi-bgm/react-workflow-viz/index.html](https://unpkg.com/@hms-dbmi-bgm/react-workflow-viz/index.html). _Note: This link points to the index.html file in the distributable NPM package (and in this repo)._
1110

11+
[![Gif of CWL Workflow Viz](https://i.gyazo.com/0c5e73105b1f284c16a9cca03ec866ed.gif)](https://unpkg.com/@hms-dbmi-bgm/react-workflow-viz/index.html)
12+
13+
<br/>
14+
<br/>
1215

13-
## Build demo
16+
## Try Demo Locally
1417

15-
With a checkout of the repo:
18+
With a local clone and checkout of the repo:
1619
```
1720
npm install
1821
npm run build
1922
```
2023

2124
When it completes, load `file:///path-to-your-checkout/react-workflow-viz/index.html`.
22-
New testdata won't show with `npm run build` unless is already present in unpkg/npm. For local development, do the following
2325

26+
_Note: New test data won't show with `npm run build` unless it is already present in unpkg/npm._
2427

25-
### For Development
28+
<br/>
2629

27-
For local development (watches file, serves on localhost:8100), run `npm run dev`.
30+
### For Contributors/Collaborators
31+
For local development, run `npm run dev` (watches `/src/` files, serves on `localhost:8100`).
2832

33+
<br/>
34+
<br/>
2935

3036
## Changelog
31-
Changelog has been moved to `CHANGELOG.md` file in root directory. Please check there for updates.
37+
Changelog has been moved to `CHANGELOG.md` file in [repo's root directory](https://github.com/4dn-dcic/react-workflow-viz/blob/master/CHANGELOG.md). Please check there for updates.
3238

39+
<br/>
40+
<br/>
3341

3442
## Things to do
3543

demo/demo.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class DemoApp extends Component {
9898
parseBasicIO: false
9999
},
100100
loadedSteps: {},
101-
rowSpacingType: "compact"
101+
rowSpacingType: "compact",
102+
loadingSteps: false,
102103
};
103104
}
104105

@@ -144,16 +145,20 @@ class DemoApp extends Component {
144145
const existingSteps = currDemoInfo.steps || loadedSteps[name];
145146

146147
if (!Array.isArray(existingSteps)) {
147-
this.setState({ loadingSteps: true }, ()=>{
148-
window.fetch(url.resolve(window.location.href, href)).then((resp)=>{
149-
return resp.json();
150-
}).then((resp)=>{
148+
this.setState({ loadingSteps: true }, () => {
149+
window.fetch(url.resolve(window.location.href, href))
150+
.then((resp) => resp.json())
151+
.then((resp) => {
151152
this.setState(function({ loadedSteps: prevSteps }){
152153
return {
153154
loadedSteps: { ...prevSteps, [name] : resp },
154155
loadingSteps: false
155156
};
156157
});
158+
})
159+
.catch((err) => {
160+
console.error("Something went wrong while loading data!", err);
161+
this.setState({ loadingSteps: false });
157162
});
158163
});
159164
}
@@ -229,6 +234,9 @@ function ParsingOptsCheckboxes(props){
229234
return (
230235
<div className="parsing-options-container options-container">
231236
<h5>Parsing Options</h5>
237+
<p className="tip-text">
238+
Note: updating the viz for some parsing options (such as showing parameters) may take a few seconds to complete for larger test datasets.
239+
</p>
232240
<label>
233241
<input type="checkbox" name="showReferenceFiles"
234242
checked={dataOpts['showReferenceFiles'] || showReferenceFiles}

index.html

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
margin-bottom: 10px;
2222
}
2323

24+
code {
25+
background-color: #333;
26+
color: #fff;
27+
padding-left: 5px;
28+
padding-right: 5px;
29+
margin-left: 3px;
30+
margin-right: 3px;
31+
}
32+
2433
#pagetitle {
2534
padding-top: 10px;
2635
padding-bottom: 10px;
@@ -31,6 +40,11 @@
3140

3241
}
3342

43+
.intro {
44+
max-width: 700px;
45+
margin-bottom: 5px;
46+
}
47+
3448
.options-container {
3549
margin-bottom: 10px;
3650
}
@@ -40,6 +54,12 @@
4054
padding: 5px 10px;
4155
}
4256

57+
.parsing-options-container p {
58+
font-size: smaller;
59+
font-style: italic;
60+
max-width: 700px;
61+
}
62+
4363
.parsing-options-container > label > input[type="checkbox"] {
4464
margin-right: 5px;
4565
vertical-align: text-bottom;
@@ -59,8 +79,17 @@
5979
<h1 id="pagetitle">
6080
React Workflow Viz Demo
6181
</h1>
62-
<p>
63-
One day there will be a description here...
82+
<p class="intro">
83+
Thanks for trying out <code>react-workflow-viz</code>!
84+
</p>
85+
<p class="intro"> Here you can play with a some examples of the types of visualizations this package can create. To get started, select the type of data you're most interested in visualizing from the dropdown below:
86+
<!-- <ul>
87+
<li><strong>File Processed:</strong> @TODO - add a short description of workflow viz + info on what C4 portal this data type is available on</li>
88+
<li><strong>Experiment Set:</strong> @TODO - add a short description of workflow viz + info on what C4 portal this data type is available on</li>
89+
<li><strong>CWL Workflow:</strong> @TODO - add a short description of workflow viz + info on what C4 portal this data type is available on</li>
90+
<li><strong>WorkflowRunAWSEM:</strong> @TODO - add a short description of workflow viz + info on what C4 portal this data type is available on</li>
91+
<li><strong>MetaWorkflowRun:</strong> @TODO - add a short description of workflow viz + info on what C4 portal this data type is available on</li>
92+
</ul> -->
6493
</p>
6594
<hr/>
6695
<div id="root">

0 commit comments

Comments
 (0)