Prefill the Remove Duplicates range from the selection (#1388)

This commit is contained in:
TheRenegadeDev
2026-10-16 20:35:01 -05:00
parent f1894c6da6
commit 5627d2b6bf
2 changed files with 22 additions and 3 deletions
+20 -2
View File
@@ -434,8 +434,12 @@ impl Dialog {
"removeDuplicates",
"Remove Duplicates",
"data.removeDuplicates",
vec![Check { key: "header", label: "My data has headers" }, Text { key: "columnsText", label: "Columns (blank = all, e.g. A,C):" }],
json!({"header": true}),
vec![
Text { key: "range", label: "Range:" },
Check { key: "header", label: "My data has headers" },
Text { key: "columnsText", label: "Columns (blank = all, e.g. A,C):" },
],
json!({"range": sel, "header": true}),
),
"goalSeek" => Dialog::custom("goalSeek", "Goal Seek", json!({"set": active, "to": "0", "changing": ""})),
"forecastSheet" => Dialog::form(
@@ -2711,6 +2715,20 @@ mod data_validation_tests {
mod tests {
use super::*;
#[test]
fn remove_duplicates_prefills_the_selection_and_submits_the_edited_range() {
let mut session = gridcraft_engine::Session::default();
session.new_workbook();
session.execute("selection.set", json!({"range": "B2:C5"})).unwrap();
let mut app = SheetApp::new(session, Default::default());
let mut dialog = Dialog::open(&mut app, "removeDuplicates", json!({})).unwrap();
assert_eq!(dialog.values.get("range"), Some(&json!("B2:C5")));
assert!(dialog.fields.iter().any(|field| matches!(field, Field::Text { key: "range", .. })));
assert_eq!(build_params(&dialog)["range"], "B2:C5");
dialog.set_value("range", json!("D2:E6"));
assert_eq!(build_params(&dialog)["range"], "D2:E6");
}
#[test]
fn data_validation_opens_on_the_rule_of_the_active_cell() {
let mut session = gridcraft_engine::Session::default();
+2 -1
View File
@@ -1,6 +1,6 @@
# UI parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-13 · **Change:** minor (horizontal scrollbar in the sheet tab bar, #840) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-16 · **Change:** minor (Remove Duplicates range prefill, #1388) · **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
@@ -161,6 +161,7 @@ scrollbar bugs 2–4 · pixel/feel pass against observed Excel 7–12.
| Date | Change | Summary |
|---|---|---|
| 2026-10-16 | minor | Remove Duplicates shows an editable Range field initialized from the selection and passes it to the engine on OK (#1388). Live range-picking outside the dialog remains unsupported |
| 2026-10-12 | minor | The File view's recent list tells when each workbook was last changed, read off the UI thread |
| 2026-10-13 | minor | Horizontal scrollbar in the sheet tab bar: drag, track click pages, frozen columns excluded from the page (#840) |
| 2026-10-12 | minor | Ctrl+wheel zoom steps along a ladder of percentages about 20% apart that never skips 100%, gliding to each step with animations on, so a notch out undoes a notch in (it drifted: 100 → 122 → 101); Excel steps 15 points, see decisions.md |