Arrow keys keep screen readers on the search field, so its description now adds the
highlighted result's reason on a second line when the result can't run now.
A result that cannot run now stays in its place in the list and is
drawn in the disabled text color: an engine command whose engine check
fails (Ungroup with nothing selected, Paste with an empty clipboard and
nothing to paste from the system clipboard), a UI command the menus dim,
a filter plug-in or an effect whose menu item is dimmed, and a panel in
Presentation Mode. Tools are never dimmed.
The engine's reason, or that the command is not available right now,
shows on hover, as the row's screen-reader description, and in the
footer while the row is highlighted: beside the count, or on a line of
its own under the recent picks of an empty search. The row's
screen-reader node is marked disabled. Both messages are existing
status messages, so no catalog changes.
Only the drawn rows are checked, each once per state: the key is what
the native menu bar's rows depend on (native_menu::state_hash, now
pub(crate)), plus unsaved changes, the screen mode, an open dialog and
background saves, exports, file reads, plug-in runs and traces, and a
frame with a click. Typing in the search field keeps the answers. One
engine check took 102 ms on a 20,000-object selection in a release
build. The check does not change the ranking, and a pick of a dimmed
result does what it did before.
The palette now counts how many times each command is picked and ranks
the commands picked most often first among the results that match a
query as well as they do, also after they leave Recent Commands. A
count never lifts a result above one that matches the query better.
- Counts are compared in grades that double: grade 1 starts at 1 pick,
grade 2 at 3, grade 3 at 7, up to grade 9. A command picked once
ranks above the commands never picked. The grade ranks after the
match grades and before the place among the recent picks.
- At most 200 commands are counted. A new one then removes the command
with the fewest picks, of those the one picked longest ago. When a
count reaches 1,000, every count is halved and commands left at 0
are dropped.
- The counts are saved in ui.json as `command_uses`. A count above 999
loads as 999, an unreadable entry is dropped, and of more than 200
the most recent picks are kept. The web build keeps them for the
session.
- The kept ranking of the last query is ranked again when a count
changes.
A command listed in Recent Commands now ranks first among the results
that match a query as well as it does, the most recent first. It ranks
after the whole-query match, the word grades and the typo, description
and same-meaning matches, and before the kind of result and the name's
length, so it never passes a result that matches the query better.
After a pick of Effect › Convert to Shape › Rectangle…, "rect" lists it
above the Rectangle Tool, and Enter runs it again.
The ranking uses the list Recent Commands shows, which also holds a
pick whose command could not run. The kept ranking of the last query is
ranked again when the recent picks change.
With an empty search, or one of spaces only, the palette lists the picks
of the Recent Commands list under a Recent Commands heading, most recent
first, instead of the first commands of the catalog. The first row is
highlighted, so opening the palette and pressing Enter runs the last pick
again. With no picks yet the palette lists no results and shows a dimmed
No recent commands line in place of the result count.
Closing the palette forgets the highlighted result, so the palette opens
with its first result highlighted and its list scrolled to the top.
Before, a palette opened again on the same search kept the row that was
highlighted when it closed.
The held-Enter test of the shortcuts gives the app a recent pick, since
an empty search with none lists no result to run.
A query word now also finds a command by its description: the command's
params text (an engine or plug-in command's, a UI command's, or an
effect's) without each top-level {…} group, without each top-level [ ]
or ( ) group just after a →, and without the → before a removed group,
cut to its first 300 characters at the end of a word. "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.
A schema's words ("corners" for Remove Background…) and a result written
as a group do not find the command; a result written as words after a
→ stays in the description.
A description word matches as a whole word, an English base word, a word
start or a word with the same meaning. A result found only that way
ranks below every result the query matches in its name, menu path or id,
as text inside a word or through a typo. Words of 2 characters or fewer,
words with no letter and a few stop words are left out. Descriptions
are English only and are not typo-matched.
The depth-and-quote scan of the Keyboard Shortcuts editor's required
field check moves into shortcut_editor::outside_quotes, which the
description reader also uses; the check behaves as before.
The table's rule now says what the groups follow: a word that is the
whole label of another command (Merge, Mirror) is in no group, and
Insert is left out too. A word that only starts or ends other labels can
be in a group, so "unite" also lists Combine Slices after Unite and
"delete" lists Clear Guides; a test checks both, that "settings" finds
Preferences…, and that "colour" lists the Color panel first.
A catalog's group words are read from its rows in the search context
alone, so a plain row whose source matches a group's words is no longer
taken as that group's words. The table's notes say that in a language
written without spaces a row's word finds only a label that is that
word alone.
A new table, palette/words.rs, holds 21 groups of English words that
mean the same thing when searching ("remove", "delete", "erase" and
"clear"; "background" and "bg"; "reflect" and "flip"). A query word, or
its English base word, that is in a group also meets the other words of
its group in result labels and menu paths and their base words, but not
ids or word starts. A word that names other commands (Merge, Mirror,
Insert) is in no group. A test keeps the table to at most 60 groups of
at most 6 single lowercase words of at most 20 characters, with no word
in two groups.
A label word met through a word with the same meaning grades below a
word start of the label and above a word of the menu path, and a menu
path word met that way grades below a menu path word. So a label holding
the query word ranks first, then a label holding a word with the same
meaning, then a menu path holding the query word. For "type", Scale Text
Attributes now lists above Type › Orientation › Vertical. Results
that tie are ordered by the whole query read with the matched word of
the same meaning, so "colour" lists the Color panel among the first 3.
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 the
language's words. They are used while that language is the UI language.
No catalog has to have these rows; an i18n test checks that each row
names a group and adds single words of no other group.
A query word of 4 or more letters that is not a word, a base word or the
start of a word of any result is compared with the words of result names
and menu paths. A word within 1 edit (2 for a query word of 8 or more
letters) matches, where a letter added, left out or changed, or two
adjacent letters swapped, counts as one edit. The bounded check stops as
soon as the bound is passed and skips words whose length differs by more
than the bound. A query word meets at most the 32 nearest words. A word
repeated in the query is compared once, and after a word that matches
nothing at all the later words are not compared.
Results matched through a typo come after every result matched without
one. Among them, the query is read as typed with each such word replaced
by the word it meets, from the label when the label holds one, so
"gruop" lists Object › Group first, as "group" does, and a word of the
label ranks above a word of the menu path. Query words and result words
with Han, kana or Hangul letters, and ids, are not compared. Results
without typos keep their order.
The search orders results by how the whole query matches before the word
grades, so "scale" lists Scalers, whose name starts with the query, above
Scaling. The progress line now says the stem rule applies among results in
the same whole-query tier, and a test pins both orders.
The test of Effect menu results reads the results and the Effect menu items
within one plug-in revision, so a live-effect plug-in that another test
installs between the two reads no longer fails it.
A query word in an English plural or verb form now meets the base word
of a result's English name or menu path: "rounded corners" lists Round
Corners… first, "scaling" finds Scale…, "rasterizes" finds Rasterize…
and "added anchor points" finds Add Anchor Points.
The index stores up to two stem forms per English word, and a query
word's stem forms are looked up exactly:
- 's is dropped, and sses becomes ss.
- es after s, x, z, ch or sh is dropped, and the word with only its s
dropped is a second form.
- A final s is dropped in words of more than 3 letters, except after
ss, us or is.
- ies becomes y or ie in words of more than 5 letters.
- ing (more than 5 letters) and ed (more than 4) are dropped. A doubled
b, d, g, m, n, p, r or t left before them gives the single and the
doubled letter, the single one only when at least 3 letters are left;
otherwise the rest with an e added is the second form.
- series and species are left as they are.
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" now lists a name with Scaling
above one with Scalers. A partly typed word that is not itself a word
of any result ("scal") does not meet a stem form. The grades of the
other matches keep their order and their sums, so results matched
without a stem keep their order. Names shown in other languages and ids
are not stemmed, and the words as written stay in the index, so every
result found before is still found.
As `window.panel` does, a pick of a panel's result in Presentation Mode now
leaves the panels as they are and the status line says panels can't be shown
in that mode. Before, the pick moved the panel to the front of its group and
showed the dock once the mode ended.
The Recent Commands list draws on its own layer, so a press on one of its rows counted as a press outside the popup and closed the palette before the click ran the row. Presses on the list's layer now count as inside.
When the results change under the same query and a new result pushes the
highlighted one past the 50 shown results, the highlighted result now takes
the last shown row, so Enter still runs it. Screen readers hear its place
among every match.
The saved view and saved selection catalog check also rejects two rows of
one language that show the same name, also when the name holds no ASCII
digits.
A query that is a menu's title ("object", "effect", "select") put
every item of that menu in the starts-with tier, because the tier also
read each name with its menu path. Such items now rank by the word
grades like the rest, below results whose label holds the query as a
word. A query that holds `›` still starts a name with its menu path.
- A new test checks that the native Mac menu bar's application menu
holds the items the palette places there, under the same submenus.
- The Drop Shadow query checks the exact effect, and the test of common
queries is renamed to say that some only need to be near the top.
- docs/target-app-parity.md: the earlier palette line no longer states
the old ranking rule, and the new line gives the kind of result as
the reason "rect" lists the Rectangle Tool first.
Results are ordered by how well they match instead of by registration
order. A query equal to a result's id lists it first; then come results
whose name is the query, whose name starts with it, and whose initials
it is ("ea" finds Export As…). Within those, a whole word of the name
ranks above a word it starts, then a word of the menu that holds the
result, of its id, and text inside a word. At equal grades a tool ranks
above a menu command, panel, effect or filter plug-in, and a shorter
name above a longer one.
The words of the menu bar item that runs a result, its own label
included, also find it, read from the native menu bar when the app uses
it. The index is built when the palette first opens after the language,
plug-ins, shortcuts or menu bar change, and the last query's ranking is
kept. Every result the earlier search found is still found, an empty
query keeps the old order, and the highlight stays on its result when
the results change while the palette is open.
When a press on a field in a window above the backdrop closes the
palette, the widget that had the focus before the palette opened no
longer takes it back from that field. The earlier widget gets the focus
again only when nothing has it or the palette's own field still has it.
Outline views left out an Abutting trace's seam fills only while their
clip group kept the name "Seam Fills". Renamed, the group drew its
clipping box and, on a stretched image, the outlines of its filled
seam bands. The group is now also left out when it is still the lowest
traced shape, where the trace puts it.
The outline-view test samples inside the seam band beside the shared
edge on the stretched image, and checks that renaming the group leaves
the view unchanged.