MegaQC icon indicating copy to clipboard operation
MegaQC copied to clipboard

Rewrite the distributions and report page in React

Open multimeric opened this issue 5 years ago • 4 comments

Similar to what I have done for the trend page.

multimeric avatar Oct 06 '20 08:10 multimeric

@TMiguelT The distributions page is this one: https://github.com/ewels/MegaQC/blob/master/megaqc/templates/public/distributions.html

Which one do you mean with report page?

https://github.com/ewels/MegaQC/blob/master/megaqc/templates/public/report_plot.html https://github.com/ewels/MegaQC/blob/master/megaqc/templates/public/reports_management.html

Both?

Zethson avatar Nov 17 '20 11:11 Zethson

I meant the report plot, but actually this issue can be about porting any and every page to React. In the end I don't want any Jinja templates or jQuery except for the small react template that bootstraps React in Flask.

multimeric avatar Nov 17 '20 11:11 multimeric

Sounds good to me.

Which page would you suggest for me to start with (aka it being the easiest)? Then I can get started with this somewhen soonish.

Zethson avatar Nov 17 '20 11:11 Zethson

The easiest ones are those with the least interaction. So you might consider the front page, which just links to other pages and has nothing dynamic. That would be a good starting point with React. Then try something like the login/register page, which has a form but little else. You'll need to POST the data to the appropriate endpoint. Then after that you might think about the high-priority pages, ie either of the distribution and report plots.

Have a look at the dev docs for help setting up the node environment. And my existing work for how to integrate React into Flask and also how I'm doing the plots.

multimeric avatar Nov 17 '20 12:11 multimeric