Display numeric units in the variables pane (#6683)

This commit is contained in:
Jonathan Tran
2025-05-05 23:40:18 -04:00
committed by GitHub
parent 32db31e6c3
commit 1e056cfd8a
69 changed files with 602 additions and 163 deletions

View File

@ -83,9 +83,9 @@ pub enum KclValue {
value: Box<Helix>,
},
ImportedGeometry(ImportedGeometry),
#[ts(skip)]
Function {
#[serde(skip)]
#[serde(serialize_with = "function_value_stub")]
#[ts(type = "null")]
value: FunctionSource,
#[serde(skip)]
meta: Vec<Metadata>,
@ -109,6 +109,13 @@ pub enum KclValue {
},
}
fn function_value_stub<S>(_value: &FunctionSource, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_unit()
}
#[derive(Debug, Clone, PartialEq, Default)]
pub enum FunctionSource {
#[default]