mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 21:44:57 +00:00
An undoable command without a menu path or a default key was listed only when every field of its params doc ended with `?`. A typed optional field such as `on?: bool`, `ids?: [id…]` or `artboard?: index=0` counted as required, so Fractional Widths, System Layout, Align to Pixel Grid, Embed Image, Update Links, Delete Slices, Switch Orientation, Distribute Spacing for artboards, Target Contents, Invert and other panel menu commands that act on the selection could not be given a shortcut. `runs_without_params` now reads the params doc with `names_a_required_field`, the parser the editor already uses for menu commands. The commands the new rule would list that set nothing, fail or only give data back when a key runs them with no params (the panel setters such as Fill and Character, the exports and saves without a path, the undo group's begin and end, Create Dimension) join `NEEDS_A_PARAM`, so they stay out of the list until the user gives one a key. New Symbol joins it too, since the Symbols panel runs it through Symbol Options. docs/mcp.md describes the rule and the full `NEEDS_A_PARAM` list.