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

Clade URL Bugs: Unwanted root and Overriding Filters #744

Closed
emmahodcroft opened this issue Jul 18, 2019 · 3 comments · Fixed by #746
Closed

Clade URL Bugs: Unwanted root and Overriding Filters #744

emmahodcroft opened this issue Jul 18, 2019 · 3 comments · Fixed by #746
Labels
bug Something isn't working

Comments

@emmahodcroft
Copy link
Member

For both v1 and v2 style JSONs (though not tested all variations extensively), clade=root shows up randomly (unasked for) in the URL and sticks around for a while. I found another bug while investigating this, but they may be related?

This is on bibtex, v2, and master branches of auspice. Also on the live version online. I'll use the live Enterovirus as an example.

Loading the JSON goes fine. Then, if one clicks on a tip, clade=root appears (it should not, for this action):
image

When you click away, it doesn't disappear:
image

Changing color-by (inc Genotype), flipping AA/nuc, or clicking on other tips does not clear it, and neither does changing layout, divergence/time, or date range.

Pressing the greyed-out 'Reset layout' button does clear it.
Zooming in to a random branch (not a defined clade) clears it.
Zooming into a defined clade replaces it with the clade (correctly), and then clicking 'Reset layout' (not greyed out now) returns tree and URL to normal (clade=root is gone).

After doing any of these things, clicking on other tips does not make it reappear.
If you do any of the above 3 things before clicking on a tip (including clicking on the greyed-out 'Reset layout' button), then it will not occur at all.


Using filter options also clears it - but this is actually another (?) bug. Filter options seem to override any clade options in the URL.

If I zoom in to clade B1 and then filter by country, the URL looks like:
image

It should also show the clade URL, like:
https://nextstrain.org/enterovirus/d68/genome?clade=B1&f_country=Canada

This is particularly troublesome because if you then clear the filter, you're still zoomed in but the URL doesn't reflect this:
image

Using/clearing filters does not seem to affect other color-by options or other filter options which are in use (these are preserved).

@emmahodcroft emmahodcroft added the bug Something isn't working label Jul 18, 2019
@trvrb
Copy link
Member

trvrb commented Jul 18, 2019

I notice this a lot when navigating tree layout. Would be really nice to resolve. Thanks for detailing this so carefully @emmahodcroft.

jameshadfield added a commit that referenced this issue Jul 18, 2019
See #744 for a description of this bug.
@jameshadfield
Copy link
Member

Thanks @emmahodcroft for the detailed error messages -- it made finding the bugs so much easier.

Could you test branch root-url which has fixes for both these bugs 🎉 and merge into master if it behaves appropriately

Tangentially related behavior: if the "root" of the tree is labelled, then you can click on it and change the selected clade in the URL even if the tree doesn't change appearance. This is fixable but more trouble than it's worth I think. You can see this with h3n2/ha/3y where the root is labelled 3c.

@emmahodcroft
Copy link
Member Author

Could you test branch root-url which has fixes for both these bugs 🎉 and merge into master if it behaves appropriately

Will do!

Tangentially related behavior: if the "root" of the tree is labelled, then you can click on it and change the selected clade in the URL even if the tree doesn't change appearance. This is fixable but more trouble than it's worth I think. You can see this with h3n2/ha/3y where the root is labelled 3c.

I agree it's more trouble than it's worth, and I don't think it's particularly troublesome behaviour.

jameshadfield added a commit that referenced this issue Aug 29, 2019
We now check every value on the tree and if not valid (or not set) always return the `UNDEFINED_VALUE` constant.
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

Successfully merging a pull request may close this issue.

3 participants