ui: block divisions and bias as two or three typed fields

A Tuple field kind: min_len to labels.len() positive numbers, whole when
asked, trailing blanks left out. The block's divisions and bias use it
instead of a JSON box (#449).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-16 01:42:51 -04:00
1 parent e4d1f6c7da
commit d17cf414f7
4 files changed
+108 -2

No files matched your search

+1
View File
@@ -151,6 +151,7 @@ fn scalar(f: &Field, v: &Value, units: UnitSystem) -> String {
options.iter().find(|(o, _)| *o == s).map_or_else(|| s.to_string(), |(_, l)| (*l).to_string())
}
Kind::Vector { labels, .. } => vector(labels, v, unit.as_deref()),
Kind::Tuple { labels, .. } => vector(labels, v, None),
Kind::Ref(_) | Kind::Text | Kind::Path { .. } => v.as_str().map_or_else(|| crate::context::value_text(v), str::to_string),
Kind::RefList(_) => list(v, |x| x.as_str().map(str::to_string)),
// `Bracket.3: Tet, Bracket.7: Swept`.