-
Notifications
You must be signed in to change notification settings - Fork 166
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
#1055 export selected tips #1067
#1055 export selected tips #1067
Conversation
# Conflicts: # package-lock.json # package.json
…nodes when metadata generated via this method
…of selected tips only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great, thanks! I like the new aesthetics and this feature will be widely used by researchers viewing SARS-CoV-2 right now
In addition to the in-line comments could you please:
- Remove the package.json related changes. I'm not sure why your
npm install
changed them, but better to keep them out of this PR. - Fix linting errors introduced by this PR. You can run
npm run lint
to see these. (As an aside, we now have CI tests which run linting etc as part of this project 🎉 ).
(<RectangularTreeIcon width={iconWidth} selected />), () => helpers.newick(this.props.dispatch, filePrefix, this.props.nodes[0], true)], | ||
["All Metadata (TSV)", `Per-sample metadata for all samples in the dataset (n = ${this.props.metadata.mainTreeNumTips}).`, | ||
(<MetaIcon width={iconWidth} selected />), () => helpers.strainTSV(this.props.dispatch, filePrefix, this.props.nodes, this.props.metadata.colorings, false, null)], | ||
["Selected Metadata (TSV)", `Per-sample metadata for strains which are currently displayed (n = ${selectedTipsCount}/${this.props.metadata.mainTreeNumTips}).`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a check to see if selectedTipsCount !== 0
in order to add this entry (similar to the check for areAuthorsPresent
on the following line). It doesn't crash if there are no selected tips, but it'd be better to not allow the option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a check, but just to clarify - do you want the option to appear when all tips are selected? (that is, when downloading selected tip data would be the same as the total number of tips)
I'm going to assume it was something weird I did, rather than npm's fault. Reverted.
Apologies, I wrote a note to myself to do this and forgot! Had a little trouble getting the linter to work on my system, but it is working now, and I've done this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful, thanks!
Description of proposed changes
Adds the ability to export only tips which are selected from the download data modal. Refreshes layout of download area of modal, and adds descriptions of the data available for download.
Testing
Thank you for contributing to Nextstrain!