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

Revert temp clinical data value casing workaround #5074

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions src/pages/studyView/table/ClinicalTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ import {
getFixedHeaderTableMaxLengthStringPixel,
} from '../StudyViewUtils';
import { SortDirection } from '../../../shared/components/lazyMobXTable/LazyMobXTable';
import {
EllipsisTextTooltip,
lowerCaseAndCapitalizeString,
} from 'cbioportal-frontend-commons';
import { EllipsisTextTooltip } from 'cbioportal-frontend-commons';
import { DEFAULT_SORTING_COLUMN } from '../StudyViewConfig';
import ComparisonVsIcon from 'shared/components/ComparisonVsIcon';
import { capitalizeFirstLetters } from 'cbioportal-frontend-commons';

export interface IClinicalTableProps {
data: ClinicalDataCountSummary[];
Expand Down Expand Up @@ -118,23 +114,6 @@ export default class ClinicalTable extends React.Component<
return this.props.label ? this.props.label : ColumnKey.CATEGORY;
}

// this code should be deleted when we have fixed RFC80 capitalization issues in backedn (12/12/2024)
valueFormatters = {
'Cancer Type': (str: string) => capitalizeFirstLetters(str),
'Cancer Type Detailed': (str: string) => capitalizeFirstLetters(str),
'Sample Type Detailed': (str: string) => capitalizeFirstLetters(str),
};

// this code should be deleted when we have fixed RFC80 capitalization issues in backedn (12/12/2024)
@computed get valueFormatter() {
if (this.props.title && this.props.title in this.valueFormatters) {
// @ts-ignore
return this.valueFormatters[this.props.title];
} else {
return (str: string) => str;
}
}

@computed
private get columns() {
return [
Expand Down Expand Up @@ -165,9 +144,7 @@ export default class ClinicalTable extends React.Component<
</g>
</svg>
<EllipsisTextTooltip
text={this.valueFormatter(
data.displayedValue || data.value
)}
text={data.displayedValue || data.value}
></EllipsisTextTooltip>
</div>
);
Expand Down
Loading