-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mvp-2.1.0' of https://github.com/CBIIT/crdc-datahub-ui …
…into CRDCDH-852
- Loading branch information
Showing
15 changed files
with
408 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test Changes | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: "*" | ||
paths: | ||
- "src/**" | ||
- "public/**" | ||
- "*.json" | ||
- "*.js" | ||
- "*.jsx" | ||
- "*.ts" | ||
- "*.tsx" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Test Changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "npm" | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-modules- | ||
- name: Install Dependencies | ||
run: npm install --legacy-peer-deps | ||
|
||
- name: Run Jest | ||
run: npm run test:ci | ||
|
||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React, { ElementType, FC } from 'react'; | ||
import { Typography, styled } from '@mui/material'; | ||
import Tooltip from '../Tooltip'; | ||
import { formatFullStudyName } from '../../utils'; | ||
|
||
type Props = { | ||
_id: Organization["_id"]; | ||
studies: Organization["studies"]; | ||
}; | ||
|
||
const StyledStudyCount = styled(Typography)<{ component: ElementType }>(({ theme }) => ({ | ||
textDecoration: "underline", | ||
cursor: "pointer", | ||
color: theme.palette.primary.main, | ||
})); | ||
|
||
const TooltipBody: FC<Props> = ({ _id, studies }) => ( | ||
<Typography variant="body1"> | ||
{studies?.map(({ studyName, studyAbbreviation }) => ( | ||
<React.Fragment key={`${_id}_study_${studyName}`}> | ||
{formatFullStudyName(studyName, studyAbbreviation)} | ||
<br /> | ||
</React.Fragment> | ||
))} | ||
</Typography> | ||
); | ||
|
||
/** | ||
* Organization list view tooltip for studies | ||
* | ||
* @param Props | ||
* @returns {React.FC} | ||
*/ | ||
const StudyTooltip: FC<Props> = ({ _id, studies }) => ( | ||
<Tooltip | ||
title={<TooltipBody _id={_id} studies={studies} />} | ||
placement="top" | ||
open={undefined} | ||
onBlur={undefined} | ||
disableHoverListener={false} | ||
arrow | ||
> | ||
<StyledStudyCount variant="body2" component="span"> | ||
other | ||
{" "} | ||
{studies.length - 1} | ||
</StyledStudyCount> | ||
</Tooltip> | ||
); | ||
|
||
export default StudyTooltip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.