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

Fix trackhub registry failing to load in 2.x.y versions of jbrowse #3214

Merged
merged 1 commit into from
Sep 23, 2022
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
3 changes: 2 additions & 1 deletion plugins/trackhub-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"mobx-react": "^7.0.0",
"mobx-state-tree": "^5.0.0",
"prop-types": "^15.0.0",
"react": ">=16.8.0"
"react": ">=16.8.0",
"tss-react": "^3.0.0"
},
"private": true,
"distModule": "esm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions plugins/trackhub-registry/src/trackhub-registry/SelectBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import FormHelperText from '@mui/material/FormHelperText'
import InputLabel from '@mui/material/InputLabel'
import MenuItem from '@mui/material/MenuItem'
import Select from '@mui/material/Select'
import { makeStyles } from '@mui/material/styles'
import { makeStyles } from 'tss-react/mui'
import PropTypes from 'prop-types'
import React from 'react'

const useStyles = makeStyles(theme => ({
const useStyles = makeStyles()(theme => ({
formControl: {
minWidth: 192,
marginLeft: theme.spacing(2),
Expand All @@ -22,7 +22,7 @@ function SelectBox({
label,
helpText,
}) {
const classes = useStyles()
const { classes } = useStyles()
return (
<FormControl className={classes.formControl}>
<InputLabel>{label}</InputLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
RadioGroup,
Tooltip,
Typography,
makeStyles,
} from '@mui/material'
import { makeStyles } from 'tss-react/mui'
import { isAbortException } from '@jbrowse/core/util'
import SanitizedHTML from '@jbrowse/core/ui/SanitizedHTML'
import PropTypes from 'prop-types'
Expand All @@ -37,7 +37,7 @@ function Wire({ children, ...props }) {
return children(props)
}

const useStyles = makeStyles(theme => ({
const useStyles = makeStyles()(theme => ({
hubList: {
maxHeight: 400,
overflowY: 'auto',
Expand All @@ -55,7 +55,7 @@ function TrackHubRegistrySelect({ model, setModelReady }) {
const [hubs, setHubs] = useState(new Map())
const [allHubsRetrieved, setAllHubsRetrieved] = useState(false)
const [selectedHub, setSelectedHub] = useState('')
const classes = useStyles()
const { classes } = useStyles()

useEffect(() => {
if (selectedHub) {
Expand Down Expand Up @@ -262,9 +262,7 @@ function TrackHubRegistrySelect({ model, setModelReady }) {
return <div>{renderItems}</div>
}

const speciesList = Object.keys(assemblies)
.sort()
.filter(item => item.toLowerCase().includes('sapiens'))
const speciesList = Object.keys(assemblies).sort()

renderItems.push(
<SelectBox
Expand Down