Skip to content

Conversation

@rosh2525
Copy link

@rosh2525 rosh2525 commented Oct 7, 2025

This adds a portal property skin.hide_clinical_data_tab_study_view, which can hide the Clinical Data tab in the Study View page

Fixes cBioPortal/cbioportal#11653

Describe changes proposed in this pull request:

  • Added a new portal property, skin.hide_clinical_data_tab_study_view, to the IServerConfig interface.
  • This property is used in StudyViewPage.tsx to conditionally hide the "Clinical Data" tab.
  • Updated configuration loading to recognize window.portalProperties for local testing.

Checks

  • [ x] 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.

This is a minor visual change controlled by a configuration flag and does not require a dedicated test.

  • [ x] 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.
  • [x ] 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?

Screenshot 2025-10-05 at 3 32 32 PM Screenshot 2025-10-05 at 3 34 17 PM

Notify reviewers

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

clickhouse_mode: boolean;
download_custom_buttons_json: string;
feature_study_export: boolean;
skin?: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we have a convention above that dot notation gets converted to _. lets keep that

Copy link
Collaborator

Choose a reason for hiding this comment

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

if you test it this, the backend should automatically convert the dot notation. so i would think this wouldn't work. let me know if you need hlep testing this

my-index.ejs Outdated
<script>
window.devContext = true;
window.portalProperties = { skin: { hide_clinical_data_tab_study_view: false } };
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this for testing purposes?

}
}

let portalProperties: any = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's this for?

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

@rosh2525 rosh2525 force-pushed the hide-clinical-tab-v2 branch 2 times, most recently from f30873b to 20d89b2 Compare December 5, 2025 21:52
@rosh2525 rosh2525 force-pushed the hide-clinical-tab-v2 branch from aabd624 to b647ffa Compare December 5, 2025 22:07
@rosh2525
Copy link
Author

rosh2525 commented Dec 5, 2025

Thanks for the review @alisman , Sorry for the late reply since I was busy with my semester exams and when I came back to my hometown I had frequent power cuts due to cyclone. I'll be active here forward to this

  • After a better look, I reverted the changes to src/config/config.ts since the default loader handles the mapping automatically.
  • I reverted my-index.ejs to remove the local testing
  • I updated IAppConfig.ts to use skin_hide_clinical_data_tab_study_view (underscore notation)
  • Fixed Rendering Logic: In StudyViewPage.tsx, I switched to using conditional rendering (const hideClinicalTab =getServerConfig().skin_hide_clinical_data_tab_study_view ?? false;) which is more reliable 

Kindly let me know if there are any more problems with this commit. Thanks !

@rosh2525
Copy link
Author

rosh2525 commented Dec 5, 2025

image

For testing, I changed const hideClinicalTab = true and Clinical Tab is hidden

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.

[FEATURE REQUEST] configuration to hide

2 participants