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

Zooming out from a labelled subtree does not correctly update the URL query #1138

Open
jameshadfield opened this issue May 26, 2020 · 3 comments · May be fixed by #1151
Open

Zooming out from a labelled subtree does not correctly update the URL query #1138

jameshadfield opened this issue May 26, 2020 · 3 comments · May be fixed by #1151
Assignees
Labels
bug Something isn't working good first issue A relatively isolated issue appropriate for first-time contributors

Comments

@jameshadfield
Copy link
Member

Current Behavior
Clicking on the root branch of a displayed subtree zooms out (in the tree). If the currently zoomed-to branch has a label set, then this is displayed in the URL query as ?label=.... When zooming out from this subtree by clicking on the root, the URL query does not update.

Expected behavior
Upon zooming out from the subtree by clicking on the root, then the label should disappear from the URL query.

How to reproduce
Steps to reproduce the current behavior:

  1. Open https://nextstrain.org/staging/test/tree-labels-2020-05-26
  2. Click on the branch labelled "string-value" to zoom into the subclade. Observe that the URL query updates.
  3. Click on the root branch of the subtree (the left-most bit).
  4. We correctly zoom out, however the URL query remains when it should be cleared.

Possible solution
Update the URL (redux) middleware to listen for the appropriate redux action & update the query

Note that pressing "reset layout" when zoomed in does correctly clear the URL query.

Your environment: if browsing Nextstrain online
Auspice 2.15.0

@jameshadfield jameshadfield added bug Something isn't working good first issue A relatively isolated issue appropriate for first-time contributors low priority labels May 26, 2020
@ktun95
Copy link

ktun95 commented May 30, 2020

Hello, I would like to take on this issue, if that's all right.

@jameshadfield
Copy link
Member Author

Wonderful!

P.S. here is the link to the dataset JSON behind the example above which should help with local development.

@ktun95
Copy link

ktun95 commented Jun 2, 2020

Hi! I just made a PR. This is my first one, so I would really appreciate all the feedback I can get, and make any changes necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue A relatively isolated issue appropriate for first-time contributors
Projects
No open projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants