HierarchicalTrackSelectorWidget
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Provided by the data-management plugin. View source.
Lists a view's available tracks as a tree of categories, with a filter box, favorites and recently used tracks, and a group for each connection.
Properties
| Member | Description |
|---|---|
idstring · default createElementId() |
The identifier references to this node resolve through. A snapshot that leaves it out gets a generated one. |
type"HierarchicalTrackSelectorWidget" |
Always "HierarchicalTrackSelectorWidget", the name a snapshot selects this model by. |
| view |
|
trackContainerIdstring | undefined |
Which of the view's track containers this selector writes into, by id. Absent — the usual case — means the view itself. A view owning several track lists (the synteny view, one per level band) names one here; the container is resolved through view.trackContainerFor rather than referenced directly, because it isn't a view and so isn't a legal target for the view reference above. |
Volatiles
| Member | Description |
|---|---|
favoritesstring[] |
|
recentlyUsedstring[] |
|
selectedTrackIdsstring[] |
the shopping cart, by trackId; selection resolves the configs |
categoryModeObservableMap<string, CategoryMode> |
per-category rendering mode; absent means expanded. Collapsed and folder are mutually exclusive by construction, so un-foldering a category can't reveal a stale collapse underneath it |
tableViewIdstring | undefined |
the view whose tracks the drawer shows as a table in place of the tree. Keyed by view because every view's selector is this one widget, so table mode opened for one view stays with it |
tableDrawerWidthnumber | undefined |
the drawer width the table asks for, read by the session as preferredDrawerWidth and never written into its saved width |
trackListTrackList |
which tracks the tree and the table list: all of them, or only the favorites or the recently used |
trackTableTrackTableModel |
the filter box, facet filters, sort and columns the tree and the table share |
Getters
| Member | Description |
|---|---|
filterTextstring |
the text in the filter box |
trackContainerTrackContainer | undefined |
The track list this selector shows and writes into: the view itself, or one of its containers when trackContainerId names one. |
showTableboolean |
whether the drawer shows this view's tracks as a table |
preferredDrawerWidthnumber | undefined |
the drawer width the session draws while the table shows |
shownTrackIdsSet<string> |
|
favoritesSetSet<string> |
|
recentlyUsedSetSet<string> |
|
assemblyNamesstring[] |
|
| configAndSessionTrackConfigurations |
the tracks this view can be offered — its assemblies' sequence tracks, then the session's list filtered to what it can draw |
sessionTrackIdsSet<any> |
a non-admin's added/copied tracks, which the tree groups under a "Session tracks" category. Membership is the session's own list — the source of truth — not a suffix baked into the trackId |
mainGroupTracksTrackNodeSource[] |
the config's own and the session's tracks, resolved and sorted. Its own getter, so a connection loading re-reads none of them |
allTracksTrackGroup[] |
the main group, then one group per connection config whether or not it is loaded. A dormant connection has no tracks and defaults collapsed; expanding it loads it (see toggleCategory) |
allTrackConfigurationMapMap<string, AnyTrackConfig> |
every track the view can display by trackId, in tree order; a track in both the config and a connection resolves to the config's copy, as the session's getTrackById does. A connection's tracks are its live entries, before any edit. |
allTrackConfigurationsAnyTrackConfig[] |
every track the view can display, once each, in tree order: what the table selector, favorites and recently-used resolve against |
selectionAnyTrackConfig[] |
the selected track configs, resolved from selectedTrackIds on read, so a deleted track drops out and an edited one stays selected |
selectionSetSet<string> |
the selected trackIds that still resolve to a track |
favoriteTracks(TrackConfigEntry | TrackConfigNode)[] |
filters out tracks that are not in the favorites group |
recentlyUsedTracks(TrackConfigEntry | TrackConfigNode)[] |
filters out tracks that are not in the recently used group |
listedTrackOrderstring[] | undefined |
the favorites in the order they were added, or the recently used newest first; undefined when listing all |
listedTrackConfigurationsAnyTrackConfig[] |
the track configs the tree and the table list, in the list's own order |
| emptyListMessage |
what the tree and the table say when the list itself has no tracks; favorites are kept across a config's genomes and views, so some may be ones this view cannot show |
textKeptIdsSet<string> | undefined |
the trackIds whose searchText (name, categories, description and metadata values) holds every term in the filter box; undefined when the box holds no terms |
searchTermsstring[] |
the terms a kept row must contain, which matchHint explains |
filterActiveboolean |
a query, a facet filter or the favorites or recent list narrows the tree, which forces categories open (isFilterForcedOpen) |
groupRowsDrawnboolean |
whether the All list draws a row for each group: only once a connection adds a group beside the config's own tracks |
| hierarchy |
a group is kept even when no track in it survives the filter, so an empty connection still shows in the tree |
flatListTreeNode[] |
the favorites or recently used tracks as a flat list in the list's own order, newest first for recent, with no category tree or group header: the toggle above already names the list |
rowsTreeRow[] |
every rendered row, in order, with its height and scroll offset |
treeHeightnumber |
Methods
| Member | Description |
|---|---|
isFavorite(trackId: string) => boolean |
|
isRecentlyUsed(trackId: string) => boolean |
|
removableConnection(groupId: string) => BaseConnectionConfig | undefined |
the connection a top-level group's row may delete: any for an admin, otherwise one the session itself holds, which is every connection where the session and the config are one document |
isSelected(trackId: string) => boolean |
|
| visibleRange |
Actions
| Member | Description |
|---|---|
setSelection(trackIds: string[]) => void |
|
addToSelection(trackIds: string[]) => void |
|
removeFromSelection(trackIds: string[]) => void |
|
clearSelection() => void |
|
addToFavorites(trackId: string) => void |
|
removeFromFavorites(trackId: string) => void |
|
clearFavorites() => void |
|
setRecentlyUsed(str: string[]) => void |
|
addToRecentlyUsed(id: string) => void |
|
clearRecentlyUsed() => void |
|
setTrackList(trackList: TrackList) => void |
|
setView(view: IBaseViewModel | undefined) => void |
|
setTrackContainerId(id: string | undefined) => void |
|
setCategoryMode(id: string, mode: CategoryMode | undefined) => void |
|
clearCategoryModes() => void |
|
clearFilterText() => void |
|
setFilterText(newText: string) => void |
|
openTable(drawerWidth?: number) => void |
shows this view's tracks as a table in the drawer, at the drawer's current width |
closeTable() => void |
|
setPreferredDrawerWidth(width: number) => void |
a drag of the drawer edge while the table is open resizes the table's width, so closing it returns to the user's own |
setCategoryCollapsed(id: string, collapsed: boolean) => void |
the single gate on accordion state: a folder is a mode the user picked, not an accordion that happens to be shut, so every collapse/expand — one row, a bulk menu item, or "expand all" — passes it by |
setFolderCategory(id: string, isFolder: boolean) => void |
folder and collapsed are the same slot, so leaving folder mode always yields an expanded category |
toggleTrack(trackId: string) => Promise<void> |
shows or hides a track, recording one it showed as recently used |
collapseSubCategories() => void |
|
collapseTopLevelCategories() => void |
|
toggleCategory(id: string) => void |
expanding a dormant connection's category loads the connection |