Skip to content
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

Changing datasets crashes with genotype colorby #611

Closed
trvrb opened this issue Aug 4, 2018 · 2 comments
Closed

Changing datasets crashes with genotype colorby #611

trvrb opened this issue Aug 4, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@trvrb
Copy link
Member

trvrb commented Aug 4, 2018

@jameshadfield ---

I generally like the new behavior where visualization state is preserved when switching between datasets via the dropdown. Ie, if I'm at https://nextstrain.org/zika?l=clock and switch to ebola I arrive at https://nextstrain.org/ebola?l=clock. However, if the original visualization state doesn't exist in the target dataset then the app crashes out to 404. For example, if you start at https://nextstrain.org/zika?c=gt-NS1_349 and switch to ebola then the get the crash as ebola doesn't have NS1 to color by.

Actually... for non-genotype color bys you don't get a 404, but it's still unexpected behavior. For example, go from https://nextstrain.org/WNV/NA?c=wnv_strain and select zika and you end up at https://nextstrain.org/zika?c=wnv_strain, which then shows coloring by date.

This issue exists for geo resolutions in addition to color bys. For example, https://nextstrain.org/zika?r=region switches to https://nextstrain.org/ebola?r=region, which doesn't exist.

I don't know the best treatment for this. One option would be to return to the previous behavior of nuking state, but this is bad for things like panel grid. Fixing the crash on genotype color by seems like an obvious first step.

@trvrb trvrb added the bug Something isn't working label Aug 4, 2018
@trvrb trvrb changed the title Changing datasets crashes when colorby absent Changing datasets crashes with genotype colorby Aug 4, 2018
@jameshadfield
Copy link
Member

https://nextstrain.org/zika?l=clock and switch to ebola I arrive at https://nextstrain.org/ebola?l=clock

Aha... This wasn't intentional - but yes, it's nice in some situations!

Geographic resolution & colorBy are "dataset specific" (as opposed to grid etc) so perhaps these should be nuked on dataset change... Other things work but remain in the URL (e.g. having the frequency panel in the URL and going to zika doesn't raise any errors, but the frequency panel is still specified in the URL, which isn't correct)

@trvrb
Copy link
Member Author

trvrb commented Aug 4, 2018

There are situations where it's nice to keep colorby when changing datasets for example going from https://nextstrain.org/flu/seasonal/h3n2/ha/3y?c=ep to 12y it's nice to keep coloring by epitope. But maybe this is too difficult to accomplish generically, as going from https://nextstrain.org/flu/seasonal/h3n2/ha/3y?c=ep to vic lacks epitope as a coloring option.

Nuking everything except "grid" seems like a pretty good option. Grid layout feels very natural to keep when changing datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants