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

Results view mutations tab should show filtered and total counts in filter alert #4485

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

gblaih
Copy link
Contributor

@gblaih gblaih commented Jan 19, 2023

@@ -10,13 +10,13 @@ export function getPatientSampleSummary(samples: any[], patients: any[]) {
const sampleUnits = samples.length === 1 ? 'sample' : 'samples';
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a comment about this whole function. i do realize this is not your code. but we could take opportunity to improve it. 1) probably this should be a component. 2) we should improve on the typing of the arguments. anytime we see use of any, we should try to fix it. in this case, patients looks like it's string[]. for samples, there is an existing type, SampleIdentifiers which i think will work here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sample and patients can be Sample[] or Patient[] respectively as well so I added those along with the SampleIdentifier[] and string[] types

Copy link
Collaborator

@alisman alisman left a comment

Choose a reason for hiding this comment

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

see comments

@alisman alisman merged commit 6dfc539 into cBioPortal:master Jan 20, 2023
import _ from 'lodash';

interface IPatientSampleSummaryProps {
samples: Sample[] | SampleIdentifier[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gblaih i went ahead and merged but probably we should just pass in counts instead of this slightly odd signature. But it's not important enough to bother.

@dippindots dippindots added the bug label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants