Commit Graph
119 Commits
Author SHA1 Message Date
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
dotCooCoo 5044b75ccf Info panels: empty readouts offer no Copy action
A panel readout that cannot be copied (an empty value, a disabled row or
a value clipped out of view) still told screen readers it had a Copy
action, and the action did nothing. An empty Link Info row, such as
Color Space for a placed document, showed it. The Copy description and
click action are now added only when a click on the value would copy.

New tests in panel_readout_copy.rs:

- empty_link_info_values_do_not_offer_copy: the empty Color Space row of
  a placed .vectorcraft link has no Copy action, and a forged click on it
  copies nothing.
- info_readout_copy_requires_the_press_and_release_inside_its_bounds: on
  the Info panel's W readout, a press outside followed by a release
  inside copies nothing, with the release in the same frame or the next.
- link_info_stays_visible_while_a_long_image_list_scrolls: with 32 images
  in each thumbnail size, Link Info stays in place and copyable while
  the list scrolls to its end.

Follows #8826 by @yoriswind.
2026-11-28 00:38:02 -08:00
.CooCoo 77a609eed6 Merge pull request #9820 from dotCooCoo/chore/craft-libs-pin-51fcc3b0
Dependencies: take every craft-libs crate from craft-libs main at 51fcc3b041
2026-11-27 21:35:36 -08:00
.CooCoo 3737ccdc9a Merge pull request #9838 from dotCooCoo/fix/script-folder-scan-clock
Scripts: folder listings take their time limit from the session's clock
2026-11-27 21:14:30 -08:00
dotCooCoo a354d09af4 Scripts: folder listings take their time limit from the session's clock
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.

- folder::Clock is either Wall (the real time since the listing started,
  the default) or Fixed (the same time at every check). Both list
  functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
  the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
  Mode tests list with a fixed zero time, so a slow disk cannot cut a
  listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
  menu stop at the session's clock once it is past the limit and list
  everything at the limit.
