mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-29 01:36:39 +01:00
Merge pull request #2034 from kezmdor/fix/1834-autosum-edit-mode
AutoSum on one cell proposes its range in the editor, like Excel (fixes #1834)
This commit is contained in:
8 files changed
+250
-8
No files matched your search
@@ -131,6 +131,15 @@ impl SheetApp {
|
||||
if id == "file.exportPdf" && self.services.pick_save.is_some() && params.get("path").and_then(Json::as_str).is_none_or(str::is_empty) {
|
||||
return self.export_pdf_with_picker(params);
|
||||
}
|
||||
// Menu-style AutoSum on one cell proposes its formula in the editor with the range
|
||||
// pointed and selected, so a click, drag, arrow key or typing replaces it, as in Excel.
|
||||
// Programmatic callers use `run` and get the total entered.
|
||||
if id == "formulas.autoSum"
|
||||
&& params.get("range").and_then(Json::as_str).is_none()
|
||||
&& self.session.active().is_some_and(|d| d.selection.current().is_single())
|
||||
{
|
||||
return self.auto_sum_in_editor(params);
|
||||
}
|
||||
// Recommended Charts with no chart type named (ribbon button, keytip, command search) asks
|
||||
// which chart to insert; programmatic callers of `run` still get the first recommendation.
|
||||
if id == "insert.recommendedCharts" && params.get("type").is_none() {
|
||||
@@ -152,6 +161,24 @@ impl SheetApp {
|
||||
}
|
||||
}
|
||||
|
||||
/// Runs AutoSum on the active cell without entering it (`enter: false`) and points the
|
||||
/// proposed range in the editor that opens.
|
||||
fn auto_sum_in_editor(&mut self, params: Json) {
|
||||
let mut params = if params.is_object() { params } else { json!({}) };
|
||||
if let Some(map) = params.as_object_mut() {
|
||||
map.insert("enter".into(), Json::Bool(false));
|
||||
}
|
||||
if let Err(e) = self.run("formulas.autoSum", params) {
|
||||
return self.alert(e);
|
||||
}
|
||||
if let Some(ed) = self.editor.as_mut() {
|
||||
ed.point_last_argument();
|
||||
if ed.can_point() {
|
||||
self.session.mode = gridcraft_engine::Mode::Point;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Shows a command error: a toast for an unavailable command, else a message box.
|
||||
pub(crate) fn alert(&mut self, e: String) {
|
||||
// Shown in the window the user ends up in, also after a command that switched windows.
|
||||
|
||||
@@ -56,6 +56,8 @@ pub struct EditState {
|
||||
pub completion: Option<String>,
|
||||
/// Move the caret to the end on the next frame.
|
||||
pub caret_to_end: bool,
|
||||
/// Select from this char index to `caret` when the caret is next pushed into the widget.
|
||||
pub select_from: Option<usize>,
|
||||
/// The cell's text when an F2-style edit began. Committing it unchanged leaves the cell alone
|
||||
/// (no undo step, the workbook stays clean). `None` for an edit started by typing.
|
||||
pub original: Option<String>,
|
||||
@@ -141,6 +143,7 @@ impl EditState {
|
||||
keep_selection: false,
|
||||
caret_to_end: true,
|
||||
completion: None,
|
||||
select_from: None,
|
||||
original,
|
||||
list: None,
|
||||
list_accept: false,
|
||||
@@ -497,6 +500,23 @@ impl EditState {
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
/// Points and selects the argument of the call that ends the text, as AutoSum proposes it
|
||||
/// (`=SUM(B1:B3)`): a click, drag, arrow key or typing replaces `B1:B3`. An arrow key moves
|
||||
/// from the range's first cell, as in Excel: ↑ on `=SUM(A2:A4)` gives `=SUM(A1)`. With no
|
||||
/// argument (`=SUM()`) the caret goes between the parentheses.
|
||||
pub fn point_last_argument(&mut self) {
|
||||
let Some(open) = self.text.rfind('(') else { return };
|
||||
let Some(close) = self.text.len().checked_sub(1).filter(|&c| c > open && self.text.ends_with(')')) else { return };
|
||||
let chars = |byte: usize| self.text.get(..byte).map_or(0, |t| t.chars().count());
|
||||
let (start, end) = (open + 1, close);
|
||||
self.caret = chars(end);
|
||||
self.point = (start < end).then_some((start, end));
|
||||
self.select_from = (start < end).then(|| chars(start));
|
||||
self.point_cell = self.text.get(start..end).and_then(RangeRef::parse).map(|r| r.start);
|
||||
self.caret_to_end = false;
|
||||
self.sync_caret = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// References in formula text with their byte spans and colour index (same reference text ⇒
|
||||
@@ -626,6 +646,29 @@ mod tests {
|
||||
assert!(!e2.can_point());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn autosum_points_and_selects_its_proposed_range() {
|
||||
// #1834: Excel leaves AutoSum's range ready to be replaced by pointing or typing.
|
||||
let mut e = EditState::new(1, 0, CellRef::new(3, 0), "=SUM(A1:A3)".into(), true, false);
|
||||
e.point_last_argument();
|
||||
assert!(e.can_point());
|
||||
assert_eq!((e.caret, e.select_from, e.point), (10, Some(5), Some((5, 10))));
|
||||
assert_eq!(e.point_cell, Some(CellRef::new(0, 0)), "arrow keys move from the range's first cell");
|
||||
e.insert_ref("A2");
|
||||
assert_eq!(e.text, "=SUM(A2)");
|
||||
// No proposal: the caret waits between the parentheses.
|
||||
let mut e = EditState::new(1, 0, CellRef::new(3, 0), "=SUMA()".into(), true, false);
|
||||
e.point_last_argument();
|
||||
assert!(e.can_point());
|
||||
assert_eq!((e.caret, e.select_from, e.point), (6, None, None));
|
||||
e.insert_ref("B2");
|
||||
assert_eq!(e.text, "=SUMA(B2)");
|
||||
// Text without a closing call is left alone.
|
||||
let mut e = EditState::new(1, 0, CellRef::new(3, 0), "=SUM(".into(), true, false);
|
||||
e.point_last_argument();
|
||||
assert_eq!((e.caret, e.point), (5, None));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_pasted_name_replaces_the_selected_text() {
|
||||
let mut e = EditState::new(1, 0, CellRef::new(0, 0), "=OldName+1".into(), false, false);
|
||||
|
||||
@@ -568,8 +568,12 @@ pub fn editor_widget(app: &mut SheetApp, ui: &mut egui::Ui, id: egui::Id, font:
|
||||
resp.request_focus();
|
||||
}
|
||||
ed.request_focus = false;
|
||||
// Closing a dialog that changed nothing (Cancel) gives the selection back as it was.
|
||||
let range = if ed.keep_selection && !ed.sync_caret {
|
||||
// Closing a dialog that changed nothing (Cancel) gives the selection back as it was, and
|
||||
// AutoSum's proposed range comes selected (`select_from`).
|
||||
let range = if let Some(from) = ed.select_from.take() {
|
||||
ed.anchor = from;
|
||||
egui::text::CCursorRange::two(egui::text::CCursor::new(from), egui::text::CCursor::new(ed.caret))
|
||||
} else if ed.keep_selection && !ed.sync_caret {
|
||||
egui::text::CCursorRange::two(egui::text::CCursor::new(ed.anchor), egui::text::CCursor::new(ed.caret))
|
||||
} else {
|
||||
ed.anchor = ed.caret;
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
//! AutoSum from the ribbon or keyboard on one cell proposes its formula in the editor, with the
|
||||
//! range ready to be replaced by pointing or typing, as in Excel (#1834).
|
||||
|
||||
use egui::{Event, Key, Modifiers, PointerButton, Pos2};
|
||||
use gridcraft_engine::core::{CellRef, Value};
|
||||
use gridcraft_engine::{Mode, Session};
|
||||
use gridcraft_ui_egui::grid::Geo;
|
||||
use serde_json::json;
|
||||
|
||||
use crate::common::Harness;
|
||||
|
||||
/// 1, 2, 3 in A1:A3 and `selected` selected.
|
||||
fn harness(selected: &str) -> Harness {
|
||||
harness_at("A1", selected)
|
||||
}
|
||||
|
||||
/// 1, 2, 3 down from `first` and `selected` selected.
|
||||
fn harness_at(first: &str, selected: &str) -> Harness {
|
||||
let mut session = Session::new();
|
||||
session.new_workbook();
|
||||
session.execute("range.setValues", json!({"range": first, "values": [[1], [2], [3]]})).unwrap();
|
||||
session.execute("selection.set", json!({"range": selected})).unwrap();
|
||||
crate::common::harness_with(crate::common::builder().with_size(egui::vec2(1200.0, 800.0)), crate::common::app(session), 4)
|
||||
}
|
||||
|
||||
/// The AutoSum button: a menu-style run.
|
||||
fn auto_sum(h: &mut Harness) {
|
||||
h.state_mut().run_or_alert("formulas.autoSum", json!({}));
|
||||
h.run_steps(2);
|
||||
}
|
||||
|
||||
fn editing(h: &Harness) -> Option<String> {
|
||||
h.state().editor.as_ref().map(|e| e.text.clone())
|
||||
}
|
||||
|
||||
fn input(h: &Harness, cell: &str) -> String {
|
||||
h.state().session.active().unwrap().wb.active().unwrap().input_text(CellRef::parse(cell).unwrap())
|
||||
}
|
||||
|
||||
fn cell_center(h: &Harness, cell: &str) -> Pos2 {
|
||||
let app = h.state();
|
||||
let sheet = app.session.active().unwrap().wb.active().unwrap();
|
||||
let geo = Geo::new(sheet, app.grid.rect.unwrap(), app.view().scroll);
|
||||
geo.cell_rect(sheet, CellRef::parse(cell).unwrap()).center()
|
||||
}
|
||||
|
||||
fn pointer(h: &mut Harness, cell: &str, pressed: bool) {
|
||||
let pos = cell_center(h, cell);
|
||||
h.input_mut()
|
||||
.events
|
||||
.extend([Event::PointerMoved(pos), Event::PointerButton { pos, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }]);
|
||||
h.run_steps(2);
|
||||
}
|
||||
|
||||
fn enter(h: &mut Harness) {
|
||||
for pressed in [true, false] {
|
||||
h.input_mut().events.push(Event::Key { key: Key::Enter, physical_key: None, pressed, repeat: false, modifiers: Modifiers::NONE });
|
||||
}
|
||||
h.run_steps(2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn autosum_on_one_cell_proposes_its_range_in_the_editor() {
|
||||
let mut h = harness("A4");
|
||||
auto_sum(&mut h);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A1:A3)"));
|
||||
assert_eq!(h.state().session.mode, Mode::Point);
|
||||
assert_eq!(input(&h, "A4"), "", "nothing is entered before Enter");
|
||||
enter(&mut h);
|
||||
assert_eq!(input(&h, "A4"), "=SUM(A1:A3)");
|
||||
assert_eq!(h.state().session.active().unwrap().wb.active().unwrap().value(CellRef::parse("A4").unwrap()), Value::Number(6.0));
|
||||
|
||||
// A `range` that isn't text is no range, for the engine and here alike.
|
||||
let mut h = harness("A4");
|
||||
h.state_mut().run_or_alert("formulas.autoSum", json!({"range": null}));
|
||||
h.run_steps(2);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A1:A3)"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_autosum_menu_functions_propose_theirs_the_same_way() {
|
||||
// Home › AutoSum ▾ Average (and Formulas › AutoSum ▾ once it has the menu, #658).
|
||||
let mut h = harness("A4");
|
||||
h.state_mut().run_or_alert("formulas.autoSum", json!({"function": "AVERAGE"}));
|
||||
h.run_steps(2);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=AVERAGE(A1:A3)"));
|
||||
pointer(&mut h, "A2", true);
|
||||
pointer(&mut h, "A2", false);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=AVERAGE(A2)"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_click_or_drag_replaces_the_proposed_range() {
|
||||
let mut h = harness("A4");
|
||||
auto_sum(&mut h);
|
||||
pointer(&mut h, "A2", true);
|
||||
pointer(&mut h, "A2", false);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A2)"));
|
||||
|
||||
let mut h = harness("A4");
|
||||
auto_sum(&mut h);
|
||||
pointer(&mut h, "A1", true);
|
||||
let to = cell_center(&h, "A2");
|
||||
for pos in [to, to + egui::vec2(1.0, 0.0)] {
|
||||
h.input_mut().events.push(Event::PointerMoved(pos));
|
||||
h.step();
|
||||
}
|
||||
pointer(&mut h, "A2", false);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A1:A2)"));
|
||||
enter(&mut h);
|
||||
assert_eq!(input(&h, "A4"), "=SUM(A1:A2)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_arrow_key_points_from_the_proposed_range() {
|
||||
// Observed in Excel for the web: ↑ after AutoSum moves from the range's first cell.
|
||||
let mut h = harness_at("A2", "A5");
|
||||
auto_sum(&mut h);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A2:A4)"));
|
||||
for pressed in [true, false] {
|
||||
h.input_mut().events.push(Event::Key { key: Key::ArrowUp, physical_key: None, pressed, repeat: false, modifiers: Modifiers::NONE });
|
||||
}
|
||||
h.run_steps(2);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A1)"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn typing_replaces_the_proposed_range() {
|
||||
let mut h = harness("A4");
|
||||
auto_sum(&mut h);
|
||||
h.input_mut().events.push(Event::Text("A2:A3".into()));
|
||||
h.run_steps(2);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A2:A3)"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn with_nothing_to_sum_the_caret_waits_between_the_parentheses() {
|
||||
let mut h = harness("C10");
|
||||
auto_sum(&mut h);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM()"));
|
||||
pointer(&mut h, "A1", true);
|
||||
pointer(&mut h, "A1", false);
|
||||
assert_eq!(editing(&h).as_deref(), Some("=SUM(A1)"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_block_and_programmatic_calls_enter_the_totals_at_once() {
|
||||
let mut h = harness("A1:A4");
|
||||
auto_sum(&mut h);
|
||||
assert!(h.state().editor.is_none());
|
||||
assert_eq!(input(&h, "A4"), "=SUM(A1:A3)");
|
||||
|
||||
// The control channel, CLI and MCP run commands with `run`: no editor.
|
||||
let mut h = harness("A4");
|
||||
h.state_mut().run("formulas.autoSum", json!({})).unwrap();
|
||||
h.run_steps(2);
|
||||
assert!(h.state().editor.is_none());
|
||||
assert_eq!(input(&h, "A4"), "=SUM(A1:A3)");
|
||||
}
|
||||
@@ -136,6 +136,10 @@ fn autosum_runs_sum_and_its_arrow_opens_the_shared_menu() {
|
||||
}
|
||||
h.run_steps(2);
|
||||
click(&mut h, "AutoSum");
|
||||
// One cell: the proposed formula waits in the editor for Enter, as in Excel (#1834).
|
||||
assert_eq!(editor_text(&h).as_deref(), Some("=SUM(A1:A3)"));
|
||||
h.key_press(Key::Enter);
|
||||
h.run_steps(2);
|
||||
assert_eq!(input(&h, "A4"), "=SUM(A1:A3)");
|
||||
h.state_mut().session.execute("selection.set", json!({"cell": "B4"})).unwrap();
|
||||
click(&mut h, "AutoSum options");
|
||||
@@ -143,6 +147,9 @@ fn autosum_runs_sum_and_its_arrow_opens_the_shared_menu() {
|
||||
h.get_by_label(item);
|
||||
}
|
||||
click(&mut h, "Count Numbers");
|
||||
assert_eq!(editor_text(&h).as_deref(), Some("=COUNT(B1:B3)"));
|
||||
h.key_press(Key::Enter);
|
||||
h.run_steps(2);
|
||||
assert_eq!(input(&h, "B4"), "=COUNT(B1:B3)");
|
||||
click(&mut h, "AutoSum options");
|
||||
click(&mut h, "More Functions…");
|
||||
|
||||
@@ -418,9 +418,10 @@ fn alt_equals_autosum_does_not_also_type_the_equals_sign() {
|
||||
for (selected, cell, formula) in [("A4", "A4", "=SUM(A1:A3)"), ("C3", "C3", "=SUM(A3:B3)"), ("A1:B3", "B4", "=SUM(B1:B3)")] {
|
||||
let mut h = harness(book(selected));
|
||||
alt_equals(&mut h);
|
||||
assert_eq!(input(&h, cell), formula, "Alt+= on {selected}");
|
||||
assert!(h.state().editor.is_none(), "Alt+= on {selected} started an edit");
|
||||
// Enter moves on: there is no stray `=` edit to commit.
|
||||
// One cell: the formula waits in the editor for Enter, as in Excel (#1834); a block gets
|
||||
// its totals at once. Either way without a stray `=`.
|
||||
let editing = h.state().editor.as_ref().map(|e| e.text.clone());
|
||||
assert_eq!(editing.as_deref(), (!selected.contains(':')).then_some(formula), "Alt+= on {selected}");
|
||||
key(&mut h, Key::Enter, Modifiers::NONE);
|
||||
assert!(h.state().message.is_none(), "Alt+= on {selected}: {:?}", h.state().message);
|
||||
assert_eq!(input(&h, cell), formula);
|
||||
|
||||
@@ -11,6 +11,7 @@ mod active_row_highlight;
|
||||
mod advanced_filter;
|
||||
mod argument_names;
|
||||
mod autosave_persist;
|
||||
mod autosum_edit;
|
||||
mod borders;
|
||||
mod cell_editor_caret;
|
||||
mod cell_pictures;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# UI parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (Quick Analysis, Ctrl+Q (#791); earlier: validation list rows keep to their slot height whatever the font, and the "More entries not shown" note is translated; earlier: the searched validation list shows its eight rows, keeps the highlight in view and opens above a cell near the bottom of the window; earlier: the dropdown arrow's full list reads its source once within the same budget, draws only its visible rows and shows eight of them; earlier: a searched validation list reads at most 200,000 cells of its source; earlier: Find and Replace keeps workbook Undo/Redo available while a button has keyboard focus; text fields keep their own Undo; earlier: punctuation shortcuts follow the keyboard layout's characters; earlier: preserve centered emoji and symbol fallback placement; earlier: preserve leading and trailing blank cell lines; earlier: align wrapped and unwrapped cells; earlier: CJK title baseline regression and mixed-script rendering validation; earlier: form controls: buttons, sliders and spin buttons on the sheet; earlier: Highlight the active cell's row, a global preference in File › Options › General; earlier: a linked cell's menu edits, opens or removes the link; earlier: Display options for this workbook: sheet tabs and scroll bars; earlier: dragging over row or column headers in point mode extends the reference; earlier: a picture on the system clipboard pastes as a floating picture at the active cell with Cmd/Ctrl+V or Paste (#699); earlier: frozen columns keep their text, gridlines and merged borders whole while the sheet scrolls (#2544); earlier: every Paste Special option has its access key; earlier: the Draw tab's live stroke preview uses the pen's colour and thickness; earlier: copy quotes only cells with a tab or line break, as Excel does; earlier: Ctrl+. Next Corner of Selection; earlier: dragging the selection's border onto data asks before replacing it; earlier: RefEdit reference boxes in dialogs: Goal Seek, Solver and Data Analysis use them, the arrow keys select while a dialog is collapsed and F4 cycles a reference's anchors; earlier: Python cells: Python mode in the formula bar; earlier: Insert › Equation and the equation editor; earlier: every floating object selects, resizes from eight handles and deletes with the keyboard; earlier: Formulas › Error Checking › Trace Error; trace arrows stay through a zoom (#3097); earlier: Page Setup sets the page order, Down, then over or Over, then down, which printing, the print preview, Page Break Preview and Page Layout view follow; earlier: Formulas › Function Library as labelled buttons with category menus; Recently Used and the Insert Function categories; Esc leaves a File-page text field before closing the view; earlier: checkbox cells print as boxes; Ctrl+arrow and Ctrl+Shift+arrow while pointing a formula reference; editing a hyperlink loads its existing fields; AutoSum over a selected row puts its total to the right; ribbon catalog count 276 / 292; earlier: typing into a cell with a list validation searches its dropdown; Enter/Tab take the highlighted entry) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (AutoSum on one cell proposes its range in the editor, #1834; earlier: Quick Analysis, Ctrl+Q (#791); earlier: validation list rows keep to their slot height whatever the font, and the "More entries not shown" note is translated; earlier: the searched validation list shows its eight rows, keeps the highlight in view and opens above a cell near the bottom of the window; earlier: the dropdown arrow's full list reads its source once within the same budget, draws only its visible rows and shows eight of them; earlier: a searched validation list reads at most 200,000 cells of its source; earlier: Find and Replace keeps workbook Undo/Redo available while a button has keyboard focus; text fields keep their own Undo; earlier: punctuation shortcuts follow the keyboard layout's characters; earlier: preserve centered emoji and symbol fallback placement; earlier: preserve leading and trailing blank cell lines; earlier: align wrapped and unwrapped cells; earlier: CJK title baseline regression and mixed-script rendering validation; earlier: form controls: buttons, sliders and spin buttons on the sheet; earlier: Highlight the active cell's row, a global preference in File › Options › General; earlier: a linked cell's menu edits, opens or removes the link; earlier: Display options for this workbook: sheet tabs and scroll bars; earlier: dragging over row or column headers in point mode extends the reference; earlier: a picture on the system clipboard pastes as a floating picture at the active cell with Cmd/Ctrl+V or Paste (#699); earlier: frozen columns keep their text, gridlines and merged borders whole while the sheet scrolls (#2544); earlier: every Paste Special option has its access key; earlier: the Draw tab's live stroke preview uses the pen's colour and thickness; earlier: copy quotes only cells with a tab or line break, as Excel does; earlier: Ctrl+. Next Corner of Selection; earlier: dragging the selection's border onto data asks before replacing it; earlier: RefEdit reference boxes in dialogs: Goal Seek, Solver and Data Analysis use them, the arrow keys select while a dialog is collapsed and F4 cycles a reference's anchors; earlier: Python cells: Python mode in the formula bar; earlier: Insert › Equation and the equation editor; earlier: every floating object selects, resizes from eight handles and deletes with the keyboard; earlier: Formulas › Error Checking › Trace Error; trace arrows stay through a zoom (#3097); earlier: Page Setup sets the page order, Down, then over or Over, then down, which printing, the print preview, Page Break Preview and Page Layout view follow; earlier: Formulas › Function Library as labelled buttons with category menus; Recently Used and the Insert Function categories; Esc leaves a File-page text field before closing the view; earlier: checkbox cells print as boxes; Ctrl+arrow and Ctrl+Shift+arrow while pointing a formula reference; editing a hyperlink loads its existing fields; AutoSum over a selected row puts its total to the right; ribbon catalog count 276 / 292; earlier: typing into a cell with a list validation searches its dropdown; Enter/Tab take the highlighted entry) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4
|
||||
|
||||
Interaction, controls and feel, against Excel. Part of [target-app-parity.md](target-app-parity.md).
|
||||
**UI/UX fidelity: ~55% ready, 50–80 h** (estimated). Ribbon command coverage is measured
|
||||
@@ -60,9 +60,8 @@ this logic, with one undo step.
|
||||
| Fill handle: drag to fill series, double-click to fill down, right-drag menu | fill done (Ctrl+drag swaps copy and series; month patterns use the workbook's 1900 or 1904 date system); right-drag menu partial: Copy Cells, Fill Series, Fill Formatting Only, Fill Without Formatting, and from a date Fill Days, Fill Weekdays, Fill Months and Fill Years, then Series…; a left-drag leaves an Auto Fill Options button with the same fill choices (gone once the workbook changes or the selection moves); Linear/Growth Trend and Flash Fill missing |
|
||||
| Drag-move and drag-copy cells (border drag, Ctrl/Option, Shift to insert) | border drag moves (M3) and asks "There's already data here. Do you want to replace it?" before replacing cells that hold data (`range.move`, #3136); Ctrl/Option to copy and Shift to insert are not wired to the border drag yet (reorder whole columns by their headers instead) |
|
||||
| In-cell editing, Enter/Tab movement, Alt/Option+Enter line breaks | done |
|
||||
| Point mode (click/drag/arrow references), reference colouring, F4 | done; dragging over row or column headers points at whole rows or columns (`A:C`, `2:5`); Command/Ctrl-click adds separate arguments with the edit's locale separator, and Shift-click extends the current reference from a fixed anchor on the same sheet. Pointer-event regressions cover repeated/reversed selections, manual separators, sheet switches and keyboard continuation. |
|
||||
| Point mode (click/drag/arrow references), reference colouring, F4 | done; dragging over row or column headers points at whole rows or columns (`A:C`, `2:5`); Command/Ctrl-click adds separate arguments with the edit's locale separator, and Shift-click extends the current reference from a fixed anchor on the same sheet. Pointer-event regressions cover repeated/reversed selections, manual separators, sheet switches and keyboard continuation. AutoSum on one cell leaves its proposed range pointed and selected (#1834) |
|
||||
| Number-format colors (`[Green]`, `[Color1]`–`[Color56]`) | Rendered in grid and PDF from shared RGB mappings (#1452) |
|
||||
| Point mode (click/drag/arrow references), reference colouring, F4 | done |
|
||||
| AutoComplete in columns, function autocomplete and argument tips | done; cell helpers clip to the worksheet and hide when the editor scrolls out (#200) |
|
||||
| Searchable data validation dropdown (typing filters the in-cell list) | done (10-21): entries with a word starting with the typed text, ignoring case and the accents of Latin letters (é, ç, ß, ł, ș, ǎ, Vietnamese ộ: Latin-1, Latin Extended-A and -B, Latin Extended Additional; other scripts keep their marks), in list order; Up/Down highlight, Enter/Tab/Ctrl+Enter/click commit the highlighted entry as the list spells it (other commits, such as clicking another cell, keep the typed text), Escape hides the list then cancels; `data.validationList {cell, search?}` gives agents the same search. The search reads at most 200,000 cells of the list's source and keeps at most 10,000 matches; past either, `truncated` is set and the popup says more entries aren't shown (validation itself still checks the whole list). Fuzzy matching isn't offered (Excel doesn't either); behaviour follows the documented Excel 365 feature, not yet measured against the app |
|
||||
| Header resize and double-click AutoFit | done (#42, #88 for header dividers) |
|
||||
@@ -271,6 +270,7 @@ scrollbar bugs 2–4 · pixel/feel pass against observed Excel 7–12.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-19 | minor | AutoSum from the ribbon or keyboard on one cell proposes `=SUM(range)` in the editor instead of entering it, with the range pointed and selected: a click, drag, arrow key or typing replaces it and Enter enters it, as in Excel. With nothing to sum the caret waits inside `=SUM()`. A block still gets its totals at once, and programmatic `formulas.autoSum` is unchanged (#1834) |
|
||||
| 2026-11-15 | minor | The rows of both validation list popups are drawn in slots of exactly the row height the popup scrolls by, so a font whose text is laid out a pixel taller than its nominal line height no longer pushes the last visible row under the "More entries not shown" note (seen with the pinned test fonts, not with the fonts of a desktop install). That note is translated in all 18 interface catalogs, and the validation-list UI tests run on the pinned font set |
|
||||
| 2026-11-14 | minor | The searched validation list measures its rows at their real height, like the dropdown arrow's list: it shows eight rows instead of six, the highlighted row stays in view and the last entries of a long list can be reached. It opens above the cell when it would run past the bottom of the window, measures its width once per search instead of every frame, and its "More entries not shown" note goes through the interface translations. Typing over the open dropdown drops the entries the dropdown had read |
|
||||
| 2026-11-13 | minor | The full list the dropdown arrow (or Alt+Down) opens reads its source once while it stays open, within the same 200,000-cell budget, and draws only the rows in view, so a list over a huge column no longer rereads and redraws every entry each frame; it says when entries aren't shown, and its rows are measured at their real height so eight show, as intended |
|
||||
|
||||
Reference in new issue
Block a user