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

Allow tip labels to be user selected #1246

Merged
merged 1 commit into from
Jan 5, 2021
Merged

Conversation

jameshadfield
Copy link
Member

Adds an additional dropdown box to allow users to change the attribute used as tip labels. This is similar in design to the branch label drop down.

Currently attributes are limited to the colorings. The function which collects these, collectAvailableTipLabelOptions could be easily extended to produce further valid attributes.

This should pave the way for smarter and more customisable logic around when labels are displayed, and the dropdown should not be shown in the situation that labels aren't shown.

For a full description, see #1201
Closes #1201

@allenkj2 and @batson could you test this for me please? (I can't add you as reviewers due to GitHub collaboration settings)

@jameshadfield jameshadfield temporarily deployed to auspice-tip-label-sourc-nblhgr December 18, 2020 03:38 Inactive
@allenkj2
Copy link

This is really great! The only oddity I'm seeing is with how dates are presented - when I select the 'sampling date,' I get the formatting below.
image

@emmahodcroft
Copy link
Member

This is super cool James!!
I agree that we might want to see if we can format the date back to a YYYY-MM-DD format before displaying, if that's not too difficult.

We might also want to filter out 'genotype' as a tip label. It would actually be pretty cool to enable this but I imagine it would be more work - we could always come back to that in future! For short term might be good to just leave off the list.

Adds an additional dropdown box to allow users to change the attribute used as tip labels. This is similar in design to the branch label drop down.

Currently attributes are limited to the colorings. The function which collects these, `collectAvailableTipLabelOptions` could be easily extended to produce further valid attributes.

This should pave the way for smarter and more customisable logic around _when_ labels are displayed, and the dropdown should not be shown in the situation that labels aren't shown.

For a full description, see #1201
Closes #1201
@jameshadfield jameshadfield temporarily deployed to auspice-tip-label-sourc-nblhgr December 20, 2020 23:10 Inactive
@jameshadfield
Copy link
Member Author

Tip label formats now updated to turn dates into pretty strings and genotype removed from the available options. (Genotype would make sense as a labeling when the coloring is also genotype, but implementing this would entail more complex logic which is best left for a subsequent PR.)

@jameshadfield jameshadfield merged commit 309cd06 into master Jan 5, 2021
@jameshadfield jameshadfield deleted the tip-label-source branch January 5, 2021 20:42
@batson
Copy link

batson commented Jan 28, 2021

This is fantastic, @jameshadfield. Completely changes the navigation experience.

My only request now is that it go up on auspice.us, so the counties working with private data/trees can see the PII they're looking for!

Thanks again for the feature!

@sidneymbell
Copy link
Contributor

sidneymbell commented Jan 28, 2021 via email

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 "Label By" dropdown for labeling nodes by attributes other than name
5 participants