From 2a59d7f15dc2179b217aca84dff36bbbe318c193 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Sat, 24 Oct 2026 20:10:10 +0200 Subject: [PATCH] Quick Analysis: keep clear of the Auto Fill Options button, tests in the shared binary After a fill-handle drag both buttons sat at the selection's corner and the Quick Analysis one, painted on top, took the click. The Quick Analysis button now waits until the fill is no longer current; Ctrl+Q still opens the popup. Drops "Bar" from the Japanese EXTRA list, now a DIALOGS key, and moves the button tests into tests/it. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/i18n/ja.rs | 1 - crates/ui-egui/src/quick_analysis.rs | 5 ++++- crates/ui-egui/tests/it/main.rs | 1 + crates/ui-egui/tests/{ => it}/quick_analysis_button.rs | 0 4 files changed, 5 insertions(+), 2 deletions(-) rename crates/ui-egui/tests/{ => it}/quick_analysis_button.rs (100%) diff --git a/crates/ui-egui/src/i18n/ja.rs b/crates/ui-egui/src/i18n/ja.rs index efb2afcca1..7b4d9c89b6 100644 --- a/crates/ui-egui/src/i18n/ja.rs +++ b/crates/ui-egui/src/i18n/ja.rs @@ -1142,7 +1142,6 @@ pub(super) const EXTRA: &[(&str, &str)] = &[ ("Treemap", "ツリーマップ"), ("Sunburst", "サンバースト"), ("Stock", "株価"), - ("Bar", "横棒"), ( "Drag to fill cells. Drag from inside a cell to select a range.", "ドラッグしてセルをオートフィルします。セルの内側からドラッグすると範囲を選択します。", diff --git a/crates/ui-egui/src/quick_analysis.rs b/crates/ui-egui/src/quick_analysis.rs index 798f68c4f8..5fd3f8f6a0 100644 --- a/crates/ui-egui/src/quick_analysis.rs +++ b/crates/ui-egui/src/quick_analysis.rs @@ -203,7 +203,10 @@ pub fn show(app: &mut SheetApp, ui: &mut Ui, geo: &Geo, sh: &Sheet) { // While the mouse is down (selecting, filling) the button stays out of the way. let busy = app.grid.drag != Drag::None || ctx.input(|i| i.pointer.any_down()); let lang = crate::i18n::current(&ctx); - if corner_visible && (open || !busy) { + // Right after a fill-handle drag the Auto Fill Options button sits at the same corner; it wins + // until that fill is no longer current (Ctrl+Q still opens the popup). + let fill_tag = app.grid.fill_tag.is_some(); + if corner_visible && (open || (!busy && !fill_tag)) { let mut clicked = false; egui::Area::new(Id::new("quick_analysis_button")).fixed_pos(button.min).order(Order::Foreground).show(&ctx, |ui| { let (r, resp) = ui.allocate_exact_size(button.size(), Sense::click()); diff --git a/crates/ui-egui/tests/it/main.rs b/crates/ui-egui/tests/it/main.rs index 3a9769c1c5..4b3d9be2b3 100644 --- a/crates/ui-egui/tests/it/main.rs +++ b/crates/ui-egui/tests/it/main.rs @@ -64,6 +64,7 @@ mod pivot_pane; mod pivot_show_details; mod popup_dismissal; mod protect_password; +mod quick_analysis_button; mod right_to_left; mod scroll_position; mod scrollbar_column_fill; diff --git a/crates/ui-egui/tests/quick_analysis_button.rs b/crates/ui-egui/tests/it/quick_analysis_button.rs similarity index 100% rename from crates/ui-egui/tests/quick_analysis_button.rs rename to crates/ui-egui/tests/it/quick_analysis_button.rs