ebi-gene-expression-group / atlas-components

Front end components of Expression Atlas and Single Cell Expression Atlas
3 stars 3 forks source link

📦 scxa-cell-type-wheel-experiment-heatmap 💬 Feature #179948196 – Filter heatmap by experiment accessions #111

Closed alfonsomunozpomer closed 2 years ago

alfonsomunozpomer commented 2 years ago

NOTE: When reviewing this PR ignore all changes under the path scxa-cell-type-wheel. Those are part of https://github.com/ebi-gene-expression-group/atlas-components/pull/107 and should be reviewed independently.

Besides adding the experimentAccessions as request parameters to the fetch request, I followed the same strategy with both components (i.e. the wheel and the heatmap): enrich the wheel with our fetch loader HOC and avoid adding data as props in the wrapping component. This will require changes in the JSP but it will make the maintenance of this component a lot simpler, as changes in the wheel will require fewer changes here, if any.

Lastly I made the component fully functional, also following the latest React recommendations to use function rather than arrow functions, and declaring functions before render to avoid creating them every time the component re-renders.

I added one minimal test, not so much for correctness, but to easily append more tests.

lingyun1010 commented 2 years ago

I tried to run the demo, but once clicked a cell type, I got an error in the console TypeError: f.default[l] is undefined. And experiment heatmap is not showing properly.

alfonsomunozpomer commented 2 years ago

@lingyun1010 Did you remember to run npx lerna bootstrap after checking out the branch?