Feature history on the left side, with contiguous folders (#449)

The feature history can sit in a panel on the left, with folders that hold one unbroken run of features, drag and drop as one undo step, and a resizable divider. Timeline folders save under format 17.
This commit is contained in:
Alexander Nutz authored and GitHub committed 2026-10-13 13:01:31 -04:00
1 parent be55a49b04
commit a8b3b21fd0
17 files changed
+2336 -37

No files matched your search

+22
View File
@@ -211,6 +211,28 @@ mod tests {
assert!(t.execute("timeline.paste", &json!({})).is_err());
}
#[test]
fn paste_at_a_marker_inside_a_timeline_folder_joins_the_folder() {
let mut s = Session::default();
for (name, body, x) in [("First", "FirstBody", 0), ("Second", "SecondBody", 20), ("Source", "SourceBody", 40)] {
run(
&mut s,
"solid.box",
json!({"length": 10, "width": 10, "height": 10, "corner": [x, 0, 0], "operation": "new_body", "name": name, "body_name": body}),
);
}
let group = run(&mut s, "timeline.group", json!({"name": "Pair", "features": ["First", "Second"]}))["group"].as_u64().unwrap();
run(&mut s, "timeline.copy", json!({"features": ["Source"]}));
run(&mut s, "timeline.roll_to", json!({"position": 1}));
let pasted = run(&mut s, "timeline.paste", json!({}))["pasted"][0]["id"].as_u64().unwrap();
let folder = s.doc.timeline_groups.iter().find(|folder| folder.id == group).unwrap();
let first = s.doc.find_feature("First").unwrap().id;
let second = s.doc.find_feature("Second").unwrap().id;
assert_eq!(folder.features, vec![first, pasted, second]);
assert!(solidcraft_doc::Document::from_json(&s.doc.to_json()).is_ok(), "pasting inside a folder must leave a reopenable design");
}
#[test]
fn pasted_fillet_rounds_the_copied_body_it_names() {
let mut s = Session::default();