By Amit's request, we need to bring back the text-area that I replaced with a drop-down, so that he can copy/paste genes. Ideally, we do this after the data structure update because this will make things a lot simpler. Also, until I figure out how to do nice autocomplete on text-areas I'll use both
The fusing of col Attributes and genes means that the FetchGene component is useless now. Instead we have to introduce code in the reducer that checks if a selected attribute is actually a gene, and if not fetched, fetches it. Should simplifiy things, however!
The placeholder logic can be relatively simple: doing a hash look-up on an undefined value in JS results in undefined, so we can just walk through the list of selected attributes/genes, and then only draw defined values.
The only thing that might be tricky is that if we're not careful, we re-render all sparklines (for example), every time one gene is fetched. I'd rather avoid that, since this can make the whole process rather slow (especially for datasets with tens of thousands of cells). I think that's actually happening right now, and the lag is notable for larger datasets on my laptop. Some caching in the sparkline view might be required here.
[ ] two-way binding of dropdown and text-area (meaning: if one updates, so should the other)
[x] distinguish between selected attributes and genes (reducer)
[x] detect if gene is already present, fetch if not (reducer)
[x] trigger fetching of genes (reducer)
[x] make sure rendering is sensible after gene has been fetched (components)
col Attributes
andgenes
means that theFetchGene
component is useless now. Instead we have to introduce code in the reducer that checks if a selected attribute is actually a gene, and if not fetched, fetches it. Should simplifiy things, however!The placeholder logic can be relatively simple: doing a hash look-up on an undefined value in JS results in
undefined
, so we can just walk through the list of selected attributes/genes, and then only draw defined values.The only thing that might be tricky is that if we're not careful, we re-render all sparklines (for example), every time one gene is fetched. I'd rather avoid that, since this can make the whole process rather slow (especially for datasets with tens of thousands of cells). I think that's actually happening right now, and the lag is notable for larger datasets on my laptop. Some caching in the
sparkline
view might be required here.