Skip to content

Commit

Permalink
PORTALS-3358: add an On Synapse link
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Dec 9, 2024
1 parent 9d046a4 commit 050a250
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
6 changes: 4 additions & 2 deletions apps/portals/arkportal/src/config/synapseConfigs/datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export const datasetSchema: GenericCardSchema = {
title: 'name',
subTitle: 'program',
description: 'description',
secondaryLabels: ['project', 'assay', 'datasetType'],
secondaryLabels: ['project', 'assay', 'datasetType', 'id'],
icon: 'datasetType',
}

export const datasetColumnAliases: Record<string, string> = {
id: 'On Synapse',
}
export const datasetCardConfiguration: CardConfiguration = {
type: SynapseConstants.GENERIC_CARD,
genericCardSchema: datasetSchema,
Expand Down
7 changes: 6 additions & 1 deletion apps/portals/arkportal/src/pages/DatasetDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import {
} from 'synapse-react-client'
import columnAliases from '../config/columnAliases'
import { datasetsSql } from '../config/resources'
import { datasetCardConfiguration } from '../config/synapseConfigs/datasets'
import {
datasetCardConfiguration,
datasetColumnAliases,
} from '../config/synapseConfigs/datasets'

export function DatasetDetailsPage() {
const searchParams = useGetPortalComponentSearchParams()
Expand All @@ -23,6 +26,8 @@ export function DatasetDetailsPage() {
sql={datasetsSql}
isHeader
searchParams={searchParams}
columnAliases={datasetColumnAliases}
secondaryLabelLimit={4}
/>
<DetailsPage
sql={datasetsSql}
Expand Down
7 changes: 6 additions & 1 deletion apps/portals/arkportal/src/pages/ProgramDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { DetailsPageContextConsumer } from '@sage-bionetworks/synapse-portal-fra
import DetailsPage from '@sage-bionetworks/synapse-portal-framework/components/DetailsPage/index'
import { useGetPortalComponentSearchParams } from '@sage-bionetworks/synapse-portal-framework/utils/UseGetPortalComponentSearchParams'
import React from 'react'
import { datasetCardConfiguration } from 'src/config/synapseConfigs/datasets'
import {
datasetCardConfiguration,
datasetColumnAliases,
} from 'src/config/synapseConfigs/datasets'
import { CardContainerLogic } from 'synapse-react-client'
import columnAliases from '../config/columnAliases'
import { datasetsSql, programSql, projectsSql } from '../config/resources'
Expand Down Expand Up @@ -60,6 +63,8 @@ export function ProgramsDetailPage() {
{...datasetCardConfiguration}
sql={datasetsSql}
searchParams={{ program: value! }}
columnAliases={datasetColumnAliases}
secondaryLabelLimit={4}
/>
)}
</DetailsPageContextConsumer>
Expand Down
7 changes: 6 additions & 1 deletion apps/portals/arkportal/src/pages/ProjectDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import React from 'react'
import { CardContainerLogic } from 'synapse-react-client'
import columnAliases from '../config/columnAliases'
import { datasetsSql, projectsSql } from '../config/resources'
import { datasetCardConfiguration } from '../config/synapseConfigs/datasets'
import {
datasetCardConfiguration,
datasetColumnAliases,
} from '../config/synapseConfigs/datasets'
import {
projectsCardConfiguration,
projectSchema,
Expand Down Expand Up @@ -45,6 +48,8 @@ export function ProjectDetailsPage() {
{...datasetCardConfiguration}
sql={datasetsSql}
searchParams={{ project: value! }}
columnAliases={datasetColumnAliases}
secondaryLabelLimit={4}
/>
)}
</DetailsPageContextConsumer>
Expand Down

0 comments on commit 050a250

Please sign in to comment.