fix(ui): fade or unfade browser row dynamically when visibility toggles (#9953) (#9967)

- In entry_row (crates/ui-egui/src/browser.rs), use live  rather than cached  for the  property
- Ensures eye toggle dynamically fades or unfades rows for sketches and bodies without requiring a cache rebuild
- Add regression test in browser_card_tests

Fixes #9953
This commit is contained in:
ashxddaga
2026-11-01 04:10:32 +00:00
committed by GitHub
parent 64fe82b6c1
commit 127373a950
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -2882,7 +2882,7 @@ fn entry_row(
label: &e.label,
name: true,
selected,
dim: !e.visible || parent_hidden,
dim: !visible || parent_hidden,
cut,
color: e.color,
swatch: appearance.swatch,
+19
View File
@@ -982,3 +982,22 @@ fn eye_drag_from_the_origin_is_its_own_undo_step_and_leaves_an_earlier_show_alon
h.app.run("edit.undo", json!({})).unwrap();
assert!(body_hidden(&h, "One"), "the show is its own undo step: undoing it hides One again");
}
/// #9953: hiding or showing a sketch or body dynamically dims/undims the row without needing a full row rebuild.
#[test]
fn hiding_or_showing_body_or_sketch_updates_row_dimming() {
let mut h = Harness::new();
h.app.run("solid.box", json!({"length":10,"width":10,"height":10,"body_name":"One"})).unwrap();
h.app.run("browser.expand_all", json!({})).unwrap();
h.settle();
// Toggle body hidden via eye click
h.step(&json!({"click":{"handle":"eye:One"}})).unwrap();
h.settle();
assert!(body_hidden(&h, "One"));
// Toggle body shown again via eye click
h.step(&json!({"click":{"handle":"eye:One"}})).unwrap();
h.settle();
assert!(!body_hidden(&h, "One"));
}