Skip to content

Commit

Permalink
Auto-fill issue and email forms cc @garrettjstevens
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 30, 2024
1 parent 6f7d995 commit d6d63ca
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
54 changes: 33 additions & 21 deletions packages/core/ui/ErrorMessageStackTraceDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,31 +127,43 @@ export default function ErrorMessageStackTraceDialog({
// @ts-expect-error add version info at bottom if we are in jbrowse-web
window.JBrowseSession ? `JBrowse ${window.JBrowseSession.version}` : '',
].join('\n')

const err = encodeURIComponent(
'I got this error from JBrowse, here is the stack trace:\n\n```\n' +
errorBoxText +
'\n```\n',
)
const githubLink = `https://github.com/GMOD/jbrowse-components/issues/new?labels=bug&title=JBrowse+issue&body=${err}`
const emailLink = `mailto:jbrowse2dev@gmail.com?subject=JBrowse%202%20error&body=${err}`
return (
<Dialog open onClose={onClose} title="Stack trace" maxWidth="xl">
<DialogContent>
<Typography>
Post a new issue with this stack trace at{' '}
<Link href="https://github.com/GMOD/jbrowse-components/issues/new/choose">
GitHub
</Link>{' '}
or send an email to{' '}
<Link href="mailto:jbrowse2dev@gmail.com">jbrowse2dev@gmail.com</Link>{' '}
</Typography>
{mappedStackTrace !== undefined ? (
<pre
style={{
background: 'lightgrey',
border: '1px solid black',
overflow: 'auto',
margin: 20,
maxHeight: 300,
}}
>
{errorBoxText}
</pre>
{mappedStackTrace === undefined ? (
<LoadingEllipses variant="h6" />
) : (
<LoadingEllipses />
<>
<Typography>
Post a new issue at{' '}
<Link href={githubLink} target="_blank">
GitHub
</Link>{' '}
or send an email to{' '}
<Link href={emailLink} target="_blank">
jbrowse2dev@gmail.com
</Link>{' '}
</Typography>
<pre
style={{
background: 'lightgrey',
border: '1px solid black',
overflow: 'auto',
margin: 20,
maxHeight: 300,
}}
>
{errorBoxText}
</pre>
</>
)}
</DialogContent>
<DialogActions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const LinearGenomeView = observer(({ model }: { model: LGV }) => {
const ref = useRef<HTMLDivElement>(null)
const session = getSession(model)
const { classes } = useStyles()

throw new Error('wtf')
useEffect(() => {
// sets the focused view id based on a click within the LGV;
// necessary for subviews to be focused properly
Expand Down

0 comments on commit d6d63ca

Please sign in to comment.