Merge branch 'red/fw-diag-clean' into area/ribbon-fw

This commit is contained in:
Martin Ball
2026-11-19 13:31:56 +00:00
8 changed files with 0 additions and 64 deletions
-9
View File
@@ -77,16 +77,7 @@ impl<'a> RibbonGroup<'a> {
/// popup the content opens does not close the popover: the overlay family keeps it open.
fn collapsed(&self, ui: &mut Ui, add: &mut dyn FnMut(&mut Ui)) {
let button = Button::new(self.title.clone()).icon(self.icon.clone()).arrangement(Arrangement::Stacked).show(ui);
if craft_ui::contract::clicked(&button.response) {
eprintln!(
"DIAG a_collapsed_groups_popover_stays_open_while_a_child_popup_is_used: collapsed button {:?} clicked at {:?}, sizing {}",
button.response.id,
button.response.rect,
ui.is_sizing_pass()
);
}
Popover::new(self.title.clone(), Bind::kept()).overlay(|overlay| overlay.opened_by(&button.response, Trigger::Click)).show(ui, |ui, _| {
eprintln!("DIAG a_collapsed_groups_popover_stays_open_while_a_child_popup_is_used: popover body of {:?} runs", self.title.as_str());
with_env(
ui,
|overrides| {
-7
View File
@@ -153,13 +153,6 @@ fn a_collapsed_groups_popover_stays_open_while_a_child_popup_is_used() {
assert!(fixture.by_label("Paste").is_none(), "the group is collapsed");
let button = fixture.by_label("Clipboard").expect("the collapsed group's button");
fixture.click(&button).idle(3);
eprintln!(
"DIAG a_collapsed_groups_popover_stays_open_while_a_child_popup_is_used: clicked {:?}; after: Clipboard {:?} Paste {:?} Wide {:?}",
button.rect,
fixture.by_label("Clipboard").map(|target| target.rect),
fixture.by_label("Paste").map(|target| target.rect),
fixture.by_label("Wide").map(|target| target.rect)
);
assert!(fixture.by_label("Paste").is_some(), "the button opens the group's popover");
fixture.key(Key::ArrowDown, Modifiers::ALT).idle(3);
fixture.key(Key::Enter, Modifiers::NONE).idle(3);
-8
View File
@@ -282,16 +282,8 @@ fn story(registration: &'static StoryRegistration, surface: Surface, env: &RootE
}
let story = &registration.story;
if let (true, Drive::Custom(open)) = (story.covers.contains(&Required::Open), story.drive) {
let before = layer_rects(fixture.ctx()).len();
open(&mut fixture);
settle(&mut fixture);
eprintln!(
"DIAG story-open {}: layers {before} -> {}, root {:?}, focused {:?}",
story.name,
layer_rects(fixture.ctx()).len(),
fixture.root_id(),
fixture.focused()
);
}
(fixture, flow.get())
}
@@ -149,15 +149,6 @@ fn declared_actions_are_handled(subject: &Subject) -> Result<(), String> {
|| signature(fixture.tree()) != before
|| fixture.focused() != focus;
if !acted {
eprintln!(
"DIAG activation: {} {kind:?} on {:?} named {:?}: focus {focus:?} -> {:?}, outputs {}, disabled {:?}",
story.name,
fixture.tree().role_of(key),
fixture.tree().name_of(key),
fixture.focused(),
outputs.len(),
fixture.tree().data_of(key).map(|node| node.is_disabled()),
);
return Err(format!("{}: {kind:?} on {:?} did nothing", story.name, fixture.tree().role_of(key)));
}
}
@@ -130,18 +130,6 @@ pub(super) fn layer_traps_focus(subject: &Subject) -> Result<(), String> {
for step in 0..stops + 2 {
fixture.key(Key::Tab, Modifiers::NONE);
if !focus_within(&fixture, container.node) {
if story.name == "menu_with_companion" {
let tree = fixture.tree();
let focused = tree.focused_key();
eprintln!(
"DIAG layer_traps_focus: focused {:?} role {:?} name {:?}; container {:?} role {:?}; scope trap {traps}",
focused,
tree.role_of(focused),
crate::testing::access::name(tree, focused),
container.node,
tree.role_of(container.node)
);
}
return Err(format!("{}: Tab number {} moved focus out of the layer", story.name, step + 1));
}
}
@@ -228,15 +228,6 @@ fn speed_steps(os: Os, speed: WheelSpeed) -> [Took; 4] {
let mut show = |ui: &mut egui::Ui| {
register(ui.ctx(), WheelTaker::new(view, Rect::from_min_size(Pos2::ZERO, Vec2::new(400.0, 300.0))).vertical(true).zoom(true));
let share = take_share(ui.ctx(), view);
if let Some(share) = &share {
eprintln!(
"DIAG the_users_wheel_speed_scales_each_delta_once_and_leaves_zoom_alone: {os:?} {speed:?} frame {} pass {} zoom {} scroll {:?}",
ui.ctx().cumulative_frame_nr(),
ui.ctx().current_pass_index(),
share.zoom,
share.scroll
);
}
seen.borrow_mut().extend(share);
if rerun.get() && ui.ctx().current_pass_index() == 0 {
ui.ctx().request_discard("the wheel frame runs twice");
-5
View File
@@ -748,11 +748,6 @@ impl<'a, S> AppShell<'a, S> {
})
.inner
.flatten();
eprintln!(
"DIAG ribbon: slot {key:?} laid out at extent {extent} in {:?}, content took {took:?}, sizing {}",
rect_of(key),
ui.is_sizing_pass()
);
if let Some(took) = took.filter(|took| took.is_finite() && *took > 0.0) {
measured_now.push((key, took));
}
-5
View File
@@ -597,11 +597,6 @@ fn a_contextual_tab_that_leaves_is_not_hit_or_listed_while_it_fades() {
picked.borrow_mut().clear();
fixture.click_at(table.center());
assert!(picked.borrow().is_empty(), "a click on the departed tab's slot selects nothing: {:?}", picked.borrow());
eprintln!(
"DIAG a_contextual_tab_that_leaves_is_not_hit_or_listed_while_it_fades: after the click painted={} tabs back={:?}",
painted(&fixture),
hidden.iter().filter(|name| !tab_rects(fixture.tree(), name).is_empty()).collect::<Vec<_>>()
);
fixture.idle(30);
assert!(!painted(&fixture), "the departed tab is gone once the fade ends");
assert!(hidden.iter().any(|name| !tab_rects(fixture.tree(), name).is_empty()), "the strip refits once the exit ends: {hidden:?}");