linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Implement view settings <-> JSURL integration #41

Closed JobLeonard closed 8 years ago

JobLeonard commented 8 years ago

We can now link directly to a view in a dataset. However, this does not include the view settings of said dataset.

Implementing this could be somewhat tricky, because these settings currently reside in the various redux states (landscapeState, genescapeState, etc) and are changed through dispatches (SET_LANDSCAPE_PROPS, etc).

I need to figure out how to untangle and rewire that to use the browser history, and whether or not this will completely replace that or complement the existing system. We're using react-router-redux, so essentially are already tied to redux for our browser history anyway.

My current thoughts are moving all of this state into the browser URL - otherwise we'd split responsibility for view states between redux store and URL bar, and that's asking for bugs related to these states being out of sync or otherwise in conflict.

However, how to translate the current dispatch/reducer set-up to pushing to and listening to browser-urls is not immediately obvious, although there should be a straightforward translation of one concept to the other. Something for me to ponder over the weekend and get working next week, hopefully :).

Relevant documentation:

JobLeonard commented 8 years ago

I've made quite a lot of progress on this one today - in fact, the only thing not working properly is the fetching of genes when coming to a fresh page! Also, heatmap needs to remember its coordinates; right now it resets every time you view it.

JobLeonard commented 8 years ago

Gene fetching is fixed! This is ridiculously satisfying :)

https://www.youtube.com/watch?v=Dle4WKaSNQU&feature=youtu.be

All that's left now is saving the zoom/center-of-map state of the heatmap and we're done.

JobLeonard commented 8 years ago

DONE! WOO!

Demonstration here

Oh, and for good measure I also implemented this totally unrelated feature: Order by multiple keys in Sparkline view

slinnarsson commented 8 years ago

👍

Skickat från min iPhone

8 sep. 2016 kl. 19:46 skrev Job van der Zwan notifications@github.com<mailto:notifications@github.com>:

DONE! WOO!

Demonstration herehttps://www.youtube.com/watch?v=UzvjLx67lgY

Oh, and for good measure I also implemented this totally unrelated feature: Order by multiple keys in Sparkline viewhttps://www.youtube.com/watch?v=MFmuiX_WQDQ

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/linnarsson-lab/Loom/issues/41#issuecomment-245776940, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKag2HOKB-BacvOI8zwF-VCEOMmsigVks5qoJ4wgaJpZM4JjWIU.

JobLeonard commented 8 years ago

BTW Sten, I have to delegate deploying this version to you again - after the conference (or maybe in a boring moment during, although I suspect you'll be busy) we should sit down and figure out why my laptop refuses to deploy.

slinnarsson commented 8 years ago

Ok, I deployed now. The wifi here is flaky but I think it got through.

/Sten

Sten Linnarsson, PhD Professor of Molecular Systems Biology Karolinska Institutet Unit of Molecular Neurobiology Department of Medical Biochemistry and Biophysics Scheeles väg 1, 171 77 Stockholm, Sweden +46 8 52 48 75 77 (office) +46 70 399 32 06 (mobile)

On 09 Sep 2016, at 10:33, Job van der Zwan notifications@github.com<mailto:notifications@github.com> wrote:

BTW Sten, I have to delegate deploying this version to you again - after the conference (or maybe in a boring moment during, although I suspect you'll be busy) we should sit down and figure out why my laptop refuses to deploy.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/linnarsson-lab/Loom/issues/41#issuecomment-245931271, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKKag1y34WezCQa-C_3H6NDisOXDiw0Gks5qoW5RgaJpZM4JjWIU.