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

Fix #973 (Legend ordering) #979

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

douglowder
Copy link
Contributor

@douglowder douglowder commented Mar 24, 2020

Description of proposed changes

  • The legend ordering code was treating stateCount as an object when it is actually a Map.
  • Added code to sort items alphabetically if they have equal counts.
  • Refactored this code into its own module for easier testing.
  • Added unit tests.

Related issue(s)

Related to #973

Testing

Verified the changes locally, and added Jest tests.

Thank you for contributing to Nextstrain!

@jameshadfield
Copy link
Member

Wonderful! and even includes tests 🎉

@jameshadfield jameshadfield merged commit 13b2c39 into nextstrain:master Mar 24, 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.

2 participants