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

On Study View set showNA to false by default for histogram #4876

Merged
merged 3 commits into from
Apr 1, 2024

Conversation

olzhasmukayev
Copy link
Contributor

@olzhasmukayev olzhasmukayev commented Mar 22, 2024

Fix cBioPortal/cbioportal#10661 (see https://help.github.com/en/articles/closing-issues-using-keywords)

Describe changes proposed in this pull request:

  • Remove NA fields on Study View Page by default

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

Any screenshots or GIFs?

No

Notify reviewers

@alisman @inodb
Read our Pull request merging
policy
. It can help to figure out who worked on the
file before you. Please use git blame <filename> to determine that
and notify them either through slack or by assigning them as a reviewer on the PR

Copy link

netlify bot commented Mar 22, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit fa48612
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/660684f07018190008d59922
😎 Deploy Preview https://deploy-preview-4876--cbioportalfrontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@olzhasmukayev olzhasmukayev marked this pull request as draft March 22, 2024 14:06
@olzhasmukayev
Copy link
Contributor Author

Found issue with Bar charts loading. Try fix now

@alisman
Copy link
Collaborator

alisman commented Mar 25, 2024

@inodb can you QA this and merge?

@alisman alisman marked this pull request as ready for review March 25, 2024 16:44
@olzhasmukayev
Copy link
Contributor Author

olzhasmukayev commented Mar 25, 2024

@inodb can you QA this and merge?

Hello! @alisman

I found the bug in this code. Please do not merge this PR. This somehow breaks the Bar Chart view, where there is no NA toggle available. For example for this case:

image

Adding the code in PR, would completely erase the view of the data:

image

I spend some time to understand why this happens, but i couldn't find the reason. Can someone help look into this issue?

Thank you!

@olzhasmukayev
Copy link
Contributor Author

I fixed the issue with the Bar Charts. The problems was with the conditions in the

get labelShowingNA() function
and
get tickValuesBasedOnNA() function

The reason for this was, because the showNAChecked is now false by default, but in the tickValuesBasedOnNA() function

if (this.props.showNAChecked) -> the code will enter this block

and this line
const tickValuesWithoutNA = this.tickValues.slice(0, -this.numberOfNA);

will completely erase the actual numerical values.
const tickValuesWithoutNA = this.tickValues.slice(0, -0); -> gives empty array

Therefore, we need to introduce the additional if guards to the functions to handle empty conditions.

Thank you!

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

LGTM! Just screenshots need to be updated

@olzhasmukayev
Copy link
Contributor Author

Hi!

Here are the screenshots of the barts with NA hidden by default.

image

@inodb inodb added the gsoc label Apr 1, 2024
@alisman alisman merged commit 8f28e24 into cBioPortal:master Apr 1, 2024
14 of 15 checks passed
@inodb inodb changed the title set showNA to false by default On Study View set showNA to false by default for histogram May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't show NA on Study View by default
3 participants