docs(ui): document New Tracks changes

This commit is contained in:
Sly LaMenace committed 2026-10-24 21:57:11 +00:00
1 parent 929a7c5307
commit 95f25979eb
3 files changed
+5

No files matched your search

+2
View File
@@ -7,6 +7,7 @@ use crate::{Engine, Result, cmd};
use serde_json::{Value, json};
use soundcraft_model::{ChannelFormat, ClipContent, Group, GroupId, Playlist, Route, Session, Track, TrackHeight, TrackId, TrackKind};
/// Returns the track command specifications exposed to UI and automation clients.
pub fn specs() -> Vec<CommandSpec> {
vec![
cmd!(
@@ -231,6 +232,7 @@ pub fn specs() -> Vec<CommandSpec> {
]
}
/// Creates either one legacy row or several validated rows as one command.
fn new_track(e: &mut Engine, p: &Value) -> Result<Value> {
let ids = if let Some(rows) = p.get("rows") {
let rows = rows.as_array().ok_or_else(|| bad("track.new", "`rows` must be an array"))?;
+1
View File
@@ -40,6 +40,7 @@ pub struct Dialogs {
}
impl Dialogs {
/// Returns the stable UI identifier of the currently open dialog.
pub fn open_name(&self) -> Option<&'static str> {
self.open.as_ref().map(|d| match d {
Dialog::NewTracks(_) => "new_tracks",
+2
View File
@@ -9,6 +9,7 @@ const NAME_WIDTH: f32 = 260.0;
const ROW_BUTTON_WIDTH: f32 = 22.0;
#[derive(Debug, Clone)]
/// One independently configured row in the New Tracks dialog.
pub struct NewTrackRow {
key: u64,
pub count: u32,
@@ -40,6 +41,7 @@ impl NewTrackRow {
}
#[derive(Debug, Clone)]
/// State for the multi-row New Tracks dialog.
pub struct NewTracks {
pub rows: Vec<NewTrackRow>,
active: usize,