Skip to content

Commit

Permalink
Assembly display names
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 4, 2025
1 parent 2f6010f commit 3bdfb9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/app-core/src/ui/App/ViewContainerTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import EditableTypography from '@jbrowse/core/ui/EditableTypography'
import { getSession } from '@jbrowse/core/util'
import { Tooltip } from '@mui/material'
import { observer } from 'mobx-react'
import { makeStyles } from 'tss-react/mui'
Expand Down Expand Up @@ -29,13 +30,14 @@ const ViewContainerTitle = observer(function ({
view: IBaseViewModel
}) {
const { classes } = useStyles()
const { assemblyManager } = getSession(view)
return (
<Tooltip title="Rename view" arrow>
<EditableTypography
value={
view.displayName ||
// @ts-expect-error
`${view.assemblyNames?.join(',') || 'Untitled view'}${
`${view.assemblyNames?.map(r => assemblyManager.get(r)?.displayName).join(',') || 'Untitled view'}${
view.minimized ? ' (minimized)' : ''
}`
}
Expand Down

0 comments on commit 3bdfb9f

Please sign in to comment.