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 opening .jbrowse files on desktop #4590

Merged
merged 1 commit into from
Sep 25, 2024
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
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export default tseslint.config(
'unicorn/prefer-string-replace-all': 'off',
'unicorn/no-array-reduce': 'off',

'@typescript-eslint/no-deprecated': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const OldHydrate = observer(function OldHydrate(props: Props) {
function doHydrate() {
if (domNode && html) {
if (domNode.innerHTML) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
unmountComponentAtNode(domNode)
}

Expand All @@ -81,15 +80,13 @@ const OldHydrate = observer(function OldHydrate(props: Props) {
// hydration for when we have some free time. helps keep the
// framerate up.
rIC(() => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
hydrate(<RenderingComponent {...props} />, domNode)
})
}
}
doHydrate()
return () => {
if (domNode) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
unmountComponentAtNode(domNode)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ const OldHydrate = observer(function ({
const domNode = ref.current
function doHydrate() {
if (domNode) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
unmountComponentAtNode(domNode)
domNode.innerHTML = html

rIC(() => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
hydrate(
<ThemeProvider theme={jbrowseTheme}>
<RenderingComponent {...rest} />
Expand All @@ -102,7 +100,6 @@ const OldHydrate = observer(function ({

return () => {
if (domNode) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
unmountComponentAtNode(domNode)
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,6 @@ export function renderToStaticMarkup(
if (createRootFn) {
createRootFn(div).render(node)
} else {
// eslint-disable-next-line @typescript-eslint/no-deprecated
render(node, div)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default function AutocompleteTextField({
setInputValue: (arg: string) => void
setCurrentSearch: (arg: string) => void
}) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
const { helperText, InputProps = {} } = TextFieldProps
return (
<TextField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function recordStats(event, context, done) {
stats.referer = headers.Referer || headers.referer || null
stats.acceptLanguage = headers['Accept-Language'] || null
stats.acceptCharset = headers['Accept-Charset'] || null
// eslint-disable-next-line @typescript-eslint/no-deprecated

stats.host = stats.referer ? url_parser.parse(stats.referer).host : null
if (stats.host?.startsWith('www.')) {
stats.host = stats.host.slice(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,17 @@ export default function RecentSessionPanel({
value="quickstart"
title="Add sessions to quickstart list"
disabled={!selectedSessions?.length}
onClick={() => addToQuickstartList(selectedSessions || [])}
onClick={() => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
;(async () => {
try {
await addToQuickstartList(selectedSessions || [])
} catch (e) {
setError(e)
console.error(e)
}
})()
}}
>
<PlaylistAddIcon />
</ToggleButtonWithTooltip>
Expand Down Expand Up @@ -196,7 +206,8 @@ export default function RecentSessionPanel({
try {
const file = target.files?.[0]
if (file) {
const path = (file as File & { path: string }).path
const { webUtils } = window.require('electron')
const path = webUtils.getPathForFile(file)
setPluginManager(await loadPluginManager(path))
}
} catch (e) {
Expand Down
Loading
Loading