Commit Graph
282 Commits
Author SHA1 Message Date
Dylan M. Taylorandautocraft-bot[bot] c684db5428 Tools: selection bounds in one walk, bounded smart spacing and parent snapping (#2260)
* tools: selection bounds in one walk, caps on smart-spacing boxes and parent occurrences

* Apply review fixes

- crates/tools/src/lib.rs

* address review: iterative selection walk; stop collecting spacing boxes at the cap

---------

Co-authored-by: autocraft-bot[bot] <354215646+autocraft-bot[bot]@users.noreply.github.com>
2026-11-11 16:17:42 -05:00
9da88149be Fix Links panel stalls on network paths (#1444)
* Fix Links panel stalls on network paths

* Fix Links review findings

* Fix Links worker gating and wasm build

A link check blocked on another document's unreachable share no longer
holds back the document now shown: after 200 ms a fresh worker takes
over (at most four alive at once) and the stale result is dropped.

relinked_asset used the native-only fingerprint_from, breaking the
wasm build; it now uses fingerprint_of. The EPS relink and IDML link
reach tests build Windows paths correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix Links worker repaint and graphic read retry

Switching documents before the 200 ms takeover now schedules a repaint
for it: a blocked worker never asks for one, so without other input the
panel kept waiting. A failed graphic read is no longer cached as
missing, so the next check reads again. The legacy EPS fixture clears
its source fingerprint, as documents from before fingerprints have
none, so the test no longer depends on running within two seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep touched links OK and poll Links within seconds

Only a new size now marks a graphic Modified from its fingerprint. A
file with the same size but a new time (saved again, copied, restored
or checked out) is compared byte for byte, once per new time, and stays
OK when unchanged.

External changes are polled every two seconds instead of every five
minutes. The next check waits at least as long as the last one took
(up to five minutes), so a slow share stays idle half the time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Wake Links when a worker slot frees; translate check strings

A worker thread asks for a repaint when it ends, so a document waiting
at the four-worker limit gets a worker as soon as a superseded one
returns from its blocked call, without other input.

Rows from a check keep a weak reference to their document. The key
names it by address, which a later document can't reuse while the
allocation is kept.

The Links panel's new strings ("Checking", "Checking links…", "Link
status is unavailable.") use the UI's ellipsis and are translated in
every interface language. The comments on Session::text_link_checks and
on the byte comparison in links::status describe what they do now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Links: rows from the document, statuses from a check that can stop

The panel lists links from the document on the UI thread (no file is
looked at) and fills in the statuses a worker check last found, kept
per document. An edit shows at once, and a check of an earlier edit
still supplies statuses instead of being discarded.

- A check of another document is told to stop and ends before its next
  file; only one blocked in a file system call is replaced, so blocked
  workers no longer hold their slots for a whole document.
- Checks are timed on the worker, and what they remember passes to the
  worker that replaces them.
- A fingerprint is kept only for a file whose time was settled when it
  was read, as for linked text. A file found unchanged by its bytes
  gets its current size and time stored with the document
  (remember_link_files), without marking a saved document as changed.
- Asset::set_link keeps link and fingerprint together; copies made by
  Package and Copy Links To carry none.
- The Session holds one LinkListChecks. Update Link lists files only
  when a linked story was edited in the layout.
- The unused "Checking links..." caption is removed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-10 17:39:39 +01:00
Hamza Naveed 59501a26f9 An item a parent overrode and deleted is gone from the pages that use it (#1469) (#1558)
* An item a parent overrode and deleted is gone from the pages that use it (#1469)

In InDesign, removing an inherited item from a parent page means overriding
it there and deleting the override: the parent's page keeps the item in its
override list with no copy of its own. Only the page being drawn was checked,
so the pages that use that parent still drew the base's item -- a signature
block from parent B over the notice text of every page using parent E.

The override lists of the whole parent chain are checked, not just the page's
own. An override always names an item of a parent further back, so one set
covers the chain.

Rebased onto the post-split main: the parent-item loop moved from render's
lib.rs to draw.rs and the tests to tests.rs.

One thing this does not touch: blendspace.rs checks `page.overridden` the same
way in two places, for deciding which spreads hold transparency. A deleted
override there would count an absent item as present, which can only cost an
unnecessary flatten rather than draw the wrong thing, so it is left for a
maintainer to judge rather than widened into this fix.

* Parent items: one set of overridden items for drawing, PDF and PPTX export, hit-testing, snapping and frame edges

* Override All: an item a parent removed is not brought back as a copy
2026-11-05 22:22:47 +01:00
MarekSpodBiedry df9f0656ca Master pages: skip hidden and locked layers when picking items (#2221) (#2292) 2026-11-04 07:09:20 -05:00
KnottyDyesandClaude Opus 5.5 5bd8ada171 Place: lines don't become frames when content is placed
Placing an image or media with no placement parameters used the selected
item as the frame, and so did a click of the loaded place cursor. On a
line that made a zero-height frame that kept its stroke. All three now
skip items that enclose no area (PathData::encloses_area): lines and
paths whose points all lie on one line get a new frame instead. Frames,
and open paths that enclose an area, take the content as before.

An explicit frame, x, y, spread or width behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:52:04 -07:00
Tex Jernigan e1910529a7 Frames with a nested image: hit inside the frame, take a placed graphic; replacing keeps the crop; open on a usable layer (#2226)
* Frames holding pasted-in images are hit inside the frame, take a placed graphic; documents open on a usable layer

A frame with items pasted into it (how a document from InDesign keeps a cropped photo) was hit
through its children like a group, so the whole uncropped image counted: a click on the empty
page beside such a photo selected it, and nothing could be deselected there. It is now hit by
its own area, as it is drawn clipped. Such a frame holding only graphics also takes a placed or
dropped graphic (Item::takes_graphic), which fills it as an empty or graphic frame is filled.

A document opened with new objects going to its top layer even when that layer was hidden and
locked (a dieline), so a placed graphic showed as an empty frame outline. It now opens on the
topmost layer that is shown and unlocked (Document::working_layer).

* Place: a graphic replacing the one a frame shows keeps the frame's crop and zoom

Placing or dropping into a frame that shows a graphic (in it, or as the one graphic pasted into
it) filled the frame afresh, so the crop and zoom chosen for the old picture were lost. The new
graphic now covers the old one's area, centred on it: an edited copy of the same picture lands
exactly where the old one was.

* Move the replace-keeps-crop and open-on-a-usable-layer changes to their own PRs

Review asked for them to be checked against reference app behaviour on their own. This PR keeps
the frame hit area and Item::takes_graphic. Reverts 8ea0bc16 and drops Document::working_layer.

* Move Document::working_layer and its test to #2267
2026-11-03 17:21:35 -05:00
aiongg 49e934d8ba Merge main into snap-page-centre 2026-11-03 19:11:20 +00:00
Brandon Thomas ab96d42696 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-02 23:24:47 -05:00
Trevor BrownandClaude Fable 5.1 5b48a6fcf7 M4: the Pen's drag preview on a continued end point runs from the anchor it is joined to (#1438)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 04:04:42 -05:00
Trevor BrownandClaude Fable 5.1 93999750aa M4: the Pen previews the segment a dragged smooth point shapes and curves the rubber band after one (#1438)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-02 03:19:46 -05:00
makesomethingshit 5c364f9897 #1620: Port parent resizing to current layout modules 2026-11-01 15:18:55 +09:00
aiongg f3e0f614fd Integration: #1416 Clear acts on live points only; reset anchor_release on press 2026-10-31 00:13:37 +00:00
aiongg aae929eb97 Merge track 3 2026-10-30 23:56:48 +00:00
aiongg 8d55602ef1 Merge PR #1430: Properties: Anchor Point(s) with Convert Points and Delete Point(s), as in the reference app
crates/tools/src/select.rs: took the PR's later anchor_selection and moved_points use; kept main's content-mode-off corner pull
crates/ui-egui/src/canvas/frames.rs: kept the handle_shown filter from #1657
crates/ui-egui/src/panels/properties.rs: kept main's imports
crates/ui-egui/src/panels/properties/tests.rs: kept both sides' tests
crates/ui-egui/src/i18n/{ar,cs,de,it,ja,ka,pl,pt_br,ru,uk}.rs: union of both sides' keys
2026-10-30 23:15:49 +00:00
aiongg b142604cb3 Merge PR #1392: Place cursor thumbnail and proportional drag 2026-10-30 23:15:22 +00:00
aiongg 9b36f1f139 Merge PR #1657: Direct Selection: handles around the selected anchors only, and no bounding box
crates/tools/src/select.rs: dropped the doubled corner-pull block (the PR's copy of the old code and main's); kept one with main's content-mode fix and the stack's others field
crates/engine/src/tests.rs: kept main's tests and the PR's new test
crates/ui-egui/src/canvas/frames.rs: kept the PR's handle_shown filter
2026-10-30 23:15:07 +00:00
aiongg 3b79317e03 Merge PR #1416: Direct Selection: select anchor points with a marquee across paths and move them together
crates/engine/src/tests.rs: kept main's tests and the PR's new tests
crates/tools/src/tests.rs: kept main's tests and the PR's new tests
2026-10-30 23:14:41 +00:00
aiongg 978effab49 Integration: #902 Direct Selection anchor drags send a spread-space delta 2026-10-30 21:24:27 +00:00
aiongg 55fb94242e Integration: #902 Direct Selection anchor pull selects the frame, not its content 2026-10-30 21:24:27 +00:00
aiongg 09fbe280ff Integration: #1125 Direct Selection on one of several selected frames selects just that frame 2026-10-30 21:24:27 +00:00
aiongg 0a2a2039a5 Merge PR #1674: Tables: Shift+Tab goes back a cell, and Esc toggles between the text and the cell 2026-10-30 19:44:37 +00:00
aiongg bf67b94f4b Merge PR #1407: Type tool: a drag that starts in an empty frame draws a new text frame over it 2026-10-30 19:44:36 +00:00
aiongg 5599783a6c Merge PR #1418: Frame tools: the size readout shows the document units 2026-10-30 19:44:36 +00:00
aiongg 8227f29295 Merge PR #1125: Direct Selection on a selected frame selects its image, so Delete keeps the frame
crates/engine/src/tests.rs: kept both new tests (#902 corner pull, #1125 image delete)
2026-10-30 19:44:33 +00:00
moppeeerandClaude Opus 5.5 785c49a1d4 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:08:12 +01:00
moppeeerandClaude Opus 5.5 11ef2cc840 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:01:01 +01:00
moppeeerandClaude Opus 5.5 3b86c0ca06 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 14:06:07 +01:00
moppeeerandClaude Opus 5.5 07a4696a9f rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 13:59:35 +01:00
moppeeerandClaude Opus 5.5 5fc7496629 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 13:43:42 +01:00
moppeeerandClaude Opus 5.5 4a71ee5d83 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 13:22:55 +01:00
moppeeerandClaude Opus 5.5 fd7d8dfb77 rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:08:10 +01:00
moppeeer 89808ec42f Merge remote-tracking branch 'origin/main' into codex/direct-select-unselected-anchor
# Conflicts:
#	crates/tools/src/select.rs
2026-10-29 11:45:00 +01:00
moppeeer 42a3637bfc Merge remote-tracking branch 'origin/main' into direct-select-delete-image
# Conflicts:
#	crates/tools/src/select.rs
2026-10-29 11:44:41 +01:00
moppeeer 8b7f17e60c Merge remote-tracking branch 'origin/main' into loaded-cursor-thumbnail
# Conflicts:
#	crates/engine/src/cmd/file.rs
#	crates/tools/src/snap.rs
#	crates/ui-egui/src/canvas.rs
2026-10-29 11:43:56 +01:00
moppeeer 740227bd18 Merge remote-tracking branch 'origin/main' into snap-page-centre
# Conflicts:
#	crates/tools/src/snap.rs
2026-10-29 11:43:39 +01:00
moppeeer 00a64e5943 Merge remote-tracking branch 'origin/main' into direct-select-anchor-points
# Conflicts:
#	crates/tools/src/select.rs
#	crates/ui-egui/src/canvas.rs
2026-10-29 11:43:21 +01:00
moppeeer 5a4012bab8 Merge remote-tracking branch 'origin/main' into properties-anchor-points
# Conflicts:
#	crates/tools/src/select.rs
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/i18n.rs
#	crates/ui-egui/src/panels/properties.rs
#	docs/target-app-parity.md
2026-10-29 11:42:56 +01:00
moppeeer f0b580074d Merge remote-tracking branch 'origin/main' into direct-select-handles
# Conflicts:
#	crates/tools/src/select.rs
#	crates/ui-egui/src/canvas.rs
2026-10-29 11:38:53 +01:00
moppeeer 0d9b7c74ac Merge remote-tracking branch 'origin/main' into table-cell-keys
# Conflicts:
#	crates/engine/src/cmd/table.rs
#	crates/engine/src/cmd/text.rs
2026-10-29 11:38:49 +01:00
Dylan M. Taylor bcb9546f5d Refactor tools for strict Clippy checks 2026-10-28 11:39:26 +00:00
aiongg 6fae1b2e92 refactor(tools): move the tests module of snap.rs to snap/tests.rs 2026-10-26 18:18:13 +00:00
aiongg 073ac98694 Merge upstream main into keymap-adoption; pin craft-libs to main e3b9e239
Main's shortcut dispatch (shortcut_key, used for keys forwarded from floating panel windows)
becomes the keymap's: shortcuts and forwarded_shortcuts both take their presses through the
key dispatcher and run them once the input is released. craft-keymap comes from
storytold/craft-libs, ForeignSet is built through its constructor, and the panel shortcut test
asks the docking layout which panel shows.
2026-10-25 19:36:33 +00:00
skylar taylor-barrick bd4b9dd1d2 egui-037: reconcile shared window integration with main 2026-10-25 18:34:10 +01:00
Brandon Thomas 05a8d6ac02 Merge pull request #1777 from Silvertree2010/fix/h2047-gradient-swatch-feather-tool-dra
Convert gradient tool drag to spread space on rotated spreads
2026-10-25 12:26:00 -04:00
moppeeer 208593af17 Merge remote-tracking branch 'origin/main' into table-cell-keys 2026-10-25 17:13:33 +01:00
moppeeerandClaude Opus 5.5 2e44b19096 Table keys and cell commands: footnote text isn't a table cell
The caret in a footnote has a CellAddr too (FOOTNOTE_TABLE). Shift+Tab
and Esc there now act as outside a table, and table.nextCell,
table.prevCell and table.toggleSelection refuse it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:13:33 +01:00
skylartaylor 8a6ed75d41 egui037: reconcile current DesignCraft main and qualify CI 2026-10-25 03:38:13 +01:00
skylartaylor a2db858e7d egui037: Port DesignCraft to egui 0.37
Pin the final egui, winit and shared UI revisions and reconcile current main.
Preserve document-epoch input and screenshot boundaries, host action ordering,
and Windows path regression coverage. Add click/End batch characterization.

Validation: all nine Linux CI stages pass (3230 tests, zero failures); Windows
CI and bounded native editing workflows pass on the same production source.
2026-10-25 00:52:21 +02:00
skylar taylor-barrick 9fc02f8f7b Merge contributor branch codex/placed-graphic-layer-overrides (PR #1647) into main
Conflict resolutions:
- crates/pdf/src/export.rs: keep main's `graphic(.., hidden)` signature from
  #1241 and report retained graphic-layer overrides that drawing cannot apply.
- docs/gaps.md: keep main's change list and add the graphic-layer entry.
2026-10-24 15:30:03 -06:00
NetterSilverandClaude Haiku 5.5 3e7aeaa142 Convert gradient tool drag to spread space on rotated spreads
Found while testing crates/tools/src/gradient.rs:62 (PointerKind::Drag branch: `let to = *sp + (end - *start);`)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 15:00:35 +00:00