Merge feat/palette-empty-search-recent into feat/palette-recent-rank

This commit is contained in:
dotCooCoo committed 2026-11-16 16:19:34 -08:00
commit c1266a96ea
31 files changed
+312 -52

No files matched your search

+1
View File
@@ -3196,6 +3196,7 @@ digits Malayalam Малаялам
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} от {n} резултат. Продължете да пишете, за да ги стесните.|{shown} от {n} резултата. Продължете да пишете, за да ги стесните.
Recent Commands Последни команди
No recent commands Няма последни команди
Type to search commands, tools, panels and effects Въведете текст, за да търсите команди, инструменти, панели и ефекти
Search Commands… Търсене на команди…
Secondary Вторичен
Section Symbol Символ за раздел
Can't render this file because it is too large.
+1
View File
@@ -4395,6 +4395,7 @@ font-technology Variable Varijabilni
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} od {n} rezultata. Nastavite kucati da ih suzite.|{shown} od {n} rezultata. Nastavite kucati da ih suzite.|{shown} od {n} rezultata. Nastavite kucati da ih suzite.
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
Dashed Line Isprekidana linija
Panel menu Meni panela
Unembed… Poništi ugrađivanje…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4125,6 +4125,7 @@ digits Malayalam Malaiàlam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultat. Continueu escrivint per reduir-los.|{shown} de {n} resultats. Continueu escrivint per reduir-los.
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
Search Commands… Cerca ordres…
Search Fonts Folder Cerca a la carpeta de tipus de lletra
Searching… Cercant…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4500,6 +4500,7 @@ font-technology Variable Variabilní
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} z {n} výsledku. Pište dál a výsledky se zúží.|{shown} z {n} výsledků. Pište dál a výsledky se zúží.|{shown} z {n} výsledků. Pište dál a výsledky se zúží.
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ů
Dashed Line Čárkovaná čára
Panel menu Nabídka panelu
Unembed… Zrušit vložení…
Can't render this file because it is too large.
+1
View File
@@ -6874,6 +6874,7 @@ font-technology Variable Variable
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} af {n} resultat. Skriv videre for at indsnævre dem.|{shown} af {n} resultater. Skriv videre for at indsnævre dem.
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
Dashed Line Stiplet linje
Panel menu Panelmenu
Unembed… Ophæv integrering…
Can't render this file because it is too large.
+1
View File
@@ -3260,6 +3260,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} von {n} Ergebnis. Tippen Sie weiter, um sie einzugrenzen.|{shown} von {n} Ergebnissen. Tippen Sie weiter, um sie einzugrenzen.
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
Search Commands… Befehle suchen…
Secondary Sekundär
Section Symbol Paragrafenzeichen
Can't render this file because it is too large.
+1
View File
@@ -3962,6 +3962,7 @@ digits Malayalam Μαλαγιάλαμ
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} από {n} αποτέλεσμα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.|{shown} από {n} αποτελέσματα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.
Recent Commands Πρόσφατες εντολές
No recent commands Δεν υπάρχουν πρόσφατες εντολές
Type to search commands, tools, panels and effects Πληκτρολογήστε για αναζήτηση εντολών, εργαλείων, πλαισίων και εφέ
Search Commands… Αναζήτηση εντολών…
Secondary Δευτερεύον
Section Symbol Σύμβολο ενότητας
Can't render this file because it is too large.
+1
View File
@@ -3298,6 +3298,7 @@ digits Malayalam Malayálam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Sigue escribiendo para acotarlos.|{shown} de {n} resultados. Sigue escribiendo para acotarlos.
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
Search Commands… Buscar comandos…
Secondary Secundario
Section Symbol Símbolo de sección
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -4419,6 +4419,7 @@ font-technology Variable Muuttuvat
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown}/{n} tulosta. Kirjoita lisää rajataksesi tuloksia.|{shown}/{n} tulosta. Kirjoita lisää rajataksesi tuloksia.
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
Dashed Line Katkoviiva
Panel menu Paneelivalikko
Unembed… Poista upotus…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -3286,6 +3286,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} sur {n} résultat. Continuez à taper pour les affiner.|{shown} sur {n} résultats. Continuez à taper pour les affiner.
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
Search Commands… Rechercher des commandes…
Secondary Secondaire
Section Symbol Symbole de section
Can't render this file because it is too large.
+2
View File
@@ -3401,6 +3401,8 @@
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} માંથી {shown} પરિણામ. તેમને સંકુચિત કરવા લખતા રહો.|{n} માંથી {shown} પરિણામો. તેમને સંકુચિત કરવા લખતા રહો.
Recent Commands તાજેતરના આદેશો
No recent commands કોઈ તાજેતરના આદેશો નથી
Type to search commands, tools, panels and effects આદેશો, ટૂલ્સ, પેનલ્સ અને ઇફેક્ટ્સ શોધવા માટે લખો
Recent તાજેતરના
Search images છબીઓ શોધો
Searching… શોધી રહ્યા છીએ…
Secondary ગૌણ
Can't render this file because it contains an unexpected character in line 72 and column 5.
+1
View File
@@ -4475,6 +4475,7 @@ antiAlias Sharp शार्प
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।|{n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।
Recent Commands हाल के आदेश
No recent commands कोई हाल का आदेश नहीं
Type to search commands, tools, panels and effects आदेश, टूल, पैनल्स और इफ़ेक्ट्स खोजने के लिए टाइप करें
Search Commands… कमांड खोजें…
Search Fonts Folder खोज फ़ॉन्ट फ़ोल्डर
Search images इमेज खोजना
Can't render this file because it is too large.
+1
View File
@@ -3919,6 +3919,7 @@ mark-style Japanese Japán
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} találatból {shown} látható. Gépeljen tovább a szűkítéshez.
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
Search Commands… Parancsok keresése…
Search Fonts Folder Keresés betűtípusmappában
Searching… Keresés…
Can't render this file because it is too large.
+1
View File
@@ -4151,6 +4151,7 @@ font-technology Variable Variabel
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} dari {n} hasil. Terus ketik untuk mempersempitnya.
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
Dashed Line Garis putus-putus
Panel menu Menu panel
Unembed… Lepaskan sematan…
Can't render this file because it contains an unexpected character in line 2495 and column 5.
+1
View File
@@ -3341,6 +3341,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} di {n} risultato. Continua a digitare per restringerli.|{shown} di {n} risultati. Continua a digitare per restringerli.
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
Search Commands… Cerca comandi…
Secondary Secondario
Section Symbol Simbolo di sezione
Can't render this file because it is too large.
+1
View File
@@ -3219,6 +3219,7 @@ mark-style Japanese 日本式
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} 件中 {shown} 件。続けて入力すると絞り込めます。
Recent Commands 最近使ったコマンド
No recent commands 最近使ったコマンドはありません
Type to search commands, tools, panels and effects 入力してコマンド、ツール、パネル、効果を検索
Secondary セカンダリ
Select All Art on Layer レイヤー上のすべてのアートを選択
Select All Assets すべてのアセットを選択
Can't render this file because it is too large.
+1
View File
@@ -6103,6 +6103,7 @@ font-technology Variable ცვლადი
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} შედეგიდან {shown}. გააგრძელეთ აკრეფა მათ შესამცირებლად.
Recent Commands ბოლო ბრძანებები
No recent commands ბოლო ბრძანებები არ არის
Type to search commands, tools, panels and effects აკრიფეთ ბრძანებების, ხელსაწყოების, პანელებისა და ეფექტების მოსაძებნად
Dashed Line ტირეებიანი ხაზი
Panel menu პანელის მენიუ
Unembed… ჩაშენების მოხსნა…
Can't render this file because it is too large.
+1
View File
@@ -3208,6 +3208,7 @@ mark-style Japanese 일본식
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 결과 {n}개 중 {shown}개. 계속 입력하여 범위를 좁히세요.
Recent Commands 최근 명령
No recent commands 최근 명령 없음
Type to search commands, tools, panels and effects 입력하여 명령, 도구, 패널 및 효과 검색
Secondary 보조
Select All Art on Layer 레이어의 모든 아트웍 선택
Select All Assets 모든 에셋 선택
Can't render this file because it is too large.
+1
View File
@@ -4768,6 +4768,7 @@ font-technology Variable Variabel
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} van {n} resultaat. Typ verder om ze te beperken.|{shown} van {n} resultaten. Typ verder om ze te beperken.
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
Dashed Line Streepjeslijn
Panel menu Paneelmenu
Unembed… Insluiten ongedaan maken…
Can't render this file because it is too large.
+1
View File
@@ -4341,6 +4341,7 @@ font-technology Variable Zmienne
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} z {n} wyniku. Pisz dalej, aby je zawęzić.|{shown} z {n} wyników. Pisz dalej, aby je zawęzić.|{shown} z {n} wyników. Pisz dalej, aby je zawęzić.
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
Dashed Line Linia przerywana
Panel menu Menu panelu
Unembed… Wyodrębnij…
Can't render this file because it is too large.
+1
View File
@@ -2757,6 +2757,7 @@ digits Malayalam Malaiala
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Continue digitando para filtrá-los.|{shown} de {n} resultados. Continue digitando para filtrá-los.
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
Secondary Secundária
Section Symbol Símbolo de Seção
Select Selecionar
Can't render this file because it is too large.
+1
View File
@@ -3330,6 +3330,7 @@ digits Malayalam Малаялам
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} из {n} результата. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.
Recent Commands Недавние команды
No recent commands Нет недавних команд
Type to search commands, tools, panels and effects Начните вводить для поиска команд, инструментов, панелей и эффектов
Search Commands… Поиск команд…
Secondary Вторичный
Section Symbol Символ параграфа
Can't render this file because it is too large.
+1
View File
@@ -3216,6 +3216,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} av {n} resultat. Fortsätt skriva för att begränsa dem.|{shown} av {n} resultat. Fortsätt skriva för att begränsa dem.
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
Search Commands… Sök kommandon…
Secondary Sekundär
Section Symbol Paragraftecken
Can't render this file because it is too large.
+1
View File
@@ -3088,6 +3088,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} sonuçtan {shown} tanesi. Daraltmak için yazmaya devam edin.
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
Search Commands… Arama Komutları…
Secondary İkincil
Section Symbol Bölüm Sembolü
Can't render this file because it is too large.
+1
View File
@@ -3333,6 +3333,7 @@ digits Malayalam Малаялам
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} з {n} результату. Продовжуйте вводити, щоб звузити їх.|{shown} з {n} результатів. Продовжуйте вводити, щоб звузити їх.|{shown} з {n} результатів. Продовжуйте вводити, щоб звузити їх.
Recent Commands Нещодавні команди
No recent commands Немає нещодавніх команд
Type to search commands, tools, panels and effects Почніть вводити для пошуку команд, інструментів, панелей та ефектів
Search Commands… Пошук команд…
Secondary Вторинний
Section Symbol Символ параграфа
Can't render this file because it is too large.
+1
View File
@@ -3676,6 +3676,7 @@ mark-style Japanese Kiểu Nhật
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} trên {n} kết quả. Tiếp tục gõ để thu hẹp.
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
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…
Can't render this file because it contains an unexpected character in line 205 and column 5.
+1
View File
@@ -3160,6 +3160,7 @@ digits Malayalam 马拉雅拉姆数字
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 共 {n} 个结果,显示 {shown} 个。继续输入以缩小范围。
Recent Commands 最近使用的命令
No recent commands 没有最近使用的命令
Type to search commands, tools, panels and effects 输入以搜索命令、工具、面板和效果
Search Commands… 搜索命令…
Secondary 次要
Section Symbol 章节符号
Can't render this file because it is too large.
+1
View File
@@ -4466,6 +4466,7 @@ digits Malayalam 馬來亞拉姆數字
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 共 {n} 個結果,顯示 {shown} 個。繼續輸入以縮小範圍。
Recent Commands 最近使用的指令
No recent commands 沒有最近使用的指令
Type to search commands, tools, panels and effects 輸入以搜尋指令、工具、面板與效果
Search Commands… 搜尋指令…
Secondary 次要
Section Symbol 章節符號
Can't render this file because it is too large.
+254 -42
View File
@@ -404,39 +404,84 @@ fn build_in(lang: crate::i18n::Lang, native: bool) -> Vec<Entry> {
/// ([`crate::shortcut_editor::menu_target_now`]), so Clean Up… and Find and Replace… open their
/// dialogs. While that item is dimmed, no dialog opens and the status line says why the command
/// can't run. A panel's result shows the panel, and an effect's result runs what its Effect menu
/// item runs ([`crate::keymap::command_of`]).
pub(crate) fn run_pick(app: &mut VectorcraftApp, id: &str) {
if let Some(tool) = id.strip_prefix("tool:") {
app.select_tool(tool);
/// item runs ([`crate::keymap::command_of`]). Returns what the pick did.
pub(crate) fn run_pick(app: &mut VectorcraftApp, id: &str) -> Picked {
let had_dialog = app.ui.dialog.is_some();
let ran = if let Some(tool) = id.strip_prefix("tool:") {
match app.try_select_tool(tool) {
Ok(()) => true,
Err(e) => {
app.status(e);
false
}
}
} else if let Some(panel) = id.strip_prefix("panel:") {
// A panel that can be seen stays as it is, where `window.panel` would put an open flyout or
// a floating panel away. In Presentation Mode the pick fails and changes nothing, as
// `window.panel` does.
if app.ui.screen_mode >= 3 {
app.status("panels can't be shown in Presentation Mode");
false
} else if let Err(e) = crate::panel_docking::reveal_panel(app, panel) {
app.status(e);
false
} else {
true
}
} else if id.starts_with("plugin:") || id.starts_with("effect:") {
let command = crate::keymap::command_of(id);
let on = menus::enabled(app, &command.id);
// While the Effect menu dims the item (nothing selected), no dialog opens and the status
// line says why.
if id.starts_with("effect:") && !menus::enabled(app, &command.id) {
if id.starts_with("effect:") && !on {
if let Err(why) = crate::shortcut_editor::dimmed(app, &command.id) {
app.status(why);
}
} else {
menus::invoke(app, &command.id, command.params);
}
on
} else {
match crate::shortcut_editor::menu_target_now(app, id) {
Some(Ok((id, p))) => menus::invoke(app, &id, p),
Some(Err(why)) => app.status(why),
None => menus::invoke(app, id, json!({})),
Some(Ok((id, p))) => {
menus::invoke(app, &id, p);
true
}
Some(Err(why)) => {
app.status(why);
false
}
None => {
// The command is invoked while its menu item is dimmed too, and its own check
// reports why it can't run.
let on = menus::enabled(app, id);
menus::invoke(app, id, json!({}));
on
}
}
};
// A dimmed command that still opens its dialog counts as opening it.
if !had_dialog && app.ui.dialog.is_some() {
Picked::OpenedDialog
} else if ran {
Picked::Ran
} else {
Picked::Refused
}
}
/// What a pick of a palette result did ([`run_pick`]).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum Picked {
/// The command ran, the tool was chosen or the panel was shown.
Ran,
/// The pick opened a dialog, which may still be canceled.
OpenedDialog,
/// The pick's menu item is dimmed now, its tool can't be chosen or its panel can't be shown:
/// the status line says why.
Refused,
}
/// The entries the query `q` matches, best first ([`search::rank`]), with the picks that Recent
/// Commands lists for the ids `recent_ids` ([`recent`]) first among the entries that match as well.
/// The ranking of the last query is kept, so a frame that draws the same query with the same recent
@@ -544,11 +589,11 @@ fn nearest_in_view(sel: usize, offset: f32, view: f32, n: usize) -> usize {
/// and the highlighted result's id.
type Highlight = (usize, String, f32, f32, String);
/// How many picks the Recent Commands list beside the search field holds.
pub(crate) const MAX_RECENT_COMMANDS: usize = 5;
/// How many picks the Recent Commands list beside the search field, and an empty search, show.
pub(crate) const MAX_RECENT_COMMANDS: usize = 8;
/// How many ids the saved Recent Commands list holds at most, unavailable ones included.
const MAX_SAVED_RECENT_COMMANDS: usize = 4 * MAX_RECENT_COMMANDS;
const MAX_SAVED_RECENT_COMMANDS: usize = 20;
/// Puts `id` first in the Recent Commands ids `list`, removing its earlier place, and keeps the
/// newest [`MAX_RECENT_COMMANDS`] ids that are `known`. An id that is not `known` now (a plug-in
@@ -567,15 +612,25 @@ fn remember(list: &mut Vec<String>, id: &str, known: impl Fn(&str) -> bool) {
list.truncate(end.unwrap_or(list.len()).min(MAX_SAVED_RECENT_COMMANDS));
}
/// The command that opens and closes the palette. A pick of it is not recorded in Recent Commands:
/// as the first recent pick, Enter on an empty search would close the palette and open it again.
const PALETTE_TOGGLE: &str = "help.commandPalette";
/// The entries the Recent Commands list shows for the ids `ids`, most recent first. An id with no
/// entry (a removed plug-in) is skipped.
/// entry (a removed plug-in) and the palette's own toggle, saved before its picks were left out,
/// are skipped.
fn recent<'a>(entries: &'a [Entry], ids: &[String]) -> Vec<&'a Entry> {
recent_places(entries, ids).into_iter().filter_map(|i| entries.get(i)).collect()
}
/// The places in `entries` of the entries [`recent`] lists for the ids `ids`, most recent first.
fn recent_places(entries: &[Entry], ids: &[String]) -> Vec<usize> {
ids.iter().take(MAX_SAVED_RECENT_COMMANDS).filter_map(|id| entries.iter().position(|e| e.id == *id)).take(MAX_RECENT_COMMANDS).collect()
ids.iter()
.take(MAX_SAVED_RECENT_COMMANDS)
.filter(|id| *id != PALETTE_TOGGLE)
.filter_map(|id| entries.iter().position(|e| e.id == *id))
.take(MAX_RECENT_COMMANDS)
.collect()
}
/// The id of the Recent Commands list's popup.
@@ -751,12 +806,14 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
ui.ctx().data_mut(|d| d.insert_temp(field_id, r.id));
ui.add_space(6.0);
if empty && n > 0 {
ui.label(egui::RichText::new(tl!("Recent Commands")).color(t.text_dim));
ui.label(egui::RichText::new(tl!("Recent")).color(t.text_dim));
}
// The list shows as many rows as fit above the footer in the window, up to
// VISIBLE_ROWS; a page is that many rows.
let spacing = ui.spacing().item_spacing.y;
let footer_height = spacing + 6.0 + ui.text_style_height(&egui::TextStyle::Body) + f32::from(margin) + BOTTOM_GAP;
// Under the recent picks no footer line is drawn.
let footer_line = if empty { 0.0 } else { spacing + 6.0 + ui.text_style_height(&egui::TextStyle::Body) };
let footer_height = footer_line + f32::from(margin) + BOTTOM_GAP;
let room = screen.bottom() - footer_height - ui.cursor().top() - spacing;
let rows = ((room / ROW_HEIGHT).floor().max(1.0) as usize).min(VISIBLE_ROWS);
sel = moves.apply(sel, n, rows);
@@ -821,12 +878,14 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
}
});
}
// Under the recent picks no count is shown; with none, one dimmed line says so.
// Under the recent picks no count is shown; with none, one dimmed line says what a search
// finds.
if !empty {
ui.add_space(6.0);
ui.label(egui::RichText::new(footer(n, total)).color(t.text_dim));
} else if n == 0 {
ui.label(egui::RichText::new(tl!("No recent commands")).color(t.text_dim));
ui.add_space(6.0);
ui.label(egui::RichText::new(tl!("Type to search commands, tools, panels and effects")).color(t.text_dim));
}
if !list_open
&& !history_focused
@@ -864,8 +923,18 @@ pub fn show(app: &mut VectorcraftApp, ctx: &egui::Context) {
});
if let Some(id) = run {
app.ui.palette_open = false;
remember(&mut app.ui.recent_commands, &id, |c| entries.list.iter().any(|e| e.id == c));
run_pick(app, &id);
// A pick goes first in Recent Commands before it runs, and stays there when it ran or
// opened a dialog, even when the dialog is then canceled. A refused pick puts the list
// back as it was.
let before = (id != PALETTE_TOGGLE).then(|| app.ui.recent_commands.clone());
if before.is_some() {
remember(&mut app.ui.recent_commands, &id, |c| entries.list.iter().any(|e| e.id == c));
}
if run_pick(app, &id) == Picked::Refused
&& let Some(before) = before
{
app.ui.recent_commands = before;
}
} else if outside {
app.ui.palette_open = false;
}
@@ -1189,7 +1258,7 @@ mod tests {
}
assert_eq!(list, ["object.group", "paint.swap"]);
// A pick with Enter in the open palette is remembered.
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default());
let mut app = VectorcraftApp::new(vectorcraft_testkit::fixtures::Fixture::Multi.session(), crate::Services::default());
app.ui.recent_commands = list;
app.ui.palette_open = true;
app.ui.palette_query = "paint.swap".into();
@@ -1204,15 +1273,15 @@ mod tests {
assert_eq!(restored.recent_commands, app.ui.recent_commands);
}
/// #6376: Recent Commands keeps the last five picks.
/// Recent Commands keeps the last eight picks.
#[test]
fn recent_commands_keep_the_last_five_picks() {
fn recent_commands_keep_the_last_eight_picks() {
let mut list = vec![];
let ids = ["a", "b", "c", "d", "e", "f", "g"];
let ids = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"];
for id in ids {
remember(&mut list, id, |_| true);
}
assert_eq!(list, ["g", "f", "e", "d", "c"]);
assert_eq!(list, ["j", "i", "h", "g", "f", "e", "d", "c"]);
let entries = build(Lang::EN);
let many: Vec<String> = entries.iter().take(MAX_RECENT_COMMANDS + 2).map(|e| e.id.clone()).collect();
assert_eq!(recent(&entries, &many).len(), MAX_RECENT_COMMANDS);
@@ -1220,7 +1289,7 @@ mod tests {
/// #6376: a command that does not exist now, such as a plug-in's filter while the plug-in is
/// not loaded, is left out of Recent Commands. A pick keeps it in the saved list, so it shows
/// again when the command comes back; five other commands picked after it push it out.
/// again when the command comes back; eight other commands picked after it push it out.
#[test]
fn recent_commands_skip_ids_that_no_longer_exist() {
let entries = build(Lang::EN);
@@ -1231,13 +1300,14 @@ mod tests {
let mut list = saved;
remember(&mut list, "paint.swap", known);
assert_eq!(list, ["paint.swap", "plugin:test.UI.palette_removed", "object.group", "tool:no-such-tool"]);
let four: Vec<String> = entries.iter().filter(|e| e.id != "paint.swap" && e.id != "object.group").take(4).map(|e| e.id.clone()).collect();
for id in &four {
let others: Vec<String> =
entries.iter().filter(|e| e.id != "paint.swap" && e.id != "object.group").take(MAX_RECENT_COMMANDS - 1).map(|e| e.id.clone()).collect();
for id in &others {
remember(&mut list, id, known);
}
let expected: Vec<String> =
four.iter().rev().cloned().chain(["paint.swap".to_string(), "plugin:test.UI.palette_removed".to_string()]).collect();
assert_eq!(list, expected, "object.group, the sixth known id, and the ids after it go");
others.iter().rev().cloned().chain(["paint.swap".to_string(), "plugin:test.UI.palette_removed".to_string()]).collect();
assert_eq!(list, expected, "object.group, the ninth known id, and the ids after it go");
// Unavailable ids are capped too.
let mut list: Vec<String> = (0..50).map(|i| format!("plugin:test.UI.gone{i}")).collect();
remember(&mut list, "paint.swap", known);
@@ -1357,7 +1427,7 @@ mod tests {
/// result. Only the Recent Commands list takes them.
#[test]
fn another_popup_leaves_enter_to_the_palette() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default());
let mut app = VectorcraftApp::new(vectorcraft_testkit::fixtures::Fixture::Multi.session(), crate::Services::default());
app.ui.palette_open = true;
app.ui.palette_query = "paint.swap".into();
let first = build(crate::i18n::current()).into_iter().find(|e| e.haystack.contains("paint.swap")).unwrap().id;
@@ -1435,6 +1505,10 @@ mod tests {
fn a_recent_pick_ranks_first_among_results_that_match_as_well() {
let (tool, effect) = ("tool:rectangle", "effect:convertToShape.rectangle");
let mut open = Open::new("rect", egui::vec2(1200.0, 900.0));
// A selected path, so the effect can run: a refused pick is not recorded.
open.app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
open.app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 20, "height": 20})).unwrap();
open.frame(vec![]);
let before = open.listed();
assert_eq!(before.first().map(String::as_str), Some(tool));
let at = before.iter().position(|id| id == effect).unwrap();
@@ -1490,8 +1564,8 @@ mod tests {
ids.iter().map(|id| row_label(entries.iter().find(|e| e.id == *id).unwrap())).collect()
}
/// An empty search, or one of spaces only, lists the recent picks under a Recent Commands
/// heading, most recent first, with the first highlighted. A pick whose command is gone is left
/// An empty search, or one of spaces only, lists the recent picks under a Recent heading, most
/// recent first, with the first highlighted. A pick whose command is gone is left
/// out, and no count is shown.
#[test]
fn an_empty_search_lists_the_recent_picks_most_recent_first() {
@@ -1504,20 +1578,21 @@ mod tests {
let expected = row_labels(&open.ctx, &["paint.swap", "object.group"]);
assert_eq!(shown, [(expected[0].clone(), true), (expected[1].clone(), false)], "{query:?}");
let labels = labels(&nodes);
assert!(labels.iter().any(|l| l == tl!("Recent Commands")), "{query:?}: the heading: {labels:?}");
assert!(labels.iter().any(|l| l == tl!("Recent")), "{query:?}: the heading: {labels:?}");
assert!(!labels.iter().any(|l| l.contains("result")), "{query:?}: no count: {labels:?}");
}
}
/// An empty search with nothing picked yet lists no rows and says there are no recent commands.
/// An empty search with nothing picked yet lists no rows and says what a search finds.
#[test]
fn an_empty_search_without_picks_says_there_are_none() {
fn an_empty_search_without_picks_says_what_to_type() {
let mut open = Open::new("", WINDOW);
let nodes = open.frame(vec![]);
assert!(rows(&nodes).is_empty(), "{:?}", rows(&nodes));
let labels = labels(&nodes);
assert!(labels.iter().any(|l| l == tl!("No recent commands")), "{labels:?}");
assert!(!labels.iter().any(|l| l == tl!("No commands match") || l == tl!("Recent Commands")), "{labels:?}");
assert!(labels.iter().any(|l| l == tl!("Type to search commands, tools, panels and effects")), "{labels:?}");
let other = [tl!("No commands match"), tl!("Recent"), tl!("No recent commands")];
assert!(!labels.iter().any(|l| other.contains(&l.as_str())), "{labels:?}");
assert!(open.app.ui.palette_open);
}
@@ -1567,6 +1642,141 @@ mod tests {
assert!(top.2 >= f64::from(open.popup().top()), "the first row is in view: {shown:?}");
}
/// A pick of the palette's own toggle is not recorded, and one saved earlier is not listed, so
/// Enter on an empty search runs the last other pick.
#[test]
fn the_palette_toggle_is_not_a_recent_pick() {
let mut open = Open::new("search commands", WINDOW);
open.app.ui.recent_commands = vec!["paint.swap".into()];
let k = open.listed().iter().position(|id| id == PALETTE_TOGGLE).expect("the toggle's result");
open.frame(vec![]);
open.press(egui::Key::ArrowDown, k);
assert_eq!(open.highlighted(), k);
open.press(egui::Key::Enter, 1);
assert_eq!(open.app.ui.recent_commands, ["paint.swap"]);
open.app.ui.recent_commands = vec![PALETTE_TOGGLE.into(), "paint.swap".into()];
open.app.ui.palette_query.clear();
open.app.ui.palette_open = true;
open.frame(vec![]);
assert_eq!(open.listed(), ["paint.swap"]);
let nodes = open.frame(vec![]);
let shown: Vec<(String, bool)> = rows(&nodes).into_iter().map(|r| (r.0, r.1)).collect();
assert_eq!(shown, [(row_labels(&open.ctx, &["paint.swap"])[0].clone(), true)]);
}
/// A click on a lower row of the empty search's list runs that pick and moves it to the top of
/// Recent Commands.
#[test]
fn a_click_on_a_recent_pick_runs_it_and_moves_it_first() {
let mut open = Open::new("", WINDOW);
open.app = VectorcraftApp::new(vectorcraft_testkit::fixtures::Fixture::Multi.session(), crate::Services::default());
open.app.ui.recent_commands = vec!["object.group".into(), "paint.swap".into()];
open.app.ui.palette_open = true;
let nodes = open.frame(vec![]);
let row = rows(&nodes).into_iter().nth(1).expect("the second pick's row");
assert_eq!(row.0, row_labels(&open.ctx, &["paint.swap"])[0]);
let before = open.app.session.active().unwrap().history.undo.len();
let at = egui::pos2(open.popup().right() - 24.0, ((row.2 + row.3) / 2.0) as f32);
let button =
|pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE };
open.frame(vec![egui::Event::PointerMoved(at)]);
open.frame(vec![button(true)]);
open.frame(vec![button(false)]);
assert!(!open.app.ui.palette_open, "the palette closes");
assert_eq!(open.app.session.active().unwrap().history.undo.len(), before + 1, "{}", open.app.ui.status);
assert_eq!(open.app.ui.recent_commands, ["paint.swap", "object.group"]);
}
/// A pick says what it did: it ran, it opened a dialog, or it was refused because its menu item
/// is dimmed or its panel can't be shown.
#[test]
fn a_pick_says_whether_it_ran_opened_a_dialog_or_was_refused() {
use vectorcraft_testkit::fixtures::Fixture;
let app = |session| VectorcraftApp::new(session, crate::Services::default());
assert_eq!(run_pick(&mut app(Fixture::Multi.session()), "object.group"), Picked::Ran);
assert_eq!(run_pick(&mut app(Fixture::Multi.session()), "tool:knife"), Picked::Ran);
assert_eq!(run_pick(&mut app(Fixture::Multi.session()), "panel:swatches"), Picked::Ran);
let mut dialog = app(Fixture::Single.session());
assert_eq!(run_pick(&mut dialog, "object.path.cleanUp"), Picked::OpenedDialog);
assert!(dialog.ui.dialog.is_some());
for id in ["edit.findReplace", "object.group"] {
assert_eq!(run_pick(&mut app(vectorcraft_engine::Session::new()), id), Picked::Refused, "{id}");
}
let mut presenting = app(Fixture::Multi.session());
presenting.ui.screen_mode = 3;
assert_eq!(run_pick(&mut presenting, "panel:swatches"), Picked::Refused);
assert_eq!(run_pick(&mut app(Fixture::Multi.session()), "panel:no-such-panel"), Picked::Refused);
let mut stuck = app(Fixture::Multi.session());
stuck.fail_next_tool_choice = Some("no switch".into());
assert_eq!(run_pick(&mut stuck, "tool:knife"), Picked::Refused);
assert_eq!(stuck.ui.status, "no switch");
// With nothing selected, the Effect menu dims every effect, and a plug-in's filter is dimmed.
let effect = crate::shortcut_editor::effect_items().first().map(|e| format!("effect:{}", e.effect)).expect("an effect");
let mut empty = app(vectorcraft_engine::Session::new());
assert_eq!(run_pick(&mut empty, &effect), Picked::Refused, "{effect}");
assert!(empty.ui.dialog.is_none(), "{effect}");
assert_eq!(run_pick(&mut app(vectorcraft_engine::Session::new()), "plugin:test.UI.palette_missing"), Picked::Refused);
}
/// A pick that is refused while its menu item is dimmed is not recorded in Recent Commands,
/// from a search or from the recent picks, which keep their order.
#[test]
fn a_refused_pick_is_not_recorded() {
for (query, id) in [("find and replace", "edit.findReplace"), ("group", "object.group")] {
let mut open = Open::new(query, WINDOW);
open.app.ui.recent_commands = vec!["paint.swap".into()];
let k = open.listed().iter().position(|c| c == id).unwrap_or_else(|| panic!("{query:?} finds {id}"));
open.frame(vec![]);
open.press(egui::Key::ArrowDown, k);
assert_eq!(open.highlighted(), k, "{id}");
open.app.ui.status.clear();
open.press(egui::Key::Enter, 1);
assert!(!open.app.ui.palette_open, "{id}: the palette closes");
assert!(open.app.ui.dialog.is_none(), "{id}");
assert_eq!(open.app.ui.recent_commands, ["paint.swap"], "{id}");
}
let mut open = Open::new("", WINDOW);
open.app.ui.recent_commands = vec!["paint.swap".into(), "object.group".into()];
open.frame(vec![]);
open.press(egui::Key::ArrowDown, 1);
assert_eq!(open.highlighted(), 1);
open.press(egui::Key::Enter, 1);
assert!(!open.app.ui.palette_open, "the palette closes");
assert_eq!(open.app.ui.recent_commands, ["paint.swap", "object.group"]);
// A tool that can't be chosen now is not recorded either.
let mut open = Open::new("knife", WINDOW);
open.app.ui.recent_commands = vec!["paint.swap".into()];
let k = open.listed().iter().position(|c| c == "tool:knife").expect("the search finds the Knife");
open.frame(vec![]);
open.press(egui::Key::ArrowDown, k);
open.app.fail_next_tool_choice = Some("no switch".into());
open.press(egui::Key::Enter, 1);
assert_eq!(open.app.ui.status, "no switch");
assert_eq!(open.app.ui.recent_commands, ["paint.swap"]);
}
/// A pick that opens a dialog is recorded in Recent Commands when the dialog opens, so it stays
/// there when the dialog is canceled.
#[test]
fn a_pick_that_opens_a_dialog_is_recorded_even_when_canceled() {
let id = "object.path.cleanUp";
let mut open = Open::new("clean up", WINDOW);
open.app = VectorcraftApp::new(vectorcraft_testkit::fixtures::Fixture::Single.session(), crate::Services::default());
open.app.ui.palette_open = true;
open.app.ui.palette_query = "clean up".into();
open.app.ui.recent_commands = vec!["paint.swap".into()];
let k = open.listed().iter().position(|c| c == id).expect("the search finds Clean Up…");
open.frame(vec![]);
open.press(egui::Key::ArrowDown, k);
open.press(egui::Key::Enter, 1);
assert!(open.app.ui.dialog.is_some(), "{}", open.app.ui.status);
assert_eq!(open.app.ui.recent_commands, [id, "paint.swap"]);
// Cancel closes the dialog without running the command.
open.app.ui.dialog = None;
open.frame(vec![]);
assert_eq!(open.app.ui.recent_commands, [id, "paint.swap"]);
}
/// #1757: Up and Down move the highlighted result, wrapping at the ends; a new query starts
/// from the first again.
#[test]
@@ -2099,11 +2309,13 @@ mod tests {
/// The results the palette lists for its query.
fn listed(&self) -> Vec<String> {
let entries = entries(&self.ctx, Lang::EN);
matching(&entries, &self.app.ui.palette_query.to_lowercase(), &self.app.ui.recent_commands)
.iter()
.take(MAX_RESULTS)
.map(|e| e.id.clone())
.collect()
// An empty search lists the recent picks, as `show` does.
let listed = if self.app.ui.palette_query.trim().is_empty() {
recent(&entries.list, &self.app.ui.recent_commands)
} else {
matching(&entries, &self.app.ui.palette_query.to_lowercase(), &self.app.ui.recent_commands)
};
listed.iter().take(MAX_RESULTS).map(|e| e.id.clone()).collect()
}
}
+26 -7
View File
@@ -655,6 +655,7 @@ type RankKey = (bool, bool, u8, u8, u32, u8, usize, u8, usize);
/// or starts a word of its label, menu path, description ([`description`]) or id, shares an English
/// stem form with a word of its label, menu path or description ("rounded corners" for Round
/// Corners…) or means the same as a word of its label, menu path or description ("remove bg" for
/// Remove Background…), where a word may also be text in one of its names or ids ("bg mov" for
/// Remove Background…), or when the query is the initials of a label ("ea" for Export As…). A query
/// word that is no word, stem form or word start of any result's label, menu path or id also
/// matches the words of labels and menu paths it is a typo of ([`Index::typos`]).
@@ -684,9 +685,9 @@ pub(crate) fn rank(entries: &[Entry], index: &Index, query: &str, recent: &[u32]
let mut indexed: Vec<Vec<u8>> = Vec::with_capacity(tokens.len());
let mut typos: Vec<Vec<usize>> = Vec::with_capacity(tokens.len());
let mut meanings: Vec<Vec<usize>> = Vec::with_capacity(tokens.len());
// After a word that is nothing in any result and a typo of nothing, a result is found only by
// the substring rule or its initials, where a typo grade changes nothing, so the later words are
// not compared.
// After a word that is nothing in any result, a typo of nothing and text inside no result's names
// or ids, a result is found only by its initials, where a typo grade changes nothing, so the later
// words are not compared.
let mut compare = true;
for (k, t) in tokens.iter().enumerate() {
// A repeated word is graded once.
@@ -703,7 +704,7 @@ pub(crate) fn rank(entries: &[Entry], index: &Index, query: &str, recent: &[u32]
// A word that matches only words of descriptions is still compared with the words of labels
// and menu paths it may be a typo of.
let near = if compare && grades.iter().all(|&g| g == NONE || g == DESCRIPTION_WORD) { index.typos(t) } else { vec![] };
if near.is_empty() && grades.iter().all(|&g| g == NONE) {
if near.is_empty() && grades.iter().all(|&g| g == NONE) && !entries.iter().any(|e| e.haystack.contains(t)) {
compare = false;
}
index.mark_typos(&near, &mut grades);
@@ -740,12 +741,15 @@ pub(crate) fn rank(entries: &[Entry], index: &Index, query: &str, recent: &[u32]
};
for (k, (grades, token)) in indexed.iter().zip(&tokens).enumerate() {
let mut g = grades.get(i).copied().unwrap_or(NONE);
if g == NONE {
all_indexed = false;
}
if g > SUBSTRING && e.haystack.contains(token) {
g = SUBSTRING;
}
// A word that is text inside a word of the result counts as matched, so it combines
// with words matched through a stem form, a word of the same meaning, a typo or the
// description.
if g == NONE {
all_indexed = false;
}
let g = if initials {
g.min(LABEL_PREFIX)
} else if g == NONE {
@@ -1269,6 +1273,21 @@ mod tests {
assert_eq!(ranked(&c, "colour"), ["c.three", "panel:color", "tool:zz"]);
}
/// A word that is text inside a word of the result combines with a word matched through a word
/// of the same meaning, a stem form, a typo or the description, and a word that is text inside
/// a word of no result finds nothing.
#[test]
fn a_word_inside_a_word_combines_with_the_other_matches() {
let c = described(vec![entry("Remove Background…", "a.one"), entry("Zz Group", "b.two")], &["{} make the images transparent", ""]);
assert_eq!(ranked(&c, "bg remove"), ["a.one"]);
assert_eq!(ranked(&c, "background mov"), ["a.one"]);
assert_eq!(ranked(&c, "bg mov"), ["a.one"], "a word of the same meaning");
assert_eq!(ranked(&c, "removing kgrou"), ["a.one"], "a stem form");
assert_eq!(ranked(&c, "transparent kgrou"), ["a.one"], "the description");
assert_eq!(ranked(&c, "emov backgruond"), ["a.one"], "a typo after a word inside a word");
assert!(ranked(&c, "bg qxq").is_empty());
}
/// A catalog row adds words in the UI language to a group, and a word that is not a single word
/// or that is a word of another group is left out.
#[test]
+3 -3
View File
@@ -1026,8 +1026,8 @@ 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).
- A Recent Commands button beside the Help › Search Commands field lists the last five commands and tools picked from the palette, most recent first, with a command picked again moved to the top. 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 Command Palette lists the picks of the Recent Commands list under a Recent Commands heading, most recent first, with the first highlighted and no result count, so opening the palette and pressing Enter runs the last pick again. With no picks yet it lists no results and shows a dimmed No recent commands line. 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_there_are_none`, `enter_on_an_empty_search_runs_the_last_pick_again`, `the_palette_opens_again_with_its_first_row_highlighted`).
- 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`).
- A tool's name in a Learn tutorial step is a blue link that shows where the tool is without choosing it (`learn.locateTool {tool}`): its toolbar button is marked, a collapsed group's flyout opens with the tool's row marked, a torn-off strip comes to the front, and a tool no shown toolbar holds is marked in the All Tools drawer. The mark, its 3 seconds and the hidden-toolbar cases are VectorCraft's own rules ([the help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/learn-skills-quick-skill-guide.html); `panels::learn::tests`, the `a_learn_link_*` tests in `toolbar::tests`).
- Under a tutorial's steps, View more opens the tutorial's own practice sample as a new untitled document, and once the tutorial is finished, Next Up moves to the next tutorial in the same skill, as the help page describes ([the help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/learn-skills-quick-skill-guide.html)). The samples are VectorCraft's own drawings. A Finish tutorial button that shows once the sample is open, the untitled copy, Back to skills in place of Next Up after a skill's last tutorial, and Next Up showing the next tutorial without opening its sample are VectorCraft's own rules. `learn.openSample`, `learn.finish`, `learn.next` and `learn.skills` (Back to skills) script them. Not done: the help page's short video. Regression tests: `view_more_opens_the_tutorial_s_sample_as_a_new_untitled_document`, `finishing_a_tutorial_offers_next_up_in_its_skill`, `the_practice_controls_work_from_the_keyboard`, `the_last_tutorial_of_a_skill_offers_back_to_skills`, `learn_finish_and_learn_next_follow_the_practice`, `learn_skills_shows_the_list_of_skills`, `the_practice_commands_reject_a_missing_or_unknown_tutorial`, `every_tutorial_has_its_own_readable_sample` and `the_next_tutorial_is_the_next_one_in_the_same_skill` in `crates/ui-egui/src/panels/learn/tests.rs`.
@@ -1336,7 +1336,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
A Command Palette query word in an English plural or verb form finds a result whose English name or menu path holds the base word: "rounded corners" lists Effect › Stylize › Round Corners… first, and "scaling" finds Object › Transform › Scale…. The search drops `'s`; `es` after `s`, `x`, `z`, `ch` or `sh` (also trying the word with only its `s` dropped, so "rasterizes" finds Rasterize…); a final `s` in words of more than 3 letters, except after `ss`, `us` or `is`; `ing` in words of more than 5 letters and `ed` in words of more than 4. After `ing` or `ed`, a doubled `b`, `d`, `g`, `m`, `n`, `p`, `r` or `t` is tried both single and doubled, the single letter only when at least 3 letters are left ("cutting" meets Cut, "added" meets Add); otherwise the word is also tried with an `e` ("scaling" meets Scale…). It turns `ies` into `y` or `ie` in words of more than 5 letters and `sses` into `ss`, and leaves `series` and `species` as they are. Among results that the whole query matches the same way (as an id, as a label, at the start of a label, as initials, or none of these), a result whose name holds the base word of a query word ranks below one that holds the query word whole and above one where the query word only starts a word of the name, so "scale zz" lists a name with "Zz Scaling" above one with "Zz Scalers". "scale" alone still lists "Scalers" above "Scaling", because "Scalers" starts with the query. A partly typed word that is not itself a word of any result ("scal") does not meet a base word. Names shown in other languages and ids are not changed this way, and every result found before is still found (`palette::search` tests `plurals_and_verb_forms_meet_their_base_word`, `a_plural_or_verb_form_finds_the_result`, `a_better_word_grade_ranks_first`, `a_partly_typed_word_does_not_lift_a_verb_form`, `a_whole_query_tier_comes_before_a_stem_form`, `results_matched_without_a_stem_keep_their_order`).
A Command Palette query word with a typo still finds the result: "gruop" lists Object › Group first, and "eyedroper", "rectange" and "elipse" list the same first results as the words spelled right, the Eyedropper, Rectangle and Ellipse tools among them. When a query word of 4 or more letters is not a word, a base word or the start of a word of any result's name, menu path or id, the search compares it with the words of result names and menu paths, and a word 1 edit away (2 for a query word of 8 or more letters) matches; a letter added, left out or changed, or two letters next to each other swapped, is one edit. A query word meets at most the 32 nearest such words. Results matched through a typo come after every result the query matches without one, and among them the query is read with the misspelled word replaced by the word it meets, so they come in the order the word spelled right gives; then a result whose label holds the word comes before one whose menu path holds it. Ids, and query words and result words with Chinese, Japanese or Korean letters, are not compared this way, and results without typos keep their order (`palette::search` tests `edits_are_counted_up_to_a_bound`, `a_word_with_a_typo_finds_the_result`, `a_typo_meets_at_most_32_words`, `misspelled_words_find_the_command`).
A Command Palette query word also finds a result whose name or menu path holds a word with the same meaning: "remove bg" lists Remove Background… first, "outline text" lists Type › Create Outlines first, and "flip", "combine", "vectorize" and "colour" list Reflect…, Unite, an Image Trace command and the Color panel among the first 3 results. The words come from VectorCraft's own table of 21 groups of English words (`palette/words.rs`, at most 60 groups of at most 6 words); a word that is the whole label of another command, such as Merge or Mirror, is in no group, and neither is Insert. A word or its English base word that is in a group meets the other words of its group in labels and menu paths, and their base words, but not ids or word starts. A result whose label holds the word itself ranks above one whose label holds a word with the same meaning, which ranks above one whose menu path holds the word, so "type" now lists Scale Text Attributes above Type › Orientation › Vertical. A catalog may add a group's words in its language with a row in the `search` context (the group's English words joined by ", ", then that language's words), used while that language is the UI language; no catalog has to have these rows (`palette::search` tests `a_word_with_the_same_meaning_finds_the_result`, `a_catalog_row_adds_words_to_a_group`, `words_with_the_same_meaning_find_the_command`; `palette::words` tests; `i18n` test `search_rows_name_a_group_and_add_single_words`).
The Command Palette ranks the commands listed in Recent Commands first among the results that match a query as well as they do, the most recent first, and below every result that matches it better: after a pick of Effect › Convert to Shape › Rectangle…, "rect" lists it above the Rectangle Tool, so Enter runs it again. A recent pick ranks after the whole-query match, the word grades and the matches through a typo, a description or a word with the same meaning, and before the kind of result and the name's length. The ranking uses the list Recent Commands shows, which also holds a pick whose command could not run. This is VectorCraft's own behavior (`palette::search` test `a_recent_pick_ranks_first_within_its_grades`; `palette` tests `a_recent_pick_ranks_first_among_results_that_match_as_well`, `the_kept_ranking_follows_the_recent_picks`).
The Command Palette ranks the commands listed in Recent Commands first among the results that match a query as well as they do, the most recent first, and below every result that matches it better: after a pick of Effect › Convert to Shape › Rectangle…, "rect" lists it above the Rectangle Tool, so Enter runs it again. A recent pick ranks after the whole-query match, the word grades and the matches through a typo, a description or a word with the same meaning, and before the kind of result and the name's length. The ranking uses the list Recent Commands shows. This is VectorCraft's own behavior (`palette::search` test `a_recent_pick_ranks_first_within_its_grades`; `palette` tests `a_recent_pick_ranks_first_among_results_that_match_as_well`, `the_kept_ranking_follows_the_recent_picks`).
A Command Palette query word also finds a command by what the command's description says: "transparent background" lists Remove Background… among the first 3 results, and "png" lists it after every result with "png" in its name or menu path. The description is the command's params text (an engine or plug-in command's, a UI command's, or an effect's) without each `{…}` group that is not inside a `{`, `[` or `(` group, without each such `[…]` or `(…)` group just after a `→`, and without the `→` before a removed group, cut to its first 300 characters at the end of a word. The words of a schema ("corners" for Remove Background…) and of a result written as a group do not find the command; a result written as words after a `→` stays in the description. Words of 2 characters or fewer, words with no letter, and "the", "and", "ids", "true", "false" and "null" are left out. A query word that is a word of a description, shares an English base word with one, starts one or has the same meaning as one finds the result, and such a result ranks below every result that the query matches in its name, menu path or id, as text inside a word or through a typo. Descriptions are English only, and a typo does not match them. Tools, panels and filter plug-ins have no description (`palette::search` tests `a_description_leaves_out_the_schema_and_the_result`, `a_word_of_the_description_finds_the_result`, `a_description_match_ranks_below_a_typo`, `words_of_a_description_find_the_command`).
`object.setProps` with `visible: false` or `locked: true` deselects every selected object that is then hidden or locked, the key object included, as the eye and lock columns do.
Ctrl/Cmd+Alt-clicking an eye switches the other layers to Outline and the row's layer to Preview, or switches all layers back to Preview when the others are in Outline (`layer.outlineOthers`, `layer.previewAll`).