use gpui_kit::assets::IconName;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
pub enum Workspace {
#[default]
Explore,
Sorting,
Pipeline,
Curation,
Analytics,
}
impl Workspace {
pub const ALL: [Workspace; 5] = [Workspace::Explore, Workspace::Sorting, Workspace::Pipeline, Workspace::Curation, Workspace::Analytics];
pub fn title(self) -> &'static str {
match self {
Workspace::Explore => "Explore",
Workspace::Sorting => "Sorting",
Workspace::Pipeline => "Pipeline",
Workspace::Curation => "Curation",
Workspace::Analytics => "Analytics",
}
}
pub fn hint(self) -> &'static str {
match self {
Workspace::Explore => "Look at the recording: traces, heatmaps, channels, timeline",
Workspace::Sorting => "Run the installed sorters on the recording or a part of it, compare their units",
Workspace::Pipeline => "The processing graph: recordings, operations, views and writes on a canvas",
Workspace::Curation => "Judge a sorting: units, waveforms, features, correlograms; label and merge",
Workspace::Analytics => "Charts across recordings, sortings and runs (coming)",
}
}
pub fn planned(self) -> Option<&'static str> {
match self {
Workspace::Explore => None,
Workspace::Sorting => Some(
"Choose the channels and the part of the recording to sort, the sorter and its parameters, \
then run it and follow its progress here.",
),
Workspace::Pipeline => Some("Open a recording: its view's processing shows here as a chain of operators."),
Workspace::Curation => Some(
"Inspect and judge sorting results: clusters, waveforms, correlograms and amplitudes, \
with merges and splits recorded for the sorting files.",
),
Workspace::Analytics => Some(
"Charts across the session: recordings, sortings, metrics and runs side by side. \
What it shows is being designed.",
),
}
}
pub fn icon(self) -> IconName {
match self {
Workspace::Explore => IconName::AudioWaveform,
Workspace::Sorting => IconName::SlidersHorizontal,
Workspace::Pipeline => IconName::Workflow,
Workspace::Curation => IconName::Microscope,
Workspace::Analytics => IconName::ChartPie,
}
}
}