-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
…ong/pipeline_viz_graph
…ong/pipeline_viz_graph
…ong/pipeline_viz_graph
from: nodeData.id, | ||
to: END_NODE_ID, | ||
color: { | ||
color: STAGE_BG_COLOR, |
There was a problem hiding this comment.
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
There was a problem hiding this 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
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. |
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 |
looks pretty good 👍 see last comments |
ok and see Travis for an out of memory error T_T |
There was a problem hiding this 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
There was a problem hiding this 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.
const START_NODE_ID = -1; | ||
const END_NODE_ID = -2; | ||
|
||
class PipelineViz extends React.Component { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 acomponentDidUpdate
is probably also necessary (solved by dependencies in theuseEffect
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
There was a problem hiding this comment.
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.
…ong/pipeline_viz_graph
…ong/pipeline_viz_graph
…/idseq-web into ezhong/pipeline_viz_graph
* migrate projectselect, thresholdfiltertag, sampletypesearchbox * migrate files from common * migrate common/heatmap * migrate pinSampleSelector * fix pr notes
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