-
Notifications
You must be signed in to change notification settings - Fork 270
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
Show all survival attributes and remove duplicates in study clinical data tab #4883
Show all survival attributes and remove duplicates in study clinical data tab #4883
Conversation
✅ Deploy Preview for cbioportalfrontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@computed get chartMetaSetForClinicalAttributes(): { | ||
[id: string]: ChartMeta; | ||
} { | ||
let _chartMetaSet = _.fromPairs(this._customCharts.toJSON()); |
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 don't think we need the leading underscore here
} = {}; | ||
return _.reduce( | ||
Array.from(this._chartVisibility.entries() || []), | ||
(acc, [chartUniqueKey, visible]) => { |
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.
put the type in the callback definition instead of down below where you pass the argument. This will prevent you from using 'as' casting which loosens typing.
_.reduce(acc:ChartMeta[], ...) =>
092b417
to
9a21ff7
Compare
@@ -2895,9 +2900,19 @@ export function getChartSettingsMap( | |||
} | |||
chartSettingsMap[id] = chartSetting; | |||
}); | |||
// attributes disabled on the summary tab (used in Clinical Data tab but not Summary tab like most survival attributes) |
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.
good comment!
if (layout.i && chartSettingsMap[layout.i]) { | ||
if ( | ||
layout.i && | ||
chartSettingsMap[layout.i] && |
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.
would it be possible to avoid putting these disabled attributes into chartSettingsMap in the first place so we wouldn't have to check this here?
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.
we still want to keep the disabled attributes in the map for user settings purposes for Clinical Data
tab columns, just without the layout or else it will mess with chart layout on summary tab.
…plot is present in summary tab
4182760
to
65b0d1b
Compare
Fix cBioPortal/cbioportal#10696
Continue to hide survival attributes (besides
OS_STATUS
) in Summary tab.