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

[Platform]: disable column hiding #625

Merged
merged 7 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/sections/src/credibleSet/GWASColoc/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const columns = [
{
id: "otherStudyLocus.studyLocusId",
label: "Navigate",
enableHiding: false,
renderCell: ({ otherStudyLocus }) => {
if (!otherStudyLocus?.variant) return naLabel;
return <Navigate to={`./${otherStudyLocus.studyLocusId}`} />;
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/credibleSet/Locus2Gene/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const columns = [
{
id: "gene",
label: "Gene",
enableHiding: false,
renderCell: ({ target }) => {
if (!target) return naLabel;
return <Link to={`../target/${target?.id}`}>{target?.approvedSymbol}</Link>;
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/credibleSet/Variants/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function getColumns({ leadVariantId, leadReferenceAllele, leadAlternateAllele }:
{
id: "variant.id",
label: "Variant",
enableHiding: false,
comparator: variantComparator(d => d?.variant),
sortable: true,
filterValue: ({ variant: v }) =>
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/disease/GWASStudies/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const columns = [
{
id: "id",
label: "Study",
enableHiding: false,
renderCell: ({ id }) => <Link to={`/study/${id}`}>{id}</Link>,
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/disease/OTProjects/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const getColumns = classes => [
{
id: "otarCode",
label: "Project Code",
enableHiding: false,
renderCell: ({ otarCode }) => (
<Link external to={`http://home.opentargets.org/${otarCode}`}>
{otarCode}
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/disease/Phenotypes/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const columns = [
{
id: "phenotypeHPO",
label: "Phenotype",
enableHiding: false,
renderCell: ({ phenotypeEFO, phenotypeHPO }) => {
let content;
if (phenotypeEFO && phenotypeEFO.id) {
Expand All @@ -56,6 +57,7 @@ const columns = [
{
id: "phenotypeHDOid",
label: "Phenotype ID",
enableHiding: false,
renderCell: ({ phenotypeHPO }) => {
const id = phenotypeHPO?.id.replace("_", ":");
return (
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/drug/DrugWarnings/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const columns = [
{
id: "toxicityClass",
label: "ChEMBL warning class",
enableHiding: false,
renderCell: ({ toxicityClass, efoIdForWarningClass, description }) => {
if (efoIdForWarningClass)
return (
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/drug/Indications/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const columns = [
{
id: "indication",
label: "Indication",
enableHiding: false,
propertyPath: "disease.name",
renderCell: d => <Link to={`/disease/${d.disease.id}`}>{d.disease.name}</Link>,
width: "38%",
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/drug/MechanismsOfAction/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const columns = [
{
id: "mechanismOfAction",
label: "Mechanism of Action",
enableHiding: false,
},
{
id: "targetName",
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/drug/Pharmacogenomics/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function Body({ id: chemblId, label: name, entity }) {
{
id: "variantRsId",
label: "rsID",
enableHiding: false,
renderCell: ({ variantRsId }) =>
variantRsId ? (
<Link
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/CRISPR/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const columns = [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease }) => (
<Link component={RouterLink} to={`/disease/${disease.id}`}>
{disease.name}
Expand All @@ -21,6 +22,7 @@ const columns = [
},
{
label: "Reported disease/phenotype",
enableHiding: false,
renderCell: ({ diseaseCellLines, diseaseFromSource }) => {
if (!diseaseCellLines) return naLabel;

Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/CRISPRScreen/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const getColumns = label => [
{
id: "studyId",
label: "Study Identifier",
enableHiding: false,
renderCell: row => (
<Link external to={`https://crisprbrain.org/simple-screen/?screen=${row.studyId}`}>
{row.studyId}
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/CancerBiomarkers/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const getColumns = label => [
{
id: "biomarkerName",
label: "Biomarker",
enableHiding: false,
renderCell: ({ biomarkerName, biomarkers }) => (
<BiomarkersDrawer biomarkerName={biomarkerName} biomarkers={biomarkers} />
),
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/CancerGeneCensus/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ const getColumns = label => [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease }) => <Link to={`/disease/${disease.id}`}>{disease.name}</Link>,
},
{
id: "mutationType",
propertyPath: "mutatedSamples.functionalConsequence",
label: "Mutation type",
enableHiding: false,
renderCell: ({ mutatedSamples }) => {
if (!mutatedSamples) return naLabel;
const sortedMutatedSamples = mutatedSamples
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/Chembl/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function getColumns(classes) {
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, cohortPhenotypes }) => {
let displayElement = naLabel;
if (disease) displayElement = <Link to={`/disease/${disease.id}`}>{disease.name}</Link>;
Expand Down Expand Up @@ -153,6 +154,7 @@ function getColumns(classes) {
{
id: "drug.name",
label: "Drug",
enableHiding: false,
renderCell: ({ drug }) => <Link to={`/drug/${drug.id}`}>{drug.name}</Link>,
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/ClinGen/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const columns = [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/ExpressionAtlas/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const columns = [
{
id: "studyId",
label: "Experiment ID",
enableHiding: false,
renderCell: ({ studyId }) => (
<Link external to={`http://www.ebi.ac.uk/gxa/experiments/${studyId}`}>
{studyId}
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/Gene2Phenotype/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const getColumns = label => [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand Down Expand Up @@ -96,6 +97,7 @@ const getColumns = label => [
{
id: "studyId",
label: "Panel",
enableHiding: false,
renderCell: ({ studyId, target: { approvedSymbol } }) => (
<Link external to={g2pUrl(studyId, approvedSymbol)}>
{studyId}
Expand Down
4 changes: 3 additions & 1 deletion packages/sections/src/evidence/GenomicsEngland/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { v1 } from "uuid";
import { Tooltip, SectionItem, Link, PublicationsDrawer, OtTable } from "ui";

import { definition } from ".";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";
import Description from "./Description";
import { epmcUrl } from "../../utils/urls";
import { sentenceCase } from "../../utils/global";
Expand Down Expand Up @@ -49,6 +49,7 @@ const getColumns = label => [
{
id: "disease",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource, cohortPhenotypes }) => (
<Tooltip
title={
Expand Down Expand Up @@ -102,6 +103,7 @@ const getColumns = label => [
{
id: "studyOverview",
label: "Genomics England Panel",
enableHiding: false,
renderCell: ({ studyOverview, studyId, target: { approvedSymbol } }) =>
studyOverview && studyId && approvedSymbol ? (
<Link external to={geUrl(studyId, approvedSymbol)}>
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/Impc/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const columns = [
{
id: "literature",
label: "Mouse model allelic composition",
enableHiding: false,
renderCell: ({
biologicalModelAllelicComposition,
biologicalModelGeneticBackground,
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/IntOgen/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const columns = [
{
id: "cohortShortName",
label: "Cohort Information",
enableHiding: false,
renderCell: ({ cohortId, cohortShortName, cohortDescription, target: { approvedSymbol } }) =>
cohortShortName && cohortDescription ? (
<>
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/OTCRISPR/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SectionItem, Link, Tooltip, OtTable, TooltipStyledLabel } from "ui";
import { definition } from ".";
import Description from "./Description";
import { dataTypesMap } from "../../dataTypes";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";

import CRISPR_QUERY from "./OTCrisprQuery.gql";

Expand Down Expand Up @@ -34,6 +34,7 @@ const getColumns = () => [
{
id: "contrast",
label: "Contrast / Study overview",
enableHiding: false,
renderCell: row => {
if (row.contrast && row.studyOverview) {
return (
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/OTEncore/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { definition } from ".";
import Description from "./Description";
import { dataTypesMap } from "../../dataTypes";
import { defaultRowsPerPageOptions, sectionsBaseSizeQuery } from "../../constants";
import { sectionsBaseSizeQuery } from "../../constants";

import ENCORE_QUERY from "./OTEncoreQuery.gql";

Expand Down Expand Up @@ -49,6 +49,7 @@ const getColumns = classes => [
{
id: "interactingTargetFromSourceId",
label: "Anchor gene",
enableHiding: false,
sortable: true,
},
{
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/OTValidation/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { v1 } from "uuid";
import { definition } from ".";
import Description from "./Description";
import { dataTypesMap } from "../../dataTypes";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";
import VALIDATION_QUERY from "./OTValidationQuery.gql";

const useStyles = makeStyles(theme => ({
Expand Down Expand Up @@ -70,6 +70,7 @@ const getColumns = classes => [
{
id: "biomarkerList",
label: "Cell line biomarkers",
enableHiding: false,
renderCell: row => (
<ChipList
small
Expand Down
4 changes: 3 additions & 1 deletion packages/sections/src/evidence/Orphanet/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "ui";

import { definition } from ".";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";
import { epmcUrl } from "../../utils/urls";
import Description from "./Description";
import { dataTypesMap } from "../../dataTypes";
Expand All @@ -23,6 +23,7 @@ const getColumns = label => [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand Down Expand Up @@ -55,6 +56,7 @@ const getColumns = label => [
{
id: "variantFunctionalConsequence",
label: "Functional consequence",
enableHiding: false,
renderCell: ({ variantFunctionalConsequence }) =>
variantFunctionalConsequence ? (
<Link
Expand Down
4 changes: 3 additions & 1 deletion packages/sections/src/evidence/Progeny/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import Description from "./Description";
import PROGENY_QUERY from "./sectionQuery.gql";
import { dataTypesMap } from "../../dataTypes";
import { sentenceCase } from "../../utils/global";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";

const reactomeUrl = id => `https://identifiers.org/reactome:${id}`;

const columns = [
{
id: "disease",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand All @@ -37,6 +38,7 @@ const columns = [
{
id: "pathwayName",
label: "Significant pathway",
enableHiding: false,
renderCell: ({ pathways }) =>
pathways?.length >= 1 ? (
<Link external to={reactomeUrl(pathways[0].id)}>
Expand Down
1 change: 1 addition & 0 deletions packages/sections/src/evidence/Reactome/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const getColumns = label => [
{
id: "reactionId",
label: "Reaction",
enableHiding: false,
renderCell: ({ reactionName, reactionId }) => (
<Link external to={`https://identifiers.org/reactome/${reactionId}`}>
<EllsWrapper>{reactionName}</EllsWrapper>
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/SlapEnrich/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Description from "./Description";
import { dataTypesMap } from "../../dataTypes";
import SLAPENRICH_QUERY from "./sectionQuery.gql";
import { sentenceCase } from "../../utils/global";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";

const reactomeUrl = id => `https://identifiers.org/reactome:${id}`;

Expand Down Expand Up @@ -37,6 +37,7 @@ const columns = [
{
id: "pathwayName",
label: "Significant pathway",
enableHiding: false,
renderCell: ({ pathways }) =>
pathways?.length >= 1 ? (
<Link external to={reactomeUrl(pathways[0].id)}>
Expand Down
3 changes: 2 additions & 1 deletion packages/sections/src/evidence/SysBio/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Description from "./Description";
import { epmcUrl } from "../../utils/urls";
import SYSBIO_QUERY from "./sectionQuery.gql";
import { dataTypesMap } from "../../dataTypes";
import { defaultRowsPerPageOptions, naLabel, sectionsBaseSizeQuery } from "../../constants";
import { naLabel, sectionsBaseSizeQuery } from "../../constants";

const getColumns = label => [
{
Expand All @@ -18,6 +18,7 @@ const getColumns = label => [
{
id: "pathwayName",
label: "Gene set",
enableHiding: false,
renderCell: ({ pathways, studyOverview }) => {
if (pathways && pathways.length >= 1 && studyOverview) {
return (
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/UniProtLiterature/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const getcolumns = label => [
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand All @@ -35,6 +36,7 @@ const getcolumns = label => [
{
id: "targetFromSourceId",
label: "Reported protein",
enableHiding: false,
renderCell: ({ targetFromSourceId }) => (
<Link external to={identifiersOrgLink("uniprot", targetFromSourceId)}>
{targetFromSourceId}
Expand Down
2 changes: 2 additions & 0 deletions packages/sections/src/evidence/UniProtVariants/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function getColumns(label) {
{
id: "disease.name",
label: "Disease/phenotype",
enableHiding: false,
renderCell: ({ disease, diseaseFromSource }) => (
<Tooltip
title={
Expand Down Expand Up @@ -58,6 +59,7 @@ function getColumns(label) {
{
id: "variantId",
label: "Variant",
enableHiding: false,
sortable: true,
comparator: nullishComparator(variantComparator(), d => d?.variant),
filterValue: ({ variant: v }) =>
Expand Down
Loading
Loading