Skip to content

Commit

Permalink
Undo some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfisher72 committed Dec 11, 2024
1 parent a02e372 commit 4329553
Show file tree
Hide file tree
Showing 10 changed files with 330 additions and 335 deletions.
8 changes: 4 additions & 4 deletions screen2.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"next": "14.2.13",
"only": "^0.0.2",
"queryz": "^0.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"semantic-ui-react": "^2.1.5",
"server": "^1.0.41",
Expand All @@ -74,8 +74,8 @@
"@graphql-codegen/client-preset": "^4.3.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@types/node": "^22",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"eslint": "9.13.0",
"eslint-config-next": "15.0.1",
"eslint-plugin-react": "^7.37.2",
Expand Down
13 changes: 10 additions & 3 deletions screen2.0/src/app/_barPlot/BarPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { AxisTop } from '@visx/axis';
import { Group } from '@visx/group';
import { Text } from '@visx/text';
import { useParentSize } from '@visx/responsive';
import { defaultStyles as defaultTooltipStyles, useTooltip, TooltipWithBounds, Portal } from '@visx/tooltip';
import { defaultStyles as defaultTooltipStyles, useTooltip, TooltipWithBounds, Portal as VisxPortal } from '@visx/tooltip';
import { PortalProps } from '@visx/tooltip/lib/Portal';
import { CircularProgress } from '@mui/material';

