Commit Graph
855 Commits
Author SHA1 Message Date
FredApps 5f898133c0 Merge pull request #10247 from storytold/fix/vectorcraft-0251-text-and-paste
Keep font choices after preview and fix browser text selection
2026-11-30 14:37:27 +01:00
Codex 274983176d Format the font preview regression test 2026-11-30 13:39:47 +01:00
Codex 98e5003ec3 Commit hovered font rows and avoid native clock calls in web character controls 2026-11-30 13:21:47 +01:00
dotCooCoo 32a5fef78d Layers: a selection change keeps the panel's row order
The Layers panel built its row order again on every selection change:
each change made a new Tracked for the rows, and the rows reported no
order revision, so the panel asked every row for the rows inside it
(7 calls for the 6 rows of the new test's document).

- LayerRows reports LayerTree::order_revision: a hash of the document,
  the open rows, Show Layers Only and the isolated node. The selection,
  the highlighted rows, the current layer and the names are not in it.
- refresh_rows writes new rows into the kept Tracked while the document
  (uid and revert count) stays the same, and makes a new Tracked for
  another document or after File > Revert.
- The craft-libs pin moves from 186a229c8 to aa7e668ec, current
  craft-libs main, which has craft-libs#4319 (LayerTree::order_revision).
  The winit rev moves to 0dfcec0eb, as craft-libs pins it; egui stays
  at 14c39fed1. xtask pdf-deps checks the new rev. craft-nightly keeps
  the rev main pins it at.

Two tests failed on the new craft-libs:

- canvas::tests::a_selection_drag_draws_its_marks_in_the_frame_the_pointer_moves:
  since craft-libs#4143 a frame runs one pass where it ran two, and the
  bounding box, Live Corners, hollow corners and shape widgets were drawn
  before the tool host took the frame's pointer event, so the box showed
  at the old corner. They are now drawn after it, into paint slots kept
  in their old order.
- tests::nativemenu::applying_a_dialog_preview_reads_the_menus: since
  craft-libs#4350 the closed dialog's angle field gives up the keys one
  frame sooner, so the menus are sent again without the text-editing
  gate within the frames the test ran. The test now waits for the gate
  and counts the read and that send apart.
2026-11-29 21:37:32 -08:00
dotCooCoo a978fd242a Type: an edit runs each idle and typing frame once
The Type tool's text part was shown in the canvas's flow, in a scope
sized to the caret. While the tool edited text, every other frame ran
its UI twice: the frame's layout check found the part changed and the
frame was run again.

The part is now shown at the caret's rect with no allocation, as the
canvas's other overlays are, and each idle and typing frame runs once.
2026-11-29 10:16:00 -08:00
.CooCoo 5f7add2106 Merge pull request #10053 from dotCooCoo/fix/freehand-fidelity-commit
UI: Fidelity applies only once committed in freehand Tool Options and the Contextual Task Bar
2026-11-29 09:08:08 -08:00
dotCooCoo fa1c0a8dc4 Tests: read retained paint chunks in every ui-egui shape walk
The pinned egui replays a region that did not change as one
Shape::PaintChunk of clipped shapes. Test helpers that walked
out.shapes by hand stopped at the chunk, so text, meshes, rects and
lines painted inside it were missed.

- Add painted_shapes and flat_painted_shapes next to text_shapes in
  tests/labels.rs. They open Shape::Vec and Shape::PaintChunk in paint
  order and compose each shape's transform and clip the same way.
- Route every remaining hand-written text and shape walk in the
  ui-egui tests through text_shapes or these helpers, keeping each
  test's assertions and its first-painted or last-painted order.
- panel_readout_copy: the Link Info Name check called the removed
  text_shape helper and did not compile; it now reads visible_paint.
  Format the file.
2026-11-29 06:01:24 -08:00
FredApps 98a8cda027 Track retained paint in VectorCraft menu and readout tests
Keep the existing pointer and text expectations on composed paint output. Preserve paint order and apply the retained transforms and clipping when finding drawn controls.
2026-11-29 14:25:08 +01:00
FredApps 267b55bfa5 Read retained paint chunks in UI label tests
Collect painted swatch labels from retained paint chunks as well as flat shapes. Keep the localized-label and physical pointer assertions unchanged in scope.
2026-11-29 13:40:19 +01:00
dotCooCoo 148541971f UI: Fidelity applies only once committed in freehand Tool Options and the Contextual Task Bar
The Contextual Task Bar ran tool.setOption for the Smooth tool's Fidelity
on every typed proposal, so a value typed and then canceled with Escape
stayed set on the tool. The bar now sets the option only when the field
commits the value.

In the freehand Tool Options dialog, Escape during a Fidelity slider drag
left the dragged value in the dialog. The draft now follows the drag
unrounded, takes the rounded value when the drag ends, and gets the value
from before the drag back on Escape, including a value above the slider's
end that the field allows. The dialog's Fidelity field reads its edit
events with landed(), as the variation fields do.

Follow-up to #9753.
2026-11-28 22:58:54 -08:00
.CooCoo 2255484d45 Merge pull request #9132 from dotCooCoo/feat/js-es2015-modules
JavaScript: a .mjs script runs as an ECMAScript 2015 module
2026-11-28 20:44:58 -08:00
dotCooCoo cac93ca107 Merge main into feat/js-es2015-modules 2026-11-28 20:44:06 -08:00
dotCooCoo 3e2a615aee Merge main into feat/js-es2015-modules 2026-11-28 19:45:10 -08:00
dotCooCoo 828eb27097 Merge main into feat/plugin-api-localized-labels
# Conflicts:
#	crates/plugins/src/manifest.rs
#	crates/ui-egui/src/tests/panel_harness.rs
2026-11-28 19:28:43 -08:00
dotCooCoo ebeaa1d91f Merge main into feat/plugin-api-localized-labels 2026-11-28 19:20:09 -08:00
.CooCoo 6355b468a5 Merge pull request #10009 from dotCooCoo/fix/panel-harness-off-window
Tests: panel harness clicks fail on controls outside the window
2026-11-28 17:28:34 -08:00
.CooCoo acec33a9f2 Merge pull request #9082 from dotCooCoo/feat/scripts-scriptui-dialogs
Scripts: build and show ScriptUI dialogs with new Window("dialog")
2026-11-28 16:51:41 -08:00
.CooCoo e0649cf32f Merge pull request #8924 from dotCooCoo/feat/script-warning-reaches
Scripts: the Other Script… warning lists what the script reaches outside the document
2026-11-28 16:09:06 -08:00
dotCooCoo 322869e87c Tests: panel harness clicks fail on controls outside the window
Panel::in_view reported a control as visible when its rect lay past the
fixture's window, because the fixture's visible check clips only to the
arena. A click or press then aimed at a point outside the window, hit
nothing, and the test failed later on an unrelated assertion.

in_view now also clips to the window (the room, at least 800 by 600
points). click, press, double and right clicks, drags, typing and
click_part check that the point they aim at is inside the window and
fail with a message that names the control, its rect and the window.
2026-11-28 15:38:15 -08:00
.CooCoo 2c84465fba Merge pull request #9963 from dotCooCoo/fix/ui-sweep-dock-panels-b
Panels: Document Info values line up, Image Trace Create shows its labels, and Info and Links keep their spacing
2026-11-28 14:27:47 -08:00
dotCooCoo 57cf0f348f Merge main into feat/script-warning-reaches
# Conflicts:
#	crates/ui-egui/src/tests/script_run.rs
2026-11-28 14:23:56 -08:00
dotCooCoo 9c0945545b Merge main into feat/scripts-scriptui-dialogs
# Conflicts:
#	crates/js/src/scriptui.rs
#	crates/js/src/scriptui_tests.rs
#	crates/ui-egui/src/script_runs.rs
2026-11-28 14:23:52 -08:00
.CooCoo 3e9b4f735c Merge pull request #9947 from dotCooCoo/fix/anchor-inspector-accepted
Anchor Inspector: canceling a field edit restores the anchor or the Points per segment count
2026-11-28 13:40:00 -08:00
dotCooCoo c35288f4d1 Merge main into fix/ui-sweep-dock-panels-b 2026-11-28 13:35:03 -08:00
dotCooCoo 55e8083aff Scripts: the control-size test measures the field by its name
tests::script_window::controls_are_drawn_at_the_size_the_script_gave_them took the first text
input in the accessibility update. The field exposes two, the field itself, named Text and
200 points wide, and the editor inside its 6-point padding, 188 points wide, and egui lists the
update's nodes in hash-map order, which other widgets in the frame change. After #9255 merged, the
editor came first and the test failed although the field is drawn at its preferred width. The test
now looks the field up by its name.
2026-11-28 12:03:06 -08:00
dotCooCoo fd5094286e Merge main into fix/ui-sweep-dialogs 2026-11-28 09:50:06 -08:00
dotCooCoo 84eef86c0a UI: dialog option rows stand beside or under their choice
- Transform effect: the Scale, Move and Rotate rows span the dialog
  instead of sitting behind a "Transform" label, and Reflect X,
  Reflect Y and Random show their names (the boxes were unlabeled).
- Transform Each: the reference point picker shows its name.
- Zig Zag, Roughen and Tweak: Relative and Absolute stand on one
  line, and so do Smooth and Corner.
- Corners: Relative and Absolute stand on one line.
- Drop Shadow: the color well stands under Color and the Darkness
  field under Darkness.
- Print: the Range field stands under the Range choice instead of
  after Ignore Artboards.

Each uses the form's own radio layouts (options_in_row, under_option)
and plain check box rows. Tests in tests/dialog_layout.rs check where
the dialogs paint these rows.
2026-11-28 09:39:38 -08:00
dotCooCoo 02d419c4ec Merge main into fix/ui-sweep-dock-panels-b 2026-11-28 09:31:51 -08:00
dotCooCoo 81dc35e258 Panels: Document Info, Info, Image Trace and Links spacing and labels
- Document Info: each value stands at the end of its row again, in a
  column apart from its label. The row no longer wraps, since a wrapping
  row places its children at the start. The sections fill the panel's
  width, and a section gap sets each divider apart from the sections
  around it.
- Info: the two columns of numbers split the panel in halves, and a
  section gap sets the paints and the type apart from the divider.
- Image Trace: Create: shows the Fills and Strokes labels after their
  check boxes. Inside the Create field a check box's own label was not
  drawn, so each box now takes a field with its label after it.
- Links: an empty panel shows the link icon, "No images" and the hint
  that File > Place brings an image in.

Tests in panels/tests_panel_spacing.rs cover each change.
2026-11-28 09:31:21 -08:00
dotCooCoo e8fc951d92 Merge main into fix/ui-sweep-canvas-chrome 2026-11-28 09:26:30 -08:00
dotCooCoo 745a0d5b7b UI: canvas chrome clears the scroll bar and the empty navigator
- The Rotate View compass of a turned view sits left of the vertical
  scroll bar. It was placed in the canvas's top right corner, where the
  scroll bar drew over most of it.
- With no document open, the status bar's artboard navigator shows a
  dash instead of an empty box.
2026-11-28 09:26:23 -08:00
dotCooCoo 5f907f863a Merge main into feat/plugin-api-context-menus 2026-11-28 08:46:27 -08:00
dotCooCoo 5b57822605 Anchor Inspector: canceling a field edit restores the anchor or the Points per segment count
The X, Y, Length and Angle fields ran addon.pathtools.setAnchor with each
value as it was typed, outside any undo scope, so Escape left the anchor
edited and an angle edit could leave one undo step per keystroke. Each
field's gesture now runs in one undo scope (EditPath::Scope): Enter keeps
the edit as one undo step, and Escape restores the anchor with no step.

While an Angle edit runs, the field shows the handle's angle in the typed
value's turn, so a typed 200 is not read back as -160, which the field
took as a change made by the app and ended the edit with it kept.

Points per segment takes the value its field holds after its events, so a
canceled edit leaves the count Add Points uses as it was.
2026-11-28 08:13:12 -08:00
.CooCoo c2e4966407 Merge pull request #9255 from dotCooCoo/feat/scripts-scriptui-resources
Scripts: ScriptUI builds windows and controls from resource strings
2026-11-28 08:03:55 -08:00
dotCooCoo 88fb7a8128 Merge main into feat/scripts-document-views 2026-11-28 07:25:53 -08:00
dotCooCoo 6eb0428586 Merge main into feat/plugin-api-context-menus 2026-11-28 05:32:32 -08:00
dotCooCoo 30cadc9538 Merge main into feat/scripts-scriptui-dialogs 2026-11-28 05:12:02 -08:00
dotCooCoo ab6a0d44aa Merge main into feat/scripts-scriptui-resources 2026-11-28 05:12:02 -08:00
dotCooCoo dbc31253dc Scripts: ScriptUI controls are drawn at the place and size the dialog's layout gives them
Buttons, static texts, edit fields, drop-down lists, sliders, progress
bars and radio buttons were drawn at their own size inside their place,
so a button given a larger preferredSize or bounds stayed small, and a
control larger than its place ran over the next one. They are now drawn
at their place. A check box is still shown in the flow of its place,
which draws its text after the box.
2026-11-28 04:23:23 -08:00
dotCooCoo c1d4192ae3 Scripts: a ScriptUI list box shows only the rows that fit its height at the height it draws them
The list box counted its rows at 18 pixels each, while the list draws
each row at the theme's control height, so a list box ran past its
place and over the control below it, which then took clicks meant for
the list's last row.
2026-11-28 03:05:03 -08:00
dotCooCoo 1d3e835927 Scripts: ScriptUI review fixes for heap-limit adds and removes, listeners, list texts, Enter, the run's questions and automation requests
- Adding a control or an item, and removing items, builds both arrays
  before the first write, so a run that ends at the heap limit leaves the
  lists and the dialog's counts as they were.
- A listener registered after an event started does not hear it in a later
  phase, a capturing container's re-registration included.
- show() reads the dialog again when a getter changes a list item's text
  after the item was read.
- Enter and Escape skip an OK or Cancel button inside a hidden or disabled
  container.
- A resource string of a name and a type without braces throws a
  SyntaxError, and a \u escape pair of surrogates reads as one character.
- In the app, queued events wait while another dialog is open over the
  script's dialog, and the run's own questions wait while a popup, such as
  an open drop-down list, is over it. ui.dialog.confirm and
  ui.dialog.cancel take only the dialog, ui.dialog.set needs a field or an
  action and answers with the dialog it set, and OK is refused while a
  dialog open over it waits. A cancel after typed text clicks the cancel
  button the dialog has when its turn comes, and an immediate cancel the
  run refuses is an error.
- A click on a list box row gives the list the keyboard focus.
- The vc hint test names BridgeTalk, since Window now exists; the params
  text and docs/mcp.md say that a show() in a handler notify runs throws
  only in the app, and define_script_ui says when end is not called.
2026-11-28 02:43:06 -08:00
.CooCoo 0b933e7a36 Merge pull request #9127 from dotCooCoo/feat/plugins-web-worker
Plug-ins: the web build checks plug-ins and runs filters in a Web Worker
2026-11-28 01:04:54 -08:00
dotCooCoo 60ba6ac992 Merge main into feat/script-warning-reaches 2026-11-28 00:29:36 -08:00
.CooCoo 1f9b44c65c Merge pull request #9880 from dotCooCoo/fix/swatch-footer-menus
Swatches: Swatch Libraries and Show Swatch Kinds report that they open a menu
2026-11-28 00:28:19 -08:00
.CooCoo 484e561867 Merge pull request #9873 from dotCooCoo/fix/taskbar-fidelity-label
Contextual Task Bar: the Smooth tool's Fidelity label is framework Text on its field's row
2026-11-27 23:36:45 -08:00
dotCooCoo 4cac1da41e Scripts: a ScriptUI button in a hidden or disabled group is not the default, and a question over the dialog holds its queued events
Enter and Escape found OK and Cancel by their own enabled and visible flags only, so an OK button inside a disabled or hidden group could become the default element and the usable OK button after it could not. A control is now usable only when every container that holds it is enabled and shown.

While a question such as the one quitting asks was open over the ScriptUI dialog, each frame still gave the run the dialog's queued events, so a queued click on OK could close the dialog before the question was answered. The events now wait until the dialog is on top again.
2026-11-27 23:36:35 -08:00
dotCooCoo 441d9161a5 Swatches: Swatch Libraries and Show Swatch Kinds report that they open a menu
The two footer buttons open menus but set no popup kind, so the footer
drew no dropdown arrow under them and screen readers were not told they
open a menu. Both now call `.popup(PopupKind::Menu)`, as the menu
buttons in the Brushes, Graphic Styles, Symbols and library panel
footers do.

`panel_harness` gains `Panel::popup_kind`, which reads the popup kind a
control reports from the accessibility tree.
2026-11-27 23:23:13 -08:00
dotCooCoo 306153fe10 Merge main into feat/plugins-web-worker 2026-11-27 23:16:19 -08:00
dotCooCoo 875f49fc8d Merge main into feat/plugins-web-worker
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
2026-11-27 23:05:07 -08:00
dotCooCoo 6d457aa5e9 Tests: the Scripts menu tests import Duration again
main does not compile its ui-egui tests: crates/ui-egui/src/tests/scripts_menu.rs uses
Duration at lines 37, 320 and 324 without importing it (error E0433, "cannot find type
`Duration`"). #9816 removed the `use std::time::Duration;` line when its own uses went
away, and a354d09af4, merged at about the same time, added new uses of Duration in the
same file. Each passed CI on its own head; the two together do not build.
2026-11-27 23:00:30 -08:00