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

522 Add conf intervals to URL query string #1046

Merged
merged 13 commits into from
Apr 19, 2020

Conversation

eharkins
Copy link
Contributor

@eharkins eharkins commented Apr 7, 2020

Description of proposed changes

Note: this is a work in progress and was submitted early as a PR for @jameshadfield and I to discuss and test in staging on Heroku.

This will close #522 by adding the confidence intervals for the time trees to the URL query string so that they may be more easily shared, e.g. in narratives.

I was also hoping to include a fix to #1051 here as it seems relevant, so I will update the name of the PR accordingly when I push those commits.

Related issue(s)

#522
#1051
#1053

Testing

Given that the relevant part of the redux store (state.controls.temporalConfidence) has these three pieces:

  • exists: does the confidence interval exist for the value in question in the dataset?
  • display: given the tree controls settings in the current redux state, does it make sense to have confidence intervals displayed on the tree?
  • on: is the confidence intervals toggle switch on?
    , I will need to test transitioning to/from as many permutations of these three options as I can manually by changing the sidebar controls - as @jameshadfield pointed out, this would be much accelerated by automated front-end testing, which it seems like is in development (Add E2E testing #917)!

@jameshadfield jameshadfield temporarily deployed to auspice-522-url-conf-in-whscdh April 7, 2020 22:35 Inactive
@eharkins eharkins self-assigned this Apr 7, 2020
@eharkins eharkins changed the title 522 url conf intervals 522 Add conf intervals to URL query string Apr 8, 2020
@eharkins
Copy link
Contributor Author

eharkins commented Apr 9, 2020

Another potential bug:

  1. go to https://nextstrain.org/tb/global?m=div
  2. select dengue
  3. change branch length to time
  4. conf intervals toggle works visually and as it affects the redux state and url query - except it doesn't update the tree svg, so perhaps something in the d3 code.

Trying to sort out where exactly, so I can include a fix in this PR.

dont show conf interval toggle for div trees;
also consolidate logic for state.controls.temporalConfidence.display
allow confidence interval svgs to be added
@jameshadfield jameshadfield temporarily deployed to auspice-522-url-conf-in-whscdh April 10, 2020 01:00 Inactive
use a function in place of hardcoded logic about whether or not to
display confidence intervals
@jameshadfield jameshadfield temporarily deployed to auspice-522-url-conf-in-whscdh April 13, 2020 22:51 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-522-url-conf-in-whscdh April 15, 2020 02:54 Inactive
@eharkins
Copy link
Contributor Author

@jameshadfield I think this is ready to merge if you want to take one last look.

  • I tested the narrative you sent and it seems to work changing to and from the confidence slide in both directions.
  • I can't figure out why npm run develop in docs-src (i.e. docusaurus-start in docs-src/website) is not letting me test the addition to the docs, but hopefully since it's a simple addition it's not a big deal for now.

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eli -- this looks good and will help with communicating uncertainty around branch timings in narratives which is really important right now 👍 Also thanks for tracking down & fixing related bugs discovered during this PR which touched many parts of Auspice

@jameshadfield jameshadfield merged commit 3ab7754 into nextstrain:master Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add confidence intervals to URL state
2 participants