- A test marks a wide, short object and checks that each vertical leg
stops at half the height while each horizontal leg keeps its length.
- The params text and module doc spell "color" the American way.
- docs/ui-parity.md gets a row and docs/target-app-parity.md a section
for Mark Bounds of Each, next to Offset Objects.
- The ui-egui arrange tests keep one `steps` helper; main added the same
helper for Offset Objects.
A path's own anchor pick now wins over its group's whole-path expansion in
either selection order, a segmentEnds of null is rejected, and OK in the
dialog runs the command outside the preview so dropping Puppet Warp pins
adds no undo step. The docs say whole paths still take object transforms.
Clipping masks, locked or hidden objects and objects outside every artboard
stay in place; a selection inside a live blend and a direction of null are
rejected. The docs say raster effects do not count toward row bounds.
Merging main made DIALOGS one entry short: Offset Objects and Match Objects
both joined it, so vectorcraft-ui-egui did not compile. The table now
declares seven entries.
A stacking match moved a clipping path out of its clip position and could
move a member out of an Intertwine group with its old overlap tiers. It now
refuses to move a clipping path, refuses a destination that would nest
Intertwine art, and clears the tiers of members that leave their group.
A stacking or rotate-only match no longer needs bounds on the source. A
size match measures each target after it is sized and turned, in its final
frame, and is refused when a target can't take the requested size, instead
of reporting success with the size unchanged. A target with no bounds that
needs to turn is refused.
Opened without ids (the menu, a shortcut or ui.placementOptionsDialog {}),
the dialog read the selected images but sent null ids on OK, and
links.placementOptions read null as the selection at that moment. Selecting
another image while the dialog was open applied the options to that image,
and emptying the selection made OK fail.
links.placementOptions without options now returns {ids, placement}, and
the dialog sends those ids on OK. OK is refused when one of them has been
deleted. Callers that pass ids are unchanged, as is the check that OK edits
only the drawing the dialog opened in.
The params text of tool.options (in both command catalogs) and
docs/control-protocol.md named the dialogs' keys without saying that
they are the `key` ui.inspect reports. The `dialog` field tool.options
returns holds `rotate`, `scale`, `reflect` or `shear` for the transform
tools, `move` for the selection tools and `command` for the Type on a
Path tools.
- The text names both: the `key` in ui.inspect and the returned
`dialog` field.
- The tool.options test checks the returned `dialog` field against the
params text as well as the key.
- The ui.menuDialog test checks that the Simplify and Smooth popovers
are showing when the params text says those commands show a slider.
A group or compound path selected whole gives way to its visible,
unlocked paths, without a Shaper Group's original shapes and, while
guides are locked, without paths made into guides.
Object > Plug-ins > Arrange Tools > Group by Row... (addon.arrange.groupRows)
groups the selected top-level objects by the rows their visual bounds share:
an object joins a row when its bounds overlap the row from top to bottom,
and Group By Columns does the same from left to right. Extents that only
touch stay apart, and an object that overlaps two rows joins them into one.
Only objects in the same layer or group and on the same artboard share a
row; an object alone in its row stays as it is. Each new group takes its
frontmost member's place in the stacking order, and the groups and the
objects left alone stay selected. One undo step, none when no row holds two
objects; an unknown direction is refused. At most 20000 objects, sorted
once along the axis.
Group Overlapping Objects and Group by Row share the step that builds the
groups. The dialog has Group By (Rows or Columns) with Preview.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
main's Document member list held saveAs and close as members that are not
available yet; this branch's save_open members implement them, so the
merge drops them from that list and keeps main's other entries. The
script host test lists take main's members together with this branch's
open, userInteractionLevel, fullName, path, saved and option classes,
and the heap accounting keeps main's ModuleNamespace arm beside the
FsEntry string arm.
The params text of ui.simplifyAuto and ui.smoothAuto (in both command
catalogs) and docs/mcp.md described the Simplify and Smooth sliders as
dialogs `simplifySlider` and `smoothSlider` that ui.dialog.confirm
keeps. The sliders are canvas popovers: ui.inspect does not list them,
and the ui.dialog commands do not control them.
- The text says Enter or a click outside the popover keeps the result,
with one undo step when the paths changed and none otherwise, and
Escape restores the paths.
- The tool.options test compares each tool's dialog key with the key
the params text gives for that tool.
Art dragged off the canvas and released on a symbol's tile or row with
Alt (Option on macOS) held redefines that symbol, and the dropped art
becomes an instance of it. With Shift held as well, the panel now sends
`symbol.update` with `keepArt: true`, so the art stays ordinary art in
its place, as Redefine Symbol from the panel menu with Shift leaves it.
The redefine is one undo step either way.
Docs: docs/mcp.md (symbol.update).
Object > Plug-ins > Arrange Tools > Mark Bounds of Each... runs the new
command addon.arrange.markBounds. For each selected object it draws a
group of four inward L-shaped corner marks (10 pt legs by default, each
at most half the side it runs along) or a rectangle, with no fill and a
red 1 pt stroke by default, on the object's geometric or visual bounds.
Visual bounds count strokes, brush art and effects as drawn.
- Clip groups are measured by their clipping path, other groups by
their members together. Guides and objects without bounds, such as
empty groups, are skipped; a selection with nothing to mark is an
error that makes no undo step.
- The marks go directly above their object, or above the outermost clip
group or clipping sublayer that holds it, so the mask does not clip
them. The run is one undo step and selects the marks.
- Out-of-range lengths and weights, unknown styles and bounds, and bad
colors are errors; defaults apply only to omitted values. At most
20000 objects are marked at once.
- The dialog has Preview; Length is off unless Draw is Corner Marks.
- vectorcraft-render gains drawn_bounds_with, drawn_bounds with a shared
symbol cache, so a large selection measures each symbol once.
Docs: docs/mcp.md, ROADMAP.
Fixes#5981. The winit patch rev moves from a517b384 to 0dfcec0e
(storytold/winit craft/0.30.13, with storytold/winit#20), whose Wayland
backend binds zwp_pointer_gestures_v1 and reports a touchpad pinch and
rotation as PinchGesture and RotationGesture. egui-winit turns them into
Event::Zoom and Event::Rotate, which the canvas already reads, so a pinch
zooms about the pointer and a two-finger turn rotates the view. Before,
winit's Wayland backend never bound the protocol, so the gesture never
reached the app. X11 and XWayland still report no pinch.
The same winit range types an Alt + keypad code's character itself on
Windows (W36: the WM_CHAR after Alt's release becomes a key press with
that text). windows_alt_codes typed it too, which would type it twice, so
it now only takes the keypad digits typed with Alt out of the frame.
Docs: docs/hardware-parity.md (Trackpad row, Linux), docs/type-parity.md
(Alt + numeric-keypad codes row).
ui.inspect lists each open dialog with a key. The params text of these
commands, and docs/mcp.md and docs/control-protocol.md, named a key that
no open dialog reports:
- Layer Options (ui.layerOptions, ui.newLayer): layerOptions, now
ui.layerOptions.
- The Layers panel's Panel Options: layersPanelOptions, now
ui.layersPanelOptions.
- The Navigator panel's Panel Options: navigatorPanelOptions, now
ui.navigatorPanelOptions.
- Document Raster Effects Settings (ui.rasterEffectsSettingsDialog):
rasterEffectsSettings, now document.rasterEffectsSettings.
- The PDF preset editor (ui.pdfPresetDialog): pdfPreset, now pdf-export.
- Save for Web (file.saveForWeb): saveForWeb, now save-for-web.
- The Actions panel's Reset Actions question (ui.actionSet.reset):
resetActions, now actionsQuestion.
Each command now has a test that opens the dialog and checks that its
params text names the key ui.inspect lists.
Objects named in `ids` skipped the locked-artboard filter that the
selection applies, so the command could recolor art on a locked artboard.
The command now skips every target the locked artboards hold, checked once
per run with `Document::locked_artboards`. New art made on a locked
artboard that is still selected takes a color, as with other commands.
The params text, docs/mcp.md and the ROADMAP entry state the rule.
The equality check that skips the undo step now sits in brush.options,
which compares the edited brush with the stored one. New, Delete, Move,
Duplicate and Replace Brush Art save the library as they do on main,
without decoding it a second time. docs/target-app-parity.md lists the
no-op rules for Brush Options and Apply Brush with their tests.
Follow-up to #9288.
- Removing the last anchor of a closed path with its closing segment
selected also deselects the first anchor, the segment's other end.
- Removing a point puts back new art's paint, so a default stroke width
a script set still applies to the next path it draws.
- A removal that leaves the direct selection as it was waits with the
other point changes, unless every remaining anchor is now selected,
the selection refers to points that are gone, or the path is in an
Objects on Path group.
- Reading the points of a path first writes the waiting point changes
of another path in the same Objects on Path group.
- Writing a path in an Objects on Path group checks the other tracked
paths in the outermost such group, so their PathPoint handles go stale
when the group moves them, even after an undo.
Docs: docs/mcp.md, docs/target-app-parity.md.
brush.apply clears the brush settings of each path's top stroke, and
clearing them is one undo step. The command text and docs/mcp.md now
limit the no-op to a current brush whose top strokes already have it,
paint, a width above 0 and no settings of their own. A new test applies
the current brush to a stroke with its own settings and checks that they
are cleared as one undo step.
addon.select.editPointsOnly {segmentEnds?} turns the current selection into
one that holds only anchor points, so a move or transform that follows acts
on the points alone. Selected segments leave the selection, and the points
at their ends leave it too unless segmentEnds is true. Paths selected whole
keep every point. A group or compound path selected whole gives way to the
visible, unlocked paths inside it (no Shaper Group originals, and no guide
paths while guides are locked). Type, images, symbols and other objects
without anchor points leave the selection.
Only the selection changes, so there is no undo step. With nothing selected
or nothing left to keep it is an error and the selection stays as it was.
The command is on the plug-in allowed list.
Object > Plug-ins > Selection Tools > Edit Points Only... opens a dialog
with Keep Ends of Selected Segments; it previews the narrowed selection on
the canvas, OK keeps it and Cancel puts the selection back.
Docs: docs/mcp.md, docs/target-app-parity.md.
Object › Plug-ins › Color Effects › Randomize Fill Colors… gives each
selected filled path and compound path, and each one inside the selected
groups and clipping groups, a fill color of its own, picked at random
from a seed, as one undo step (none when no fill changes).
- addon.color.randomFill {scheme?, swatch?, min?, max?, seed?, ids?}:
"color" picks red, green and blue at random in the document's color
mode, "tint" picks a linked tint of a global or spot swatch, and "gray"
picks a gray, the tints and grays between min and max percent.
- Unfilled paths, clipping paths (compound ones included), hidden and
locked objects and the objects in hidden or locked groups and layers,
type, images, symbol instances, blends and envelopes keep their fills.
A compound path's member given by id colors the compound path, and an
object reached twice is colored once.
- Bad params are refused: an unknown scheme, min or max with "color",
swatch without "tint", a percent outside 0 to 100, min above max, a
missing or process swatch, and a seed that is not a whole number.
- The dialog has Colors, Swatch (the document's global and spot
swatches), Minimum, Maximum and Seed, with Preview; OK is off while the
minimum is above the maximum or tints have no swatch.
Docs: docs/mcp.md, ROADMAP, docs/target-app-parity.md, docs/ui-parity.md.
A color given as {"c": 1e300, ...}, [1e300, 0, 0], {"gray": 1e300}, a Lab
color or a color object with a number past f32::MAX was stored with an
infinite component. paint.setFill, artboard.setProps, swatch.new,
text.create and the other commands that read colors through
cmd::color_value took it.
- color_value refuses a color whose components are not finite, so the
commands that read a color through it answer an error and change
nothing.
- An effect's color (Drop Shadow, Inner Glow, Outer Glow, Shift to Color)
with such a number is refused with "`color` must be a #rrggbb color".
- ui.colorWheel's contrastBackground refuses it as well.
Docs: docs/mcp.md.
Since the move to the craft UI framework, the dialogs ui.menuDialog
opens report their command id as their `key` in ui.inspect and
ui.dialog, except Transform Each and the envelope dialogs. The params
text, docs/mcp.md and docs/control-protocol.md still named the earlier
kinds (`move`, `scale`, `vectorHalftone`, `rearrangeArtboards`,
`renameArtboards`, `arrangeGrid`, `divideDashes`, `smoothBridge`,
`tangentCircle`, `textTweaker`, `command` and others), which no dialog
reports.
- The params text of ui.menuDialog (and its copy in the MCP catalog)
says the key is the command id and names the four exceptions, and
says Smooth, and Simplify until its dialog keeps its settings, show a
slider rather than a dialog. ui.simplifyAuto and
ui.simplifyMoreOptions name the Simplify dialog's key
`object.path.simplify`.
- The params text of tool.options names the keys of the dialogs the
Rotate, Scale, Reflect, Shear, selection and Type on a Path tools
open: `object.rotate`, `object.scale`, `object.reflect`,
`object.shear`, `object.move` and `type.pathOptions`.
- docs/mcp.md and docs/control-protocol.md name the keys the dialogs
report, Type on a Path Options and Rasterize included.
- Tests open every command the ui.menuDialog params text lists, each of
those tools' options and Simplify's More Options, and check the key
against the params text, and that every key the ui.menuDialog text
names is one a listed command opens.
Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
rows value that was not a whole number. rows now rounds like columns and is
still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
setter of main's placeholder. This branch makes pathItems a read-only
collection, like pageItems, so the row goes.
vectorcraft-ui-egui's tests were one leg that set the pull request run's
length (33.2 min median over 20 runs: about 19 min compiling and 11.9 min
running 5,288 tests). The gate now has six legs. Shards 1 and 2 each
build vectorcraft-ui-egui's tests and run half of them with nextest's
count partition. Each part also runs its own pinned slow tests, so the
slowest tests do not land on one leg. Part 1 alone runs the doctests and
the i18n report, and `cargo xtask ci warm` builds the split once.
Before running, a part lists the tests and stops with an error when a
pinned test name no longer exists. The xtask shard tests check that
every test of a split runs on exactly one part.
The nightly signing policy and its preparation doc list the new job
names (`test N/6`).
Object › Plug-ins › Arrange Tools › Offset Objects… (addon.arrange.offset)
puts the selected objects one after another in a row (left to right) or
a column (top to bottom), each a gap past the one before it; a negative
gap overlaps them. The order is the stacking order from the back or the
position (left or top edges), and Reverse Order runs it the other way.
The first object stays where it is, and the others move only along the
row or column, keeping their place across it. Objects are measured by
their visual bounds, a clipping group by its mask. One undo step, none
when nothing moves; bad params are refused.
The dialog has Direction, Gap, Order and Reverse Order with Preview.
Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md, ROADMAP.
Object › Plug-ins › Arrange Tools › Match Objects… (addon.arrange.match)
makes the other selected objects match one source object: the key
object, or the top or the bottom selected object. Each can take the
source's width (height in proportion), height (width in proportion) or
both, its bounding-box angle, and its stacking place directly above it
in its layer or group, about a reference point, as one undo step. No
step is recorded when nothing changes, and invalid params are refused.
The dialog previews on the canvas; OK stays off while nothing is chosen
or the source is a missing key object.
Docs: docs/mcp.md, docs/target-app-parity.md, docs/ui-parity.md, ROADMAP.
symbol.options recorded an undo step and moved the revision whenever any
option was passed, unless only alignToPixelGrid was given with the value
the symbol already had. A newName equal to the current name, or a
registration, export type, 9-slice, type or pixel grid value the symbol
already has, now leaves the document and its undo history as they are.
symbol.replace with the symbol the instances already show recorded an
undo step too. It now records one only when an instance changes.
Both run through colorcmds::edit_if_changed, as the Symbol Shifter and
the other symbolism tools do.
brush.options with params and a newName that leave the brush as it is
stored the library again, raised the document revision and added an
Undo step; only the Brush Options dialog skipped an unchanged OK.
save_library now returns without an edit when the library it is given
equals the document's and nothing is renamed, as brush.move already
does. brush.apply of the brush the strokes and the current brush
already have runs through edit_if_changed and records nothing.
With an object of a dynamic symbol instance selected by Direct Selection,
transparency.set without ids changes that object's opacity and blend mode
for the instance, and the Transparency panel shows those values. The
transparency.info command still reported the instance's own opacity and
blend mode. Without ids or id it now returns the panel's values
(Session::transparency_info), so it reports the part's opacity and blend
mode with the instance's isolate and knockout. With ids or id it still
reports those objects.
- saveAs picks the encoder from the requested name, so a link to a file of
another format writes the format the name asks for.
- fullName, path and close(SaveOptions.SAVECHANGES) resolve a relative saved
path against the working directory.
- close(SAVECHANGES) accepts an artboard range that covers every artboard and
keeps the document open when the save would drop artboards.
- app.open keeps the requested file name, rejects a file over 128 MiB before
reading it, applies the requested color space to plug-in imports, and
rejects PDF options for files that are not PDF content; null PDF options
keep their defaults.
- Explicit null options throw; assigning the current Document.saved value
runs no command; Document.path reflects as Folder or string.
- An implicit multi-file save names no refused path in its error.
- The script checker counts SAVECHANGES only on SaveOptions and keeps write
warnings for receivers that evaluated code can rebind.