const fontFamily = "Roboto,Helvetica,Arial,sans-serif"
Expand Down Expand Up @@ -39,6 +40,12 @@ const VerticalBarPlot = <T,>({
const requestRef = useRef<number | null>(null);
const tooltipDataRef = useRef<{ top: number; left: number; data: BarData<T> } | null>(null);

/**
* Hacky workaround for complex type compatability issues. Hopefully this will fix itself when ugrading to React 19 - Jonathan 12/11/24
* @todo remove this when possible
*/
const Portal = VisxPortal as unknown as React.FC<PortalProps>;

const handleMouseMove = useCallback((event: React.MouseEvent, barData: BarData<T>) => {
tooltipDataRef.current = {
top: event.pageY,
Expand Down Expand Up @@ -199,7 +206,7 @@ const VerticalBarPlot = <T,>({
</div>
}
{/* Maybe should provide a default tooltip */}
{/* {TooltipContents && tooltipOpen && (
{TooltipContents && tooltipOpen && (
<Portal>
<TooltipWithBounds
top={tooltipTop}
Expand All @@ -209,7 +216,7 @@ const VerticalBarPlot = <T,>({
<TooltipContents {...tooltipData} />
</TooltipWithBounds>
</Portal>
)} */}
)}
</div>
);
};
Expand Down
569 changes: 283 additions & 286 deletions screen2.0/src/app/_scatterPlot/scatterPlot.tsx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion screen2.0/src/app/_utility/GeneLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const GET_GENE_COORDS = gql(`
}
`)

const GeneLink = ({ geneName, assembly, typographyProps }: GeneLinkProps): React.JSX.Element => {
const GeneLink = ({ geneName, assembly, typographyProps }: GeneLinkProps) => {
const [open, setOpen] = useState<boolean>(false)

const handleClose = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export const EnrichmentLollipopPlot = (props: EnrichmentLollipopPlot) => {
const [search, setSearch] = useState<string>("")
const [downloadOpen, setDownloadOpen] = useState(false)

//Super hacky but works?
/**
* Hacky workaround for complex type compatability issues. Hopefully this will fix itself when ugrading to React 19 - Jonathan 12/11/24
* @todo remove this when possible
*/
const Portal = VisxPortal as unknown as React.FC<PortalProps>;

const { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip } = useTooltip<TransformedEnrichmentData>();
Expand Down
2 changes: 1 addition & 1 deletion screen2.0/src/app/applets/gwas/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Accordion, AccordionDetails, AccordionSummary, IconButton, Paper, Stack, Tooltip, Typography, useMediaQuery, useTheme } from "@mui/material"
import React, { useState, useMemo } from "react"
import { DataTable, DataTableColumn } from "@weng-lab/psychscreen-ui-components"
import { CreateLink, createLink, LoadingMessage } from "../../../common/lib/utility"
import { createLink, LoadingMessage } from "../../../common/lib/utility"
import Grid from "@mui/material/Grid2"
import { CircularProgress } from "@mui/material"
import ExpandMoreIcon from "@mui/icons-material/ExpandMore"
Expand Down
2 changes: 1 addition & 1 deletion screen2.0/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<body className={inter.className} id="page-container">
<ApolloWrapper> {/* Wrapper for Apollo Requests, exposes client to child components */}
<AppRouterCacheProvider> {/* Wrapper for MUIxNextjs integration, see https://mui.com/material-ui/integrations/nextjs/ */}
<CssBaseline /> {/* See https://mui.com/material-ui/react-css-baseline/ */}
<CssBaseline /> {/* See https://mui.com/material-ui/react-css-baseline/ */}
<ThemeProvider theme={theme}> {/* Exposes theme to children */}
<div id="content-wrapper">
<ResponsiveAppBar />
Expand Down
2 changes: 1 addition & 1 deletion screen2.0/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function Home() {
xs: 12,
lg: 6
}}>
<Image src={homeImage} alt={"SCREEN home image"} style={{width: '100%', maxWidth: '685px', height: 'auto'}} />
<Image priority src={homeImage} alt={"SCREEN home image"} style={{width: '100%', maxWidth: '685px', height: 'auto'}} />
</Grid>
</Grid>
</main>
Expand Down
4 changes: 0 additions & 4 deletions screen2.0/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
"incremental": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
// "typeRoots": [
// "./types",
// "./node_modules/@types"
// ],
"noFallthroughCasesInSwitch": true,
"noImplicitAny": false,
"plugins": [
Expand Down
58 changes: 25 additions & 33 deletions screen2.0/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2686,12 +2686,12 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:18.2.0":
version: 18.2.0
resolution: "@types/react-dom@npm:18.2.0"
dependencies:
"@types/react": "npm:*"
checksum: 10/90f026936e3ea1658b0f9597e522d7e88abd3f107c830f238774cd7eb9387cff5ea322e62459b4a3dffc97359df5c2cfd3e4b36cb221a369fc24a1c6684ff993
"@types/react-dom@npm:^18.3.1":
version: 18.3.5
resolution: "@types/react-dom@npm:18.3.5"
peerDependencies:
"@types/react": ^18.0.0
checksum: 10/02095b326f373867498e0eb2b5ebb60f9bd9535db0d757ea13504c4b7d75e16605cf1d43ce7a2e67893d177b51db4357cabb2842fb4257c49427d02da1a14e09
languageName: node
linkType: hard

Expand All @@ -2713,21 +2713,13 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:18.2.0":
version: 18.2.0
resolution: "@types/react@npm:18.2.0"
"@types/react@npm:^18.3.1":
version: 18.3.16
resolution: "@types/react@npm:18.3.16"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 10/c5fe6b798ab0d4ba2c40173275fb7f1e85a67586d40c97b0bee25a514f44de032e7aa90a98482cc38e106e66102727cdf1be9a8413d29509b92cb384adf4864d
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.23.0
resolution: "@types/scheduler@npm:0.23.0"
checksum: 10/874d753aa65c17760dfc460a91e6df24009bde37bfd427a031577b30262f7770c1b8f71a21366c7dbc76111967384cf4090a31d65315155180ef14bd7acccb32
checksum: 10/971b4f46af9aeda85326000ba4a78973db6a1f11e10665c014e1274a68ae801469f057b56d850512694cf04a69cc264c07e6a507b4613874e8bf6ab4df7904f1
languageName: node
linkType: hard

Expand Down Expand Up @@ -9521,15 +9513,15 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:18.2.0":
version: 18.2.0
resolution: "react-dom@npm:18.2.0"
"react-dom@npm:^18.3.1":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
scheduler: "npm:^0.23.0"
scheduler: "npm:^0.23.2"
peerDependencies:
react: ^18.2.0
checksum: 10/ca5e7762ec8c17a472a3605b6f111895c9f87ac7d43a610ab7024f68cd833d08eda0625ce02ec7178cc1f3c957cf0b9273cdc17aa2cd02da87544331c43b1d21
react: ^18.3.1
checksum: 10/3f4b73a3aa083091173b29812b10394dd06f4ac06aff410b74702cfb3aa29d7b0ced208aab92d5272919b612e5cda21aeb1d54191848cf6e46e9e354f3541f81
languageName: node
linkType: hard

Expand Down Expand Up @@ -9615,12 +9607,12 @@ __metadata:
languageName: node
linkType: hard

"react@npm:18.2.0":
version: 18.2.0
resolution: "react@npm:18.2.0"
"react@npm:^18.3.1":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10/b9214a9bd79e99d08de55f8bef2b7fc8c39630be97c4e29d7be173d14a9a10670b5325e94485f74cd8bff4966ef3c78ee53c79a7b0b9b70cba20aa8973acc694
checksum: 10/261137d3f3993eaa2368a83110466fc0e558bc2c7f7ae7ca52d94f03aac945f45146bd85e5f481044db1758a1dbb57879e2fcdd33924e2dde1bdc550ce73f7bf
languageName: node
linkType: hard

Expand Down Expand Up @@ -10010,7 +10002,7 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.0":
"scheduler@npm:^0.23.2":
version: 0.23.2
resolution: "scheduler@npm:0.23.2"
dependencies:
Expand Down Expand Up @@ -10050,8 +10042,8 @@ __metadata:
"@mui/material-nextjs": "npm:^6.1.5"
"@parcel/watcher": "npm:^2.4.1"
"@types/node": "npm:^22"
"@types/react": "npm:18.2.0"
"@types/react-dom": "npm:18.2.0"
"@types/react": "npm:^18.3.1"
"@types/react-dom": "npm:^18.3.1"
"@visx/visx": "npm:^3.12.0"
"@weng-lab/psychscreen-ui-components": "npm:^2.0.8"
"@weng-lab/ts-ztable": "npm:^4.0.1"
Expand All @@ -10070,8 +10062,8 @@ __metadata:
only: "npm:^0.0.2"
prettier: "npm:^3.3.3"
queryz: "npm:^0.0.3"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-dropzone: "npm:^14.2.3"
semantic-ui-react: "npm:^2.1.5"
server: "npm:^1.0.41"
Expand Down

0 comments on commit 4329553

Please sign in to comment.