Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Pipeline Viz React Component #2340

Merged
merged 31 commits into from
Jun 25, 2019
Merged

Conversation

emilyzhong
Copy link
Contributor

@emilyzhong emilyzhong commented Jun 18, 2019

Initial Pipeline Viz React Component

Initial component for pipeline visualization

Notes

Functionality/features very likely to change once final designs are in

Tests

Go to samples/[sample id]/stage_results

@emilyzhong emilyzhong changed the title [WIP] Add React Component for Pipeline Viz [WIP] Intial Pipeline Viz React Component Jun 20, 2019
@emilyzhong emilyzhong changed the title [WIP] Intial Pipeline Viz React Component [WIP] Initial Pipeline Viz React Component Jun 20, 2019
from: nodeData.id,
to: END_NODE_ID,
color: {
color: STAGE_BG_COLOR,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may want to consider some sort of className based coloring instead of directly setting styles here

Copy link
Contributor

@jshoe jshoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty nice! I'm not completely clear about how this graph library works but you may want to move more objects to state and more styling to CSS

app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
@tfrcarvalho
Copy link
Contributor

Looks great. A lot of work here... I think we can make an effort to make it a bit more modular. We can discuss that offline.

@jshoe
Copy link
Contributor

jshoe commented Jun 21, 2019

This is not a blocker but for the future I would lean towards more popular libraries if possible (re: ajainarayanan/react-pan-zoom). Package hijacking is always possible https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident

@jshoe
Copy link
Contributor

jshoe commented Jun 24, 2019

looks pretty good 👍 see last comments

@jshoe
Copy link
Contributor

jshoe commented Jun 24, 2019

ok and see Travis for an out of memory error T_T

@emilyzhong emilyzhong changed the title [WIP] Initial Pipeline Viz React Component Initial Pipeline Viz React Component Jun 24, 2019
Copy link
Contributor

@lvreynoso lvreynoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few things

app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
Copy link

@dcwither dcwither left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a general JS review since I was looking through for the docker file and noticed the react code.

app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
const START_NODE_ID = -1;
const END_NODE_ID = -2;

class PipelineViz extends React.Component {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered a function component with hooks? It looks like it could handle all of this, and be a little cleaner, though I don't want to assume.

Copy link
Contributor

@tfrcarvalho tfrcarvalho Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious @dcwither , what criteria triggered you to make that suggestion?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • use of a componentDidMount when a componentDidUpdate is probably also necessary (solved by dependencies in the useEffect hook).
  • multiple pieces of state that are modified independently, also some that could benefit from useReducer
  • I think it would also help identify things that are being mutated that shouldn't be

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points!
However this is just the first pass on this component with basic functionality, so I am not sure we want to go with a functional component. But we will definitely keep that in mind.

app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
app/assets/src/components/views/PipelineViz.jsx Outdated Show resolved Hide resolved
@emilyzhong emilyzhong merged commit 56c63dd into master Jun 25, 2019
@emilyzhong emilyzhong deleted the ezhong/pipeline_viz_graph branch June 25, 2019 22:38
kislyuk pushed a commit that referenced this pull request Sep 16, 2022
* migrate projectselect, thresholdfiltertag, sampletypesearchbox

* migrate files from common

* migrate common/heatmap

* migrate pinSampleSelector

* fix pr notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants