diff --git a/packages/app-core/src/JBrowseConfig/index.ts b/packages/app-core/src/JBrowseConfig/index.ts index 24bb7aeeee..eddb6f139b 100644 --- a/packages/app-core/src/JBrowseConfig/index.ts +++ b/packages/app-core/src/JBrowseConfig/index.ts @@ -97,6 +97,48 @@ export function JBrowseConfigF({ type: 'boolean', defaultValue: false, }, + + hierarchical: ConfigurationSchema('hierarchical', { + sort: ConfigurationSchema('hierarchicalSort', { + /** + * #slot configuration.hierarchical.sort.trackNames + */ + trackNames: { + type: 'boolean', + defaultValue: false, + }, + /** + * #slot configuration.hierarchical.sort.categories + */ + categories: { + type: 'boolean', + defaultValue: false, + }, + }), + defaultCollapsed: ConfigurationSchema('defaultCollapsed', { + /** + * #slot configuration.hierarchical.defaultCollapse.categoryNames + */ + categoryNames: { + type: 'stringArray', + defaultValue: [], + }, + /** + * #slot configuration.hierarchical.defaultCollapse.topLevelCategories + */ + topLevelCategories: { + type: 'boolean', + defaultValue: false, + }, + /** + * #slot configuration.hierarchical.defaultCollapse.subCategories + */ + subCategories: { + type: 'boolean', + defaultValue: false, + }, + }), + }), /** * #slot configuration.theme */ @@ -107,7 +149,10 @@ export function JBrowseConfigF({ /** * #slot configuration.extraThemes */ - extraThemes: { type: 'frozen', defaultValue: {} }, + extraThemes: { + type: 'frozen', + defaultValue: {}, + }, /** * #slot configuration.logoPath */ diff --git a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.tsx b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.tsx index 07186a90b3..cfe4593cf9 100644 --- a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.tsx +++ b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.test.tsx @@ -2,7 +2,7 @@ import React from 'react' import { createJBrowseTheme } from '@jbrowse/core/ui' import { createTestSession } from '@jbrowse/web/src/rootModel' import { render } from '@testing-library/react' -import { ThemeProvider } from '@mui/material/styles' +import { ThemeProvider } from '@mui/material' // locals import HierarchicalTrackSelector from './HierarchicalTrackSelector' diff --git a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.tsx b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.tsx index 6f80bce13e..c188ea678b 100644 --- a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.tsx +++ b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/HierarchicalTrackSelector.tsx @@ -3,7 +3,8 @@ import { observer } from 'mobx-react' import AutoSizer from 'react-virtualized-auto-sizer' // locals -import { TreeNode, HierarchicalTrackSelectorModel } from '../model' +import { HierarchicalTrackSelectorModel } from '../model' +import { TreeNode } from '../generateHierarchy' import HierarchicalFab from './HierarchicalFab' import HierarchicalTree from './tree/HierarchicalTree' import HierarchicalHeader from './tree/HierarchicalHeader' diff --git a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap index a41976e570..647427bf53 100644 --- a/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap +++ b/plugins/data-management/src/HierarchicalTrackSelectorWidget/components/__snapshots__/HierarchicalTrackSelector.test.tsx.snap @@ -9,7 +9,8 @@ exports[`renders nothing with no assembly 1`] = ` style="display: flex;" >