diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index f81ea2f7f9..3d7a3334f5 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -872,6 +872,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ ("help.about", "About VectorCraft", "", "{}"), ("help.checkForUpdates", "Check for Updates…", "", "{}"), ("help.commandPalette", "Search Commands…", "Cmd+Shift+/", "{}"), + ( + "help.clearRecentCommands", + "Clear Recent Commands", + "", + "{} empty the recent picks of Help › Search Commands (the list an empty search shows and the Recent Commands list) and the saved list; a pick of it is not kept as a recent pick. Not enabled while no picks are saved", + ), ( "help.safeMode", "Safe Mode…", diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index bbbed1d8e0..185cc0139e 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -3197,6 +3197,7 @@ digits Malayalam Малаялам Recent Commands Последни команди No recent commands Няма последни команди Type to search commands, tools, panels and effects Въведете текст, за да търсите команди, инструменти, панели и ефекти + Clear Recent Commands Изчистване на последните команди Search Commands… Търсене на команди… Secondary Вторичен Section Symbol Символ за раздел diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 5e60dd12a1..293d663efd 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -4396,6 +4396,7 @@ font-technology Variable Varijabilni Recent Commands Nedavne naredbe No recent commands Nema nedavnih naredbi Type to search commands, tools, panels and effects Upišite za pretragu naredbi, alata, panela i efekata + Clear Recent Commands Očisti nedavne naredbe Dashed Line Isprekidana linija Panel menu Meni panela Unembed… Poništi ugrađivanje… diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 1d0245fd67..a2dc8aad5c 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -4126,6 +4126,7 @@ digits Malayalam Malaiàlam Recent Commands Ordres recents No recent commands No hi ha ordres recents Type to search commands, tools, panels and effects Escriviu per cercar ordres, eines, panells i efectes + Clear Recent Commands Esborra les ordres recents Search Commands… Cerca ordres… Search Fonts Folder Cerca a la carpeta de tipus de lletra Searching… Cercant… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 5b16e26687..caebc66c96 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -4501,6 +4501,7 @@ font-technology Variable Variabilní Recent Commands Nedávné příkazy No recent commands Žádné nedávné příkazy Type to search commands, tools, panels and effects Pište pro hledání příkazů, nástrojů, panelů a efektů + Clear Recent Commands Vymazat seznam nedávných příkazů Dashed Line Čárkovaná čára Panel menu Nabídka panelu Unembed… Zrušit vložení… diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 2dfcca0f61..3aa86d4c3a 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -6875,6 +6875,7 @@ font-technology Variable Variable Recent Commands Seneste kommandoer No recent commands Ingen seneste kommandoer Type to search commands, tools, panels and effects Skriv for at søge i kommandoer, værktøjer, paneler og effekter + Clear Recent Commands Ryd seneste kommandoer Dashed Line Stiplet linje Panel menu Panelmenu Unembed… Ophæv integrering… diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 614fe3fe9f..b9697751d6 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -3261,6 +3261,7 @@ digits Malayalam Malayalam Recent Commands Zuletzt verwendete Befehle No recent commands Keine zuletzt verwendeten Befehle Type to search commands, tools, panels and effects Tippen, um Befehle, Werkzeuge, Bedienfelder und Effekte zu suchen + Clear Recent Commands Liste der zuletzt verwendeten Befehle leeren Search Commands… Befehle suchen… Secondary Sekundär Section Symbol Paragrafenzeichen diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 7bd4d77f4a..e24b146f0b 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -3963,6 +3963,7 @@ digits Malayalam Μαλαγιάλαμ Recent Commands Πρόσφατες εντολές No recent commands Δεν υπάρχουν πρόσφατες εντολές Type to search commands, tools, panels and effects Πληκτρολογήστε για αναζήτηση εντολών, εργαλείων, πλαισίων και εφέ + Clear Recent Commands Εκκαθάριση πρόσφατων εντολών Search Commands… Αναζήτηση εντολών… Secondary Δευτερεύον Section Symbol Σύμβολο ενότητας diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 288039df8f..6b50da3695 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -3299,6 +3299,7 @@ digits Malayalam Malayálam Recent Commands Comandos recientes No recent commands No hay comandos recientes Type to search commands, tools, panels and effects Escriba para buscar comandos, herramientas, paneles y efectos + Clear Recent Commands Borrar comandos recientes Search Commands… Buscar comandos… Secondary Secundario Section Symbol Símbolo de sección diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 0fdd3cd69b..bca3a0144b 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -4420,6 +4420,7 @@ font-technology Variable Muuttuvat Recent Commands Viimeisimmät komennot No recent commands Ei viimeisimpiä komentoja Type to search commands, tools, panels and effects Kirjoita hakeaksesi komentoja, työkaluja, paneeleita ja tehosteita + Clear Recent Commands Tyhjennä viimeisimmät komennot Dashed Line Katkoviiva Panel menu Paneelivalikko Unembed… Poista upotus… diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index f123bdbd03..76a936aaa2 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3287,6 +3287,7 @@ digits Malayalam Malayalam Recent Commands Commandes récentes No recent commands Aucune commande récente Type to search commands, tools, panels and effects Tapez pour rechercher des commandes, des outils, des panneaux et des effets + Clear Recent Commands Effacer les commandes récentes Search Commands… Rechercher des commandes… Secondary Secondaire Section Symbol Symbole de section diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 645d913550..2ae7e476f8 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -3403,6 +3403,7 @@ No recent commands કોઈ તાજેતરના આદેશો નથી Type to search commands, tools, panels and effects આદેશો, ટૂલ્સ, પેનલ્સ અને ઇફેક્ટ્સ શોધવા માટે લખો Recent તાજેતરના + Clear Recent Commands તાજેતરના આદેશો સાફ કરો Search images છબીઓ શોધો Searching… શોધી રહ્યા છીએ… Secondary ગૌણ diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 7a7049ee97..eb76d366aa 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -4476,6 +4476,7 @@ antiAlias Sharp शार्प Recent Commands हाल के आदेश No recent commands कोई हाल का आदेश नहीं Type to search commands, tools, panels and effects आदेश, टूल, पैनल्स और इफ़ेक्ट्स खोजने के लिए टाइप करें + Clear Recent Commands हाल के आदेश साफ़ करें Search Commands… कमांड खोजें… Search Fonts Folder खोज फ़ॉन्ट फ़ोल्डर Search images इमेज खोजना diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index a22bfca5aa..b55ce1df00 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -3920,6 +3920,7 @@ mark-style Japanese Japán Recent Commands Legutóbbi parancsok No recent commands Nincsenek legutóbbi parancsok Type to search commands, tools, panels and effects Gépeljen parancsok, eszközök, panelek és effektusok kereséséhez + Clear Recent Commands Legutóbbi parancsok listájának törlése Search Commands… Parancsok keresése… Search Fonts Folder Keresés betűtípusmappában Searching… Keresés… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 3315f24c79..b3131e5184 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -4152,6 +4152,7 @@ font-technology Variable Variabel Recent Commands Perintah terbaru No recent commands Tidak ada perintah terbaru Type to search commands, tools, panels and effects Ketik untuk mencari perintah, alat, panel, dan efek + Clear Recent Commands Kosongkan perintah terbaru Dashed Line Garis putus-putus Panel menu Menu panel Unembed… Lepaskan sematan… diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 511ef30374..3b156423cc 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -3342,6 +3342,7 @@ digits Malayalam Malayalam Recent Commands Comandi recenti No recent commands Nessun comando recente Type to search commands, tools, panels and effects Digita per cercare comandi, strumenti, pannelli ed effetti + Clear Recent Commands Cancella comandi recenti Search Commands… Cerca comandi… Secondary Secondario Section Symbol Simbolo di sezione diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index ab8fcf8be4..c34779057f 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -3220,6 +3220,7 @@ mark-style Japanese 日本式 Recent Commands 最近使ったコマンド No recent commands 最近使ったコマンドはありません Type to search commands, tools, panels and effects 入力してコマンド、ツール、パネル、効果を検索 + Clear Recent Commands 最近使ったコマンドを消去 Secondary セカンダリ Select All Art on Layer レイヤー上のすべてのアートを選択 Select All Assets すべてのアセットを選択 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 26f82167bc..22b6fca3e5 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -6104,6 +6104,7 @@ font-technology Variable ცვლადი Recent Commands ბოლო ბრძანებები No recent commands ბოლო ბრძანებები არ არის Type to search commands, tools, panels and effects აკრიფეთ ბრძანებების, ხელსაწყოების, პანელებისა და ეფექტების მოსაძებნად + Clear Recent Commands ბოლო ბრძანებების სიის გასუფთავება Dashed Line ტირეებიანი ხაზი Panel menu პანელის მენიუ Unembed… ჩაშენების მოხსნა… diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 347b0acb7d..70108f5747 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -3209,6 +3209,7 @@ mark-style Japanese 일본식 Recent Commands 최근 명령 No recent commands 최근 명령 없음 Type to search commands, tools, panels and effects 입력하여 명령, 도구, 패널 및 효과 검색 + Clear Recent Commands 최근 명령 목록 지우기 Secondary 보조 Select All Art on Layer 레이어의 모든 아트웍 선택 Select All Assets 모든 에셋 선택 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 191ded853f..8c47972cd4 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -4769,6 +4769,7 @@ font-technology Variable Variabel Recent Commands Recente opdrachten No recent commands Geen recente opdrachten Type to search commands, tools, panels and effects Typ om opdrachten, gereedschappen, panelen en effecten te zoeken + Clear Recent Commands Recente opdrachten wissen Dashed Line Streepjeslijn Panel menu Paneelmenu Unembed… Insluiten ongedaan maken… diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index cde2a77dad..3ebfc4b5ee 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -4342,6 +4342,7 @@ font-technology Variable Zmienne Recent Commands Ostatnie polecenia No recent commands Brak ostatnich poleceń Type to search commands, tools, panels and effects Pisz, aby szukać poleceń, narzędzi, paneli i efektów + Clear Recent Commands Wyczyść listę ostatnich poleceń Dashed Line Linia przerywana Panel menu Menu panelu Unembed… Wyodrębnij… diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 640e7a76be..9fa54c2cfa 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -2758,6 +2758,7 @@ digits Malayalam Malaiala Recent Commands Comandos recentes No recent commands Nenhum comando recente Type to search commands, tools, panels and effects Digite para pesquisar comandos, ferramentas, painéis e efeitos + Clear Recent Commands Limpar Comandos Recentes Secondary Secundária Section Symbol Símbolo de Seção Select Selecionar diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 0dbdf2b0a1..c1027f4374 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3331,6 +3331,7 @@ digits Malayalam Малаялам Recent Commands Недавние команды No recent commands Нет недавних команд Type to search commands, tools, panels and effects Начните вводить для поиска команд, инструментов, панелей и эффектов + Clear Recent Commands Очистить список недавних команд Search Commands… Поиск команд… Secondary Вторичный Section Symbol Символ параграфа diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index ca58813532..c66e77739c 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -3217,6 +3217,7 @@ digits Malayalam Malayalam Recent Commands Senaste kommandon No recent commands Inga senaste kommandon Type to search commands, tools, panels and effects Skriv för att söka efter kommandon, verktyg, paneler och effekter + Clear Recent Commands Rensa senaste kommandon Search Commands… Sök kommandon… Secondary Sekundär Section Symbol Paragraftecken diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 7be721f903..5d83114db3 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -3089,6 +3089,7 @@ digits Malayalam Malayalam Recent Commands Son komutlar No recent commands Son komut yok Type to search commands, tools, panels and effects Komutları, araçları, panelleri ve efektleri aramak için yazın + Clear Recent Commands Son Komutları Temizle Search Commands… Arama Komutları… Secondary İkincil Section Symbol Bölüm Sembolü diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 9b138474ff..fec26087f1 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3334,6 +3334,7 @@ digits Malayalam Малаялам Recent Commands Нещодавні команди No recent commands Немає нещодавніх команд Type to search commands, tools, panels and effects Почніть вводити для пошуку команд, інструментів, панелей та ефектів + Clear Recent Commands Очистити список нещодавніх команд Search Commands… Пошук команд… Secondary Вторинний Section Symbol Символ параграфа diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 30893b6db6..ab107a6c0a 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -3677,6 +3677,7 @@ mark-style Japanese Kiểu Nhật Recent Commands Lệnh gần đây No recent commands Không có lệnh gần đây Type to search commands, tools, panels and effects Nhập để tìm kiếm lệnh, công cụ, bảng và hiệu ứng + Clear Recent Commands Xóa lệnh gần đây Search Commands… Tìm kiếm lệnh… Search Fonts Folder Tìm kiếm thư mục phông chữ Searching… Đang tìm kiếm… diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index b60cec37c0..918febb3e4 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -3161,6 +3161,7 @@ digits Malayalam 马拉雅拉姆数字 Recent Commands 最近使用的命令 No recent commands 没有最近使用的命令 Type to search commands, tools, panels and effects 输入以搜索命令、工具、面板和效果 + Clear Recent Commands 清除最近使用的命令 Search Commands… 搜索命令… Secondary 次要 Section Symbol 章节符号 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 47c45d01a5..8d058c01e7 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -4467,6 +4467,7 @@ digits Malayalam 馬來亞拉姆數字 Recent Commands 最近使用的指令 No recent commands 沒有最近使用的指令 Type to search commands, tools, panels and effects 輸入以搜尋指令、工具、面板與效果 + Clear Recent Commands 清除最近使用的指令 Search Commands… 搜尋指令… Secondary 次要 Section Symbol 章節符號 diff --git a/crates/ui-egui/src/menus/run.rs b/crates/ui-egui/src/menus/run.rs index b4e1c668ac..53527601bb 100644 --- a/crates/ui-egui/src/menus/run.rs +++ b/crates/ui-egui/src/menus/run.rs @@ -733,6 +733,11 @@ fn run_ui_part7(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option { + app.ui.recent_commands.clear(); + Ok(Value::Null) + } // Closing asks Save / Don't Save / Cancel for modified documents first (`unsaved`). // Without an `index`, the current window closes: one of several views of a document closes // without closing the document (Window › New Window). diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index d4dda4698b..bd4417aea9 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -249,6 +249,7 @@ pub fn enabled(app: &VectorcraftApp, id: &str) -> bool { "view.rotateToSelection" | crate::addons::arrange::ZOOM => app.session.active().is_some_and(|d| !d.selection.objects.is_empty()), id if id.starts_with("file.openRecent") => recent_slot(app, id).is_some(), "file.clearRecent" => !app.ui.recent_files.is_empty(), + "help.clearRecentCommands" => !app.ui.recent_commands.is_empty(), id if id.starts_with("type.recentFont") => { id["type.recentFont".len()..].parse::().is_ok_and(|n| n >= 1 && n <= app.recent_fonts().len()) && app.session.active().is_some() } diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index 2b285c704b..44f333cf41 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -873,6 +873,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ ("help.about", "About VectorCraft", "", "{}"), ("help.checkForUpdates", "Check for Updates…", "", "{}"), ("help.commandPalette", "Search Commands…", "Cmd+Shift+/", "{}"), + ( + "help.clearRecentCommands", + "Clear Recent Commands", + "", + "{} empty the recent picks of Help › Search Commands (the list an empty search shows and the Recent Commands list) and the saved list; a pick of it is not kept as a recent pick. Not enabled while no picks are saved", + ), ( "help.safeMode", "Safe Mode…", diff --git a/crates/ui-egui/src/palette.rs b/crates/ui-egui/src/palette.rs index f0cf139db4..b0b56cb09d 100644 --- a/crates/ui-egui/src/palette.rs +++ b/crates/ui-egui/src/palette.rs @@ -1911,6 +1911,41 @@ mod tests { assert_eq!(open.app.ui.recent_commands, ["paint.swap", "object.group"]); } + /// A pick of Clear Recent Commands empties the recent picks without keeping itself, so the + /// empty search then says what to type, and the saved UI state holds an empty list. + #[test] + fn clear_recent_commands_empties_the_recent_picks() { + const CLEAR: &str = "help.clearRecentCommands"; + let mut open = Open::new("clear recent commands", WINDOW); + open.app.ui.recent_commands = vec!["paint.swap".into(), "object.group".into()]; + assert!(menus::enabled(&open.app, CLEAR)); + let k = open.listed().iter().position(|id| id == CLEAR).expect("the command's result"); + open.frame(vec![]); + open.press(egui::Key::ArrowDown, k); + assert_eq!(open.highlighted(), k); + open.press(egui::Key::Enter, 1); + assert!(!open.app.ui.palette_open, "the palette closes"); + assert!(open.app.ui.recent_commands.is_empty(), "{:?}", open.app.ui.recent_commands); + assert!(!menus::enabled(&open.app, CLEAR), "not enabled with nothing to clear"); + let saved: serde_json::Value = serde_json::to_value(&open.app.ui).unwrap(); + assert_eq!(saved["recent_commands"], serde_json::json!([])); + open.app.ui.palette_query.clear(); + open.app.ui.palette_open = true; + let nodes = open.frame(vec![]); + assert!(rows(&nodes).is_empty(), "{:?}", rows(&nodes)); + let labels = labels(&nodes); + assert!(labels.iter().any(|l| l == tl!("Type to search commands, tools, panels and effects")), "{labels:?}"); + // Run as a command, it empties the list too. + open.app.ui.recent_commands = vec!["paint.swap".into()]; + open.app.run(CLEAR, serde_json::json!({})).unwrap(); + assert!(open.app.ui.recent_commands.is_empty()); + // A saved id the list leaves out (a plug-in that is not loaded) still counts, and is cleared. + open.app.ui.recent_commands = vec!["plugin.notLoaded.filter".into()]; + assert!(menus::enabled(&open.app, CLEAR)); + open.app.run(CLEAR, serde_json::json!({})).unwrap(); + assert!(open.app.ui.recent_commands.is_empty()); + } + /// The palette opens again with its first row highlighted, even when it shows the same rows. #[test] fn the_palette_opens_again_with_its_first_row_highlighted() { diff --git a/docs/mcp.md b/docs/mcp.md index 044b452de5..b20661a3e9 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3136,6 +3136,15 @@ enabled while the document has a saved view. In the desktop app the views are li checked when it opens: past 25, blank or repeated names, and views without a finite centre and a positive zoom are dropped. +## Recent commands + +Help › Search Commands… keeps the last commands, tools, panels and effects picked from it, most recent first: an +empty search lists them, and so does the Recent Commands list beside the search field. The desktop app saves the ids +with the UI state. `help.clearRecentCommands {}` (Clear Recent Commands) empties the list and the saved ids, and +returns `null`. A pick of it in the search is not kept as a recent pick. It is a UI command, so it needs the desktop +app (`--connect`); `command_list` gives it `enabled: false` while no ids are saved. Saved ids the list leaves out, such as those of a +plug-in that is not loaded, count as saved and are cleared with the rest. + ## Navigator panel options The Navigator panel menu's Panel Options… opens the `navigatorPanelOptions` dialog (fields `color`, `solidDashes`), diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 350ce60226..faf5b575fd 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1026,6 +1026,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Perspective Distort and Free Distort (`object.distort`) turn each warped object's bounding box as the warp turns the object at its own center, the objects inside groups, compound paths and clip groups and the art of linked opacity masks included, so the next Selection or Free Transform drag uses the tilted box; Object › Transform › Reset Bounding Box squares it again, and corners left where they are add no undo step (VectorCraft's own rule; `bboxrotate::distort_turns_an_upright_box_with_the_warp_at_its_center`, `distort_turns_each_member_and_linked_mask_by_its_own_warp`, `mirrored_and_collapsing_distorts_keep_valid_angles`, `distort_angles_undo_redo_and_reopen_together`, `xform::unchanged_distort_records_no_history`). - The Free Transform widget's Constrain works in Free Distort as well as in Free Transform ([the help page](https://helpx.adobe.com/illustrator/using/tool-techniques/free-transform-tool.html)). With Constrain on, or Shift held, a corner dragged in Free Distort moves only along the line through the opposite corner, in the box's own proportions, and the other three corners stay in place; on a turned box the line runs through the box's own corners. The line is VectorCraft's own rule. Cmd/Ctrl+Alt+Shift on a corner still drags in Perspective Distort, where Constrain stays unavailable (tools `xform::free::tests::free_distort_corner_keeps_to_its_diagonal_with_shift_or_constrain`, `shift_pressed_during_a_free_distort_drag_constrains_it`, `a_turned_box_is_constrained_along_its_own_diagonal`, `along_diagonal_of_a_degenerate_box`; engine `xform::free_transform_constrained_distort_keeps_the_corner_on_its_diagonal`; ui-egui `free_transform::tests::the_widget_sets_the_mode_and_a_corner_drag_then_distorts`). - Native macOS menu bar, vector tool cursors, a command palette (Help › Search Commands…), middle-button panning with any tool. Native menus explicitly end tracking on command selection, outside window presses and Escape; menu updates wait until tracking ends, and a dismissing press never starts a canvas gesture (M14.8). + - Clear Recent Commands (`help.clearRecentCommands`), found through Help › Search Commands…, empties the Recent Commands list, the list an empty search shows and the saved list. A pick of it is not kept as a recent pick. This is VectorCraft's own behavior (`palette` test `clear_recent_commands_empties_the_recent_picks`). - A Recent Commands button beside the Help › Search Commands field lists the last eight commands and tools picked from the palette, most recent first, with a command picked again moved to the top. A pick is recorded when it runs or opens a dialog, even if the dialog is then canceled; a pick that is refused because its menu item is dimmed, its tool can't be chosen or its panel can't be shown is not recorded, unless it opened a dialog. Choosing a row closes the palette and runs it as a pick of the same result does; with no picks yet the list shows a dimmed No recent commands row, and a command that is not available now, such as a filter of a plug-in that is not loaded, is left out until it comes back. The ids are saved with the UI state. While the list is open, Up and Down move through its rows, wrapping at the ends, and Escape closes the list before the palette. This is VectorCraft's own addition and does not raise a score (#6376; `palette` tests `recent_commands_*`, `a_recent_command_runs_what_its_pick_runs`, `the_keys_wrap_within_recent_commands`, `escape_closes_recent_commands_before_the_palette`). - With an empty search, or one of spaces only, the Help › Search Commands field lists the picks of the Recent Commands list (at most eight, leaving out a filter of a plug-in that is not loaded) under a Recent heading, most recent first, with the first highlighted and no result count, so opening the palette and pressing Enter picks the last pick again; a pick that is dimmed now shows why in the status line, as from a search, and keeps its place in the list. With no picks yet it lists no results and shows a dimmed Type to search commands, tools, panels and effects line. A pick of Search Commands… itself is not recorded. The palette opens with its first result highlighted and its list scrolled to the top. This is VectorCraft's own behavior (`palette` tests `an_empty_search_lists_the_recent_picks_most_recent_first`, `an_empty_search_without_picks_says_what_to_type`, `enter_on_an_empty_search_runs_the_last_pick_again`, `the_palette_opens_again_with_its_first_row_highlighted`, `the_palette_toggle_is_not_a_recent_pick`, `a_click_on_a_recent_pick_runs_it_and_moves_it_first`, `a_pick_says_whether_it_ran_opened_a_dialog_or_was_refused`, `a_refused_pick_is_not_recorded`, `a_pick_that_opens_a_dialog_is_recorded_even_when_canceled`). - The Learn panel (Window › Learn, or Explore tutorials beside the search icon on the app bar) has a For you tab with a Get started section and a Quick skill guide card, and a Skills tab that lists VectorCraft's own skills with their progress rings and counts of tutorials finished; a skill lists its tutorials, a tutorial shows its numbered steps, and Back goes up a level; `learn.list`, `learn.tab {tab}`, `learn.skill {skill}`, `learn.show {tutorial}` and `learn.back` script it, and the tab buttons, the rows and Back run them ([the help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/learn-skills-quick-skill-guide.html); `panels::learn::tests`).