Skip to content

Commit

Permalink
Merge branch 'main' into SWC-7168
Browse files Browse the repository at this point in the history
  • Loading branch information
lakikowolfe authored Jan 16, 2025
2 parents 124d089 + b37d1df commit 54fb819
Show file tree
Hide file tree
Showing 137 changed files with 4,997 additions and 7,195 deletions.
2 changes: 1 addition & 1 deletion apps/SageAccountWeb/src/components/RegisterAccount2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export const RegisterAccount2 = (props: RegisterAccount2Props) => {
<Typography variant="smallText1" sx={{ marginTop: '20px' }}>
Your <strong>password</strong> needs to be at least 8 letters. We
recommend using a strong, unique <strong>password</strong> of
between 16-32 characters. You can use letters, numbers, and
between 8-32 characters. You can use letters, numbers, and
punctuation marks.
</Typography>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/SageAccountWeb/src/components/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const SetPasswordInstructions = (
<Typography variant="headline2">{props.title}</Typography>
<Typography variant="smallText1">
We recommend using a strong, unique <strong>password</strong> of between
16-32 characters. A valid password must be at least 8 characters long and
8-32 characters. A valid password must be at least 8 characters long and
must include letters, digits (0-9), and special characters
~!@#$%^&*_-+=`|\(){}[]:;&quot;&apos;&lt;&gt;,.?/
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion apps/portals-e2e/src/explore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const getFacetFilterControls = (page: Page) => {
const getAvailableFacetsDiv = (page: Page) => {
return getFacetFilterControlsPanel(page)
.locator('> div')
.filter({ hasText: 'Available Facets' })
.filter({ hasText: 'Available Filters' })
}

const countVisibleElements = async (allCells: Locator) => {
Expand Down
4 changes: 2 additions & 2 deletions apps/portals/adknowledgeportal/src/config/resources.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const computationalSql = 'Select * from syn20337467'
export const dataSql = 'SELECT * FROM syn11346063.66'
export const dataSql = 'SELECT * FROM syn11346063.67'
export const dataOnStudiesPageSql =
"SELECT id, name, metadataType, dataType, assay FROM syn11346063.66 WHERE `resourceType` = 'metadata'"
"SELECT id, name, metadataType, dataType, assay FROM syn11346063.67 WHERE `resourceType` = 'metadata'"
export const peopleSql = 'SELECT * FROM syn13897207'
export const projectsSql = 'SELECT * FROM syn17024229 ORDER BY isFeatured DESC'
export const publicationsSql = 'SELECT * FROM syn20448807'
Expand Down
1 change: 1 addition & 0 deletions apps/portals/cancercomplexity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"dependencies": {
"@sage-bionetworks/synapse-types": "workspace:*",
"@mui/material": "^5.15.13",
"katex": "^0.16.10",
"@sage-bionetworks/synapse-portal-framework": "workspace:*",
"react": "^18.2.0",
Expand Down
5 changes: 5 additions & 0 deletions apps/portals/cancercomplexity/src/config/routesConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
onIndividualThemeBarPlotPointClick,
onPointClick,
} from './synapseConfigs/onPointClick'
import { searchPageChildRoutes } from 'src/pages/CCKPSearchPage'

const routes: RouteObject[] = [
{
Expand Down Expand Up @@ -235,6 +236,10 @@ const routes: RouteObject[] = [
path: 'MC2Supplement',
element: <MC2Supplement />,
},
{
path: 'Search',
children: searchPageChildRoutes,
},
],
},
]
Expand Down
157 changes: 157 additions & 0 deletions apps/portals/cancercomplexity/src/pages/CCKPSearchPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
import {
PortalSearchTabConfig,
PortalSearchTabs,
} from '@sage-bionetworks/synapse-portal-framework/components/PortalSearch/PortalSearchTabs'
import { PortalFullTextSearchField } from '@sage-bionetworks/synapse-portal-framework/components/PortalSearch/PortalFullTextSearchField'
import { SearchParamAwareStandaloneQueryWrapper } from '@sage-bionetworks/synapse-portal-framework/components/PortalSearch/SearchParamAwareStandaloneQueryWrapper'
import { Box } from '@mui/material'
import RedirectWithQuery from '@sage-bionetworks/synapse-portal-framework/components/RedirectWithQuery'
import { Outlet, RouteObject } from 'react-router-dom'
import cckpConfigs from 'src/config/synapseConfigs'
import { QueryResultBundle } from '@sage-bionetworks/synapse-types'
import { useState } from 'react'
export const searchPageTabs: PortalSearchTabConfig[] = [
{
title: 'Grants',
path: 'Grants',
},
{
title: 'People',
path: 'People',
},
{
title: 'Publications',
path: 'Publications',
},
{
title: 'Datasets',
path: 'Datasets',
},
{
title: 'Tools',
path: 'Tools',
},
{
title: 'Educational Resources',
path: 'EducationalResources',
},
]

export const searchPageChildRoutes: RouteObject[] = [
{
index: true,
element: <RedirectWithQuery to={searchPageTabs[0].path} />,
},
{
path: searchPageTabs[0].path,
element: <CCKPSearchPage selectedTabIndex={0} />,
},
{
path: searchPageTabs[1].path,
element: <CCKPSearchPage selectedTabIndex={1} />,
},
{
path: searchPageTabs[2].path,
element: <CCKPSearchPage selectedTabIndex={2} />,
},
{
path: searchPageTabs[3].path,
element: <CCKPSearchPage selectedTabIndex={3} />,
},
{
path: searchPageTabs[4].path,
element: <CCKPSearchPage selectedTabIndex={4} />,
},
{
path: searchPageTabs[5].path,
element: <CCKPSearchPage selectedTabIndex={5} />,
},
]

export type CCKPSearchPageProps = {
selectedTabIndex: number
}

function getQueryCount(queryResultBundleJSON: string) {
const queryResultBundle = JSON.parse(
queryResultBundleJSON,
) as QueryResultBundle
const { queryCount } = queryResultBundle
return queryCount
}

export function CCKPSearchPage(props: CCKPSearchPageProps) {
const { selectedTabIndex } = props
const { datasets, education, grants, people, publications, tools } =
cckpConfigs
const [searchPageTabsState, setSearchPageTabsState] =
useState<PortalSearchTabConfig[]>(searchPageTabs)
// on search field value update, update the special search parameter FTS_SEARCH_TERM, which the QueryWrapperPlotNav will load as the search term
return (
<Box sx={{ p: { xs: '10px', lg: '50px' } }}>
<PortalFullTextSearchField />
<PortalSearchTabs tabConfig={searchPageTabsState} />
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 0}
standaloneQueryWrapperProps={{
...grants,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[0].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 1}
standaloneQueryWrapperProps={{
...people,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[1].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 2}
standaloneQueryWrapperProps={{
...publications,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[2].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 3}
standaloneQueryWrapperProps={{
...datasets,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[3].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 4}
standaloneQueryWrapperProps={{
...tools,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[4].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<SearchParamAwareStandaloneQueryWrapper
isVisible={selectedTabIndex == 5}
standaloneQueryWrapperProps={{
...education,
onQueryResultBundleChange: newQueryResultBundleJSON => {
searchPageTabs[5].count = getQueryCount(newQueryResultBundleJSON)
setSearchPageTabsState([...searchPageTabs])
},
}}
/>
<Outlet />
</Box>
)
}
2 changes: 2 additions & 0 deletions apps/portals/elportal/src/config/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const cohortBuilderFilesSql = 'SELECT * FROM syn52234677'
export const partnersSql =
'SELECT * FROM syn62661043 order by organizationName desc'
export const whatWeDoSql = 'SELECT * FROM syn64130706'
export const featuredResearchSql =
'SELECT * FROM syn64542019 ORDER BY order ASC'

export const defaultSearchConfiguration = {
fullTextSearchHelpURL: 'https://help.eliteportal.org/help/search-tips',
Expand Down
45 changes: 35 additions & 10 deletions apps/portals/elportal/src/config/routesConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,43 @@ const routes: RouteObject[] = [
{
path: 'Data Access',
element: (
<SectionLayout title={'Data Access'}>
<>
<SectionLayout title={'Data Access'}>
<Markdown
ownerId="syn27229419"
wikiId="621276"
loadingSkeletonRowCount={10}
/>
</SectionLayout>
<SectionLayout title={'ADAMTS7'}>
<Markdown
ownerId="syn27229419"
wikiId="622372"
loadingSkeletonRowCount={10}
/>
</SectionLayout>
<SectionLayout title={'ELPSCRNA'}>
<Markdown
ownerId="syn27229419"
wikiId="622485"
loadingSkeletonRowCount={10}
/>
</SectionLayout>
{/* <SectionLayout title={'Aging PheWAS'}>
<Markdown
ownerId="syn27229419"
wikiId="621276"
loadingSkeletonRowCount={10}
/>
<Markdown
ownerId="syn27229419"
wikiId="622372"
loadingSkeletonRowCount={10}
/>
ownerId="syn27229419"
wikiId="622480"
loadingSkeletonRowCount={10}
/>
</SectionLayout>
<SectionLayout title={'LLFS'}>
<Markdown
ownerId="syn27229419"
wikiId="622486"
loadingSkeletonRowCount={10}
/>
</SectionLayout> */}
</>
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export const filesViewQueryWrapperPlotNavProps: QueryWrapperPlotNavProps = {
additionalFiltersSessionStorageKey: 'cohort-builder-files-perspective',
tableConfiguration: {
showAccessColumn: true,
showAccessColumnHeader: true,
showDownloadColumn: true,
columnLinks: [
{
Expand Down
8 changes: 7 additions & 1 deletion apps/portals/elportal/src/pages/HomePageV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import {
RecentPublicationsGrid,
ImageCardGridWithLinks,
PortalFeatureHighlights,
FeaturedResearch,
} from 'synapse-react-client'
import ELContributeYourData from '@sage-bionetworks/synapse-portal-framework/components/elportal/ELContributeYourData'
import ELGettingStarted from '@sage-bionetworks/synapse-portal-framework/components/elportal/ELGettingStarted'
import { topPublicationsSql, whatWeDoSql } from '../config/resources'
import {
topPublicationsSql,
whatWeDoSql,
featuredResearchSql,
} from '../config/resources'
import { Link, Typography } from '@mui/material'
import analyzetheclouds from '../assets/analyzetheclouds.png'
import computationaltools from '../assets/computationaltools.png'
Expand Down Expand Up @@ -45,6 +50,7 @@ export default function HomePage() {
title="What We Do"
summaryText="We provide multi-omic datasets, software tools, and publications that empower researchers to discover the latest health-promoting therapeutics."
/>
<FeaturedResearch sql={featuredResearchSql} />
{/* Commented out for release (see EC-485) */}
{/*<div className={'home-bg-dark'}>*/}
{/*<SectionLayout*/}
Expand Down
Loading

0 comments on commit 54fb819

Please sign in to comment.