2026-11-27 16:10:28 -08:00
dotCooCoo a0d922c0f2 Dependencies: take every craft-libs crate from craft-libs main at 51fcc3b041
All storytold/craft-libs crates and the hayro, krilla and linesweeper
patches move from b0d422cf0c to 51fcc3b041, the head of craft-libs main
(craft-libs#3718). craft-libs main now holds what was on next, so the
pin follows main as AGENTS.md rule 10 asks. The move brings the .cmx
writer (craft-libs#2807) and the macOS Save sheet Format menu
(craft-libs#3565). xtask pdf-deps expects the new rev.

The egui patches move from b15ffe9bfc to 932a73b285, the egui rev
craft-libs main pins: craft-ui-contract at 51fcc3b041 calls
Context::set_pointer_move_gate and Context::widgets_at, which
storytold/egui adds after b15ffe9bfc.

App changes the move needs:
- AppShell's title, options, status and hint slots take a version
  function (craft-libs c417cd3050). Each passes |_| None, so every slot
  still runs in every pass.
- PartResult::hover_pos is private (craft-libs 27e8a77145). The track
  cube reads the pointer through Cx::hover_pos, which is None when the
  cube is not hovered, as the old filter on hovered was.
- craft_dxf::write_binary returns a Result (craft-libs#3347, binary DXF
  writing fails on an invalid integer). The binary DXF import test
  unwraps it.

Test changes the move needs:
- An inline slider field now shows its slider before its number field,
  and both carry the field's name (craft-libs#3553). The panel harness
  types into the number field, the part that takes typing, and the
  plug-in effect test reads the number field's value.
- A painted tool cursor's marks use the overlay.cursor token (craft-libs
  a830ff539b), so the cursor test looks for that color.
- The Keyboard Shortcuts area tabs are named by their visible label,
  "Show:" (craft-libs 702cb295c6).
- The gradient stop's color mode menu now opens over part of the stop
  editor. The test clicks the Web Color Sliders row where it lies
  outside the editor, as before, and keeps the same checks.

Cargo.lock adds what the new craft-libs crates depend on
(craft-control-protocol, craft-font-os-windows, ed25519-dalek and its
dependencies, jpeg-encoder 0.7.1 for craft-image-codecs).
2026-11-27 15:53:24 -08:00
dotCooCoo 7120dd34e7 Tests: panel readout copy cases hold the language guard
The integration binary from #8826 draws the Links panel's Location case in
French and German, and in an integration binary the UI language is one
value for the whole process. Under `cargo test`, which runs the cases on
threads of one process, the other five cases drew frames in French or
German, or reset the language to English under the Location case. Taps
then missed the moved readouts, and two cases failed on each run (on the
Location case and on the first-click copy cases). nextest runs each case
in its own process, so CI passed them.

Each App now holds the same language guard as control_bar_corners.rs and
selection_tools_toggle.rs: the cases run one at a time and the previous
language comes back when the app drops.
2026-11-27 15:51:37 -08:00
yoriswind 61a8ddc7a9 Check readout confirmation after the status bar paints 2026-11-27 02:40:57 -08:00
yoriswind 5e7eb14cc0 Keep localized link locations usable in narrow panels 2026-11-27 00:18:02 -08:00
yoriswind f8520c1c19 Reserve native Link Info space in the panel footer 2026-11-26 22:31:29 -08:00
yoriswind f9d08c1816 Merge main97da preserving panel readout controls 2026-11-26 22:28:54 -08:00
.CooCoo d18dbd07ea Merge pull request #9178 from yoriswind/codex/7918-gradient-stop-color-mode-menu
Gradient stop editor: add the Color mode menu
2026-11-26 21:36:10 -08:00
yoriswind ebca1b91d2 Format the Links allocation control 2026-11-26 19:46:27 -08:00
yoriswind 7c130058af Trace Links list allocation around the real info toggle 2026-11-26 19:39:44 -08:00
yoriswind 52ae1e82ab Trace the minimum-width Location integration fixture 2026-11-26 19:08:35 -08:00
yoriswind 4ae3911d6a Format the readout press-origin guard and boundary regression 2026-11-26 17:54:13 -08:00
yoriswind 5a834f70fd Require a readout-owned primary press before copying 2026-11-26 17:39:35 -08:00
yoriswind aaa1ffd202 Format the native Location copy regression 2026-11-26 17:11:06 -08:00
yoriswind 88601e7851 Preserve fitted link locations with accessible full-value copy 2026-11-26 17:03:23 -08:00
yoriswind 1ae771a3c5 Name the clipboard offer log used by the regression 2026-11-26 15:50:14 -08:00
yoriswind 2b632e3637 Format the native clipboard offer assertion 2026-11-26 15:35:22 -08:00
yoriswind 2ad736746a Observe native clipboard offers in the readout regression 2026-11-26 15:29:27 -08:00
yoriswind d6d9da434b Merge main and repair sampler roadmap table cell 2026-11-26 14:57:27 -08:00
yoriswind 560f4bc6d6 Merge main while preserving panel readout copying 2026-11-26 14:53:28 -08:00
yoriswind adb6cc916d Merge main86d into gradient color-mode menu 2026-11-26 14:48:03 -08:00
yoriswind f2c9e05294 Close the gradient editor with an outside-dismissed mode menu 2026-11-26 13:28:13 -08:00
yoriswind 58e99f5fb3 Format the native gradient stop interaction cases 2026-11-26 12:24:42 -08:00
yoriswind eab50d5f81 Merge current main into panel readout copy port 2026-11-26 12:12:19 -08:00
yoriswind 9577326753 Port remaining panel readout copies to native controls 2026-11-26 12:09:04 -08:00
yoriswind 2dba20477b Integrate current main into gradient stop mode menu 2026-11-26 11:50:42 -08:00
yoriswind 98b6631c09 Merge main and port gradient stop Color mode menu to native controls 2026-11-26 11:22:18 -08:00
dotCooCoo bacc27e2f1 Merge main into feat/scripts-startup-scripts 2026-11-26 11:04:04 -08:00
yoriswind e8f96d6021 Integrate upstream and disambiguate the inherited SHA-2 lock entry 2026-11-26 10:35:13 -08:00
yoriswind 1e4f18fc78 Retain owned sampler release and navigation coverage on native Canvas 2026-11-26 10:02:18 -08:00
dotCooCoo c7ae974cf3 Merge main into feat/corners-link-popup 2026-11-25 15:35:14 -08:00
dotCooCoo f906a0f814 Merge main into feat/scripts-startup-scripts 2026-11-25 09:16:13 -08:00
BFlat e4347f0d6f Look: production's breathing room across VectorCraft (type size, menus, dialogs, Home, panels) and main's lib test fixes (#9292)
* Theme: type at the size production draws it. Production set Inter at 92% of its nominal size, so its 13-point body, 12.5-point labels and 11.5-point captions read at 12, 11.5 and 10.5 points; SIZES took the nominal sizes, which drew every text about 8% larger than production on the same rows. Body and strong body 12, labels 11.5, captions 10.5, line heights kept. Dialog buttons at least 72 points wide, as production's.

* Theme: menus and dialogs as production spaces them. 29-point menu rows (production's 24-point rows 5 points apart), dialogs 22 points inside their edge (production's dialog margin) and 28-point dialog buttons. Needs a craft-libs rev with size.row.menu, size.dialog.button_height and space.pad.dialog (fix/vc-look9-metrics): on an older rev SIZES does not parse. Land it after that rev move.

* Home: production's rhythm through the framework's page sizes: 9 from title to subtitle, 27 to New and Open, which stand 28 high with 16 points beside their labels and 14 apart, 33 between sections, 15 under a heading, the community links in 24-point rows 5 apart and in the link colour alone (LinkLook::Plain on Home only); Learn's skills a heading gap apart, each title muted over its tutorials, which stand as tall as New and Open, as production's secondary buttons did

* Swatches: thumbnails at production's sizes and the footer split as production

The thumbnail views give the browser zooms of 1/4, 1/3 and 2/3 on the large
thumbnail: 12, 16 and 32 point tiles, production's 11, 15.5 and 30. The
library panels' saved view follows the new zooms. Swatch Libraries, Show
Swatch Kinds and the edit action stand at the footer's start edge; New Color
Group, New Swatch and Delete at its end edge.

* Color Guide: the footer split as production

Limit to Library stands at the start edge; Edit or Apply Colors, Save
selected colors and Save color group at the end edge, in that order.

* Graphic Styles: 40-point tiles in Thumbnail View

Thumbnail View sets its own zoom, as the list views do, so its tiles are
production's 40 points and no longer keep a list view's zoom.

* Align panel: the reference app's groups and rules: the align and distribute buttons in groups a section gap apart, a rule between Align Objects and Distribute Objects, and Distribute Spacing and Align To on one line with a rule between them

* Transform panel: a rule over the shape properties and over the options, as the reference app had

* Info panel: the two columns of numbers are equal halves of the panel, as the reference app had them

* Layers panel: the footer's layer count is a text unit of the footer row in the text ink, as the reference app showed it

* Libraries panel: the no-library notice shows the library icon over its title, as the reference app did

* craft-libs: next 5442cfb97, with the page rhythm tokens, LinkLook, the menu row height and the dialog padding and button height the look commits set

* Docking test: the report names the panel that has the keys after a click in its search field. A press on a dock tab now leaves the keys where they were (craft-libs TabStrip::keeps_focus), so the tab click alone no longer focuses the panel; the search lookup is a harness helper both tests use

* craft-libs: next 6fcf61c81, a document window raised as Presentation Mode ends comes to the front

* Canvas drops: a canvas takes no drop where a floating panel's OS window lies over it

The canvas's drop catcher accepted art carried off its own canvas wherever
the pointer was over the canvas, including where a floating panel's OS window
lies over it. The main window's pass runs first, so the canvas took the drop
and resumed the move, and the panel under the pointer got nothing. Every
target of the catcher now refuses a point that panel_docking::os_window_at
reports covered, the same rule the Selection tools' carry uses.

It used to work by accident: the carry's covered test flickered every other
frame, the move dispatched a drag in those frames, and the changed revision
made the canvas refuse the carried art until the release.

* Safe Mode: the choice about a stopped plug-in opens on the host at once

The choice was put on the host's startup queue, which the host drains
only at the start of its next pass. On main the first frame happened to
run a second pass (layout memory asked for a rerun), so the choice was
open by the end of the launch frame; the framework now settles that
frame in one pass, and the choice stayed queued until the frame after,
where an agent's ui.dialog.* found no hosted dialog open. The choice is
only asked for on an empty host, so opening it directly is what the
queue would do one pass later.

* Image Trace sampler test: a step runs until the press lifecycle reported its events

run_ui stopped stepping once egui had seen every pointer event of the
step. The press lifecycle reports one phase a pass, so a pass that
brings a release and the next press (two clicks in one frame) reports
the press's Down one pass later and holds its release for the pass after
that, asking for a repaint. The step ended before that pass, and the
second click of review_597048_two_ordinary_clicks_in_one_frame_survive_
sampler_correction never reached the tool, so the group did not isolate.

It passed before by accident: with craft-libs a4b6d3b6ca every other
frame ran a second pass, and the held release landed in it. With
6fcf61c81 each of these frames runs one pass. The step now also counts
the phases owed and runs empty frames until the passes have caught up.

* Shapes add-on: the helper that maps a shape tool to its icon is icon_for_shape, so the icon test no longer reads its tool ids ("polygon", "no-such-tool") as icon ids

* Native panel window test: drop the art on the first graphic style's tile

The test dropped the art 60 x 120 points into the Graphic Styles window. Since
Thumbnail View's tiles are 40 points (df940cff4e) the tile row ends at 116
points, so that point lies in the empty room below the tiles, which takes no
drop, and the panel made no style. The test now finds the first style's tile
by its name in the window's access tree and drops the art there. The test
host keeps each window's named access nodes for that.
2026-11-25 23:23:47 +07:00
BFlat 2a5dbc479f Merge pull request #9272 from dotCooCoo/fix/test-frames-before-input-once
Tests: the frame helpers give the runtime its input once per frame
2026-11-25 19:56:15 +07:00
BFlat 62eff34cc6 Merge pull request #9069 from dotCooCoo/feat/plugins-load-on-workers
Plug-ins: stored and folder plug-ins load on worker threads while the window shows
2026-11-25 19:32:48 +07:00
BFlat a8c852a121 Merge pull request #9297 from dotCooCoo/fix/sampler-two-clicks-one-frame
Tests: two clicks in one frame isolate in the frame that takes the second release
2026-11-25 18:20:35 +07:00
dotCooCoo 8f36898305 Tests: two clicks in one frame isolate in the frame that takes the second release
review_597048_two_ordinary_clicks_in_one_frame_survive_sampler_correction
sends press, release, press, release in one frame. The framework gives a
pass one press, so the second press reaches the canvas in the next frame
and its release waits one frame more; the framework asks for a repaint for
it. Since a frame runs its UI once (#9276), no second pass of the same
frame ends that release, so the trial checked isolation one frame early.
It now runs the frame the host would run before it checks, as the
double-click trials in canvas/tests.rs do since #9276.
2026-11-25 02:01:56 -08:00
dotCooCoo 5413935bbd Tests: the Safe Mode launch trials run the frame that opens the choice 2026-11-25 01:46:37 -08:00
dotCooCoo 9d225ba091 Merge main into feat/plugins-load-on-workers
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
2026-11-24 23:31:07 -08:00
dotCooCoo 225e810289 Tests: the frame helpers give the runtime its input once per frame, as the apps do, and run the commands a pass fired without a second input, which made every command state of the next frame look changed and asked for a rerun 2026-11-24 20:51:44 -08:00
dotCooCoo 2b4e34c7a2 Merge main into feat/corners-link-popup 2026-11-24 20:39:43 -08:00
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
yoriswind a99db2ce13 Select gradient mode buttons by their accessibility role 2026-11-23 10:08:56 -08:00
yoriswind f7a8565ca4 Merge current main for the gradient stop color-mode menu 2026-11-23 09:34:00 -08:00
dotCooCoo 27011606a5 Scripts: run startup scripts at launch and before a chosen script
With Preferences > General > Run Startup Scripts on (off by default), the
.jsx files of the Startup Scripts folder next to the preferences run when
VectorCraft starts and before each script chosen from File > Scripts,
installed or Other Script..., one at a time and sorted by name without
regard to case. Each runs with the limits of any script and its own undo
step; one that cannot be read, is too large or fails is named in the
Script Console and the status bar, and the next one runs, then the chosen
script. Nothing runs in Safe Mode; after a launch that stopped, they run
once Disable and Continue or Start Normally is chosen, and the launch
marker names the running startup script so a stop there offers to disable
it. script.startup.run runs the folder; script.* is refused inside
scripts, so a startup script cannot start another round.
2026-11-21 20:20:34 -08:00