#941: a window hidden while parked drops its key tip request; parity row names the badge-less keys

Addresses CodeRabbit review on #3250:
- "Clear parked keytip requests when their window becomes hidden": a
  window hidden from another window (View › Hide while it isn't in
  front) kept the request it had parked, and showing it again opened
  the control. follow_active_window now drops the waiting request of
  every parked window that is hidden.
- "Correct the no-badge description in the parity table": only Alt+I,
  D, V and T (no ribbon tab) paint no badges.

Test: legacy_keytips::a_window_hidden_from_another_window_drops_its_parked_request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hector VillarrealandClaude Opus 5.5 committed 2026-11-03 04:44:40 -06:00
1 parent 68e87f0a68
commit 2bdec6c0a1
3 files changed
+30 -1

No files matched your search

+8
View File
@@ -102,6 +102,14 @@ impl SheetApp {
/// in (a window never seen before starts fresh). A closed window's state is dropped.
pub fn follow_active_window(&mut self) {
let active = self.session.active_window();
// A window hidden while parked (from another window's View › Hide) isn't drawn either:
// its waiting key tip request goes, as it does for a window hidden as it is left.
let session = &self.session;
for (id, parked) in &mut self.parked {
if session.window(*id).is_some_and(|w| w.hidden) {
parked.keytip_invoke_next = None;
}
}
if active == self.ui_window {
return;
}
+21
View File
@@ -89,3 +89,24 @@ fn a_hidden_window_drops_its_waiting_key_tip_request() {
h.state_mut().show_window(second);
assert_eq!(h.state().ui.keytip_invoke_next, None);
}
#[test]
fn a_window_hidden_from_another_window_drops_its_parked_request() {
// Hidden while another window is in front (its request already parked), the window still
// loses the request, so showing it again doesn't open the control.
let mut s = Session::new();
s.new_workbook();
let mut h = crate::common::os_harness(s, OperatingSystem::Nix);
h.run_steps(2);
let first = h.state().session.active_window().unwrap();
h.state_mut().run("view.newWindow", json!({})).unwrap();
let second = h.state().session.active_window().unwrap();
h.state_mut().show_window(second);
h.state_mut().ui.keytip_invoke_next = Some("insert.symbol");
h.state_mut().enter_window(first);
h.state_mut().run("view.hideWindow", json!({"window": second})).unwrap();
h.state_mut().show_window(first);
h.state_mut().run("view.unhideWindow", json!({"window": second})).unwrap();
h.state_mut().show_window(second);
assert_eq!(h.state().ui.keytip_invoke_next, None);
}
+1 -1
View File
@@ -21,7 +21,7 @@ Sources: `crates/ui-egui/src` (ribbon, grid, editor, formula bar, dialogs, panes
| Formulas › Function Library | Insert Function, AutoSum, Recently Used and a menu per function category | yes (10-24): a big Insert Function button and three columns of labelled small buttons, the layout Excel uses when the window is not wide enough for a big button per category; each category's book icon has its own colour; a category menu shows each function's description on hover and ends with Insert Function…, which opens the dialog on that category; More Functions cascades into Statistical, Engineering, Cube, Information, Compatibility and Web; AutoSum is a split button whose menu (Sum, Average, Count Numbers, Max, Min, More Functions…) Home › Editing shares; Recently Used has the MR key tip | the wide layout with a big button per category is not offered; a function counts as recently used once its formula is entered, not when Insert Function's OK is pressed |
| Ribbon: tabs, groups, split buttons, galleries, contextual tabs | yes | yes (Table Design, Chart Design, Format, PivotTable tabs) | done; missing contextual tabs for pictures, shapes, sparklines, header/footer, slicers |
| Ribbon collapse, simplified ribbon, customize ribbon/QAT | yes | partial | customization missing |
| Key tips (Alt / F10 then letters) | yes, every ribbon control | **initial** (#43, 10-10): Alt or F10 shows key tips on Home for alignment, Paste Special and AutoFit plus the Excel 2003 menu keys (Alt+I, E, O, D, V, T and Alt+F, U, such as Alt+I, R or Alt+D, S), which paint no badges, as in Excel (#941); other tabs and controls not yet (#33, #49) | 3–5 h |
| Key tips (Alt / F10 then letters) | yes, every ribbon control | **initial** (#43, 10-10): Alt or F10 shows key tips on Home for alignment, Paste Special and AutoFit plus the Excel 2003 menu keys (Alt+I, E, O, D, V, T and Alt+F, U, such as Alt+I, R or Alt+D, S); Alt+I, D, V and T, which have no ribbon tab, paint no badges, as in Excel (#941); other tabs and controls not yet (#33, #49) | 3–5 h |
| Formula bar with Name Box, expand, function hints | yes | yes; grows with its content from one to five lines (Alt+Enter, wrapped text, or viewing a multi-line cell), then scrolls with the caret in view, the Name Box and buttons staying on the first line; the chevron pins it at five; the in-cell editor shows every line | done; no drag-to-resize handle |
| Sheet tabs: rename, reorder, colour, hide, scroll | yes | yes | Ctrl-drag (Cmd or Option on macOS) drops a copy (#971); active tab revealed on navigation and resize (#681); manual wheel/trackpad browsing preserved; rename focus bug on macOS (#145) |
| Formula bar with Name Box, expand, function hints | yes | yes | done; dynamic-array spill children show the source formula muted and read-only, using current spill ownership |