Commit Graph
37 Commits
Author SHA1 Message Date
aiongg fb45d473df Dock workspace: tabs closed together reopen together (photocraft#15545)
When one apply_all batch closes several tabs of a group (Close Tab Group, or a
preset that closes panels one at a time), each closed panel's Location records
the set in closed_with. Reopening any of them restores the set in group order,
each by its own record, with the requested one in front. A tab closed in a
batch of its own stays closed: the set only counts members whose records name
each other.
2026-11-21 07:42:39 +00:00
aiongg c30c9e1749 Merge remote-tracking branch 'upstream/next' into memo-stack
# Conflicts:
#	crates/layers/tests/it/main.rs
#	crates/menu/tests/it/main.rs
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
2026-11-20 20:32:36 +00:00
David Mann d7a61a8889 Snap targets can reach past their spans
A spanned target catches only a point or box overlapping its span on the
other axis since canvas-w4, which keeps a layer's edge on its page from
catching a box on another page. Photoshop-style layer edges snap a box
beside them too (side-by-side boxes align their tops), so PhotoCraft's
Move tool stopped snapping to other layers' edges.

SnapTargets::reach_past_spans() lets every target catch along its whole
line, the span only shaping the drawn smart guide. The default is
unchanged, and filtered() keeps the setting.
2026-11-20 19:45:06 +01:00
aiongg d1386328c2 Dock on Derived: one rail-grid conversion, window ids never reused, docs
- A panel's grid is read only through DockSizes::stepped, in the dock's own sizes, so
  DockGrid::rail is converted in one place; ToolRail counts its columns in its scope's
  style (DockSizes::of_scope), and ToolRail::dock_grid is gone.
- A layout's window counter starts above every id it is built or loaded with; a dock
  area raises a workspace an undo brings back above every id it has shown
  (Workspace::raise_window_floor). A saved u64::MAX id loads without overflow.
- Floating::id and DockArea::new docs say how ids are given and why to keep one Arc.

Part of #2336.
2026-11-20 18:16:52 +00:00
aiongg 42739aaa2d Dock on Derived: tracked panel specs, workspace revisions, layout-owned window ids
- `Workspace` fields are private. `revision()` moves with every write (a clone is a
  new source); `generation()` moves only on `replace` and ends drags as the old
  revision did. A trial walks every `&mut self` method, read from the source.
- Panel specs and permissions leave `DockPanels` for `PanelSpecs`, a plain-data model
  the host keeps in a `Tracked`. `DockArea` binds `Arc<Workspace>` and derives specs,
  permissions and keys from the workspace revision, the specs revision and the lock:
  an idle pass reads no spec, read-only docks included.
- `DockGrid::rail(cells)` is sized by the dock from its own tokens.
- Floating window ids come from a counter the layout owns; `replace` gives incoming
  windows ids the replaced layout never gave out. The dock's global id counter and its
  `no-global-state` allowlist entry are gone.

Part of #2336.
2026-11-20 18:16:52 +00:00
Martin Ball 6dedbe4fe6 skeleton: merge up/next into area/ribbon-fw with conflict markers left in (land step 1) 2026-11-19 20:42:08 +00:00
Martin Ball 5ca0336a5c ribbon-w1: net change of 5 commits
- ribbon-w1: written by an agent
- ribbon-w1: finished by an agent
- ribbon-w1: finished by an agent
- ribbon-w1: review fixes (review-1b)
- ribbon-w1: review fixes (review-1c)
2026-11-18 21:02:54 +00:00
Martin Ball 5b9bf4c985 canvas-w4: net change of 5 commits
- canvas-w4: repair 1
- canvas-w4: finished by an agent
- canvas-w4: finished by an agent
- canvas-w4: finished by an agent
- canvas-w4: review fixes (review-1)
2026-11-18 14:03:47 +00:00
David Mann 183b6b7dd5 dock: a permission for panels that dock only in dock columns (photocraft#12517)
`Permissions::docks_outside_columns` (on in `ALL`): without it a panel docks
only in dock columns or floats. Any action that leaves it in a frame of the
docked tree (a split beside the canvas, an edge of the docked area) is a
column-rights breach, so the model refuses it and a drag's dry run shows no
drop mark there. Reconcile moves a saved one out of a frame into a dock
column. A toolbar sets it so it never lies across the window.
2026-11-17 21:17:17 +01:00
aiongg f9b87ee8f1 fit test: a zero-width strip reserves no button 2026-11-17 14:48:44 +00:00
aiongg bf755d4228 Panel tabs: shown tab keeps its width, others keep their first letters, labels clip 2026-11-17 14:26:15 +00:00
aiongg a4d5004009 Dock: a floating window keeps the edge its collapsed strip was dropped near; icons float collapsed under the pointer; top grips keep the bottom edge; a column that cannot collapse offers no collapse 2026-11-17 04:15:48 +00:00
aiongg 6d1596c531 Dock model tests: column state on float and join, floating drops, column rights, steps, v3 migration
Collapse is kept when a column or its groups float and decided by the
joined column; a floating window takes Top, Bottom and Center drops and
nothing beside it; collapses and shares_column refuse their placements
in both directions and reconcile repairs them; a stepped column keeps
its count through JSON and refuses widths; v3 floating trees load as
one column window per side-by-side part.
2026-11-17 03:12:10 +00:00
aiongg a29bbbd6a4 Merge branch 'red/t23e' into fw/mac1
One shift-lock opt-in: OutlineDraft::locking_shift_drags (t7d) carries t23e's rule that a Mixed draft which doesn't lock keeps the pointer's path under shift.
2026-11-17 01:05:14 +00:00
aiongg cebb673c91 Outline draft: a shift freehand drag locks one line only where the tool asks (the Freeform Pen); the selection Lasso keeps the pointer's path 2026-11-17 00:25:38 +00:00
aiongg 4b8f3c8608 Outline draft: only a draft built with locking_shift_drags (the Freeform Pen) locks a shift drag; the Lasso's shift adds to the selection 2026-11-16 23:36:47 +00:00
aiongg 5d9a02e86b Merge branch 'red/t7' into fw/mac1
# Conflicts:
#	crates/behavior/src/geometry/draft.rs
#	crates/behavior/tests/geometry/draft.rs
2026-11-16 22:47:46 +00:00
aiongg 9718d8cb0d The freehand Lasso moves its outline by the pointer's step while Space is held, as the marquees do 2026-11-16 21:42:01 +00:00
aiongg 11b7cf0903 Outline draft: a shift freehand drag locks one of eight directions and stays on that line 2026-11-16 21:15:07 +00:00
aiongg 73d68241d7 merge-c: 1.2: Line ⇧ snaps to the axis within 30° (keeping the along-axis offset, at least 1 px) or the diagonal at the shorter offset, one rule in craft-behavior (axis_or_diagonal) 2026-11-16 12:37:51 +00:00
aiongg 80e47af962 tfix3-f4: hit reach read, snap kinds, warp frame, fill expand/contract, finite pointer requests, pen host end, exact right-angle cap, empty tone channels 2026-11-15 16:58:16 +00:00
aiongg 8e4915e979 canvas-widgets-w16: net change of 2 commits
- canvas-widgets-w16: written by an agent
- canvas-widgets-w16: review fixes (review-1, item 9)
2026-11-15 09:18:08 +00:00
aiongg a9b04134a8 tools-w15: net change of 3 commits
- tools-w15: written by an agent
- tools-w15: review fixes (review-1)
- tools-w15: the crop rig records only the real run of each pass, not the canvas body's measuring run (tools run round)
2026-11-15 04:46:08 +00:00
aiongg ff439373ec tools-w1: net change of 1 commits
- tools-w1: written from its sheet
2026-11-15 04:46:08 +00:00
aiongg f83986ad4b canvas-widgets-w3: net change of 9 commits
- canvas-widgets-w3: partly written (run interrupted)
- canvas-widgets-w3: partly written (run interrupted)
- canvas-widgets-w3: partly written (run interrupted)
- canvas-widgets-w3: written by an agent
- canvas-widgets-w3: review fixes (review-1)
- Integration: canvas trials keep canvas-widgets-w10's split module
- canvas-widgets-w3: the drag's snap reads the press bounds alone, so the release can take the gesture (combine)
- canvas-widgets-w3: the ruled guides trial shows its canvas in a room that holds the bounds, so its releases land on the canvas (fwcw round 3)
- canvas-widgets-w3: review fixes (review-tl-1)
2026-11-15 04:46:06 +00:00
aiongg ee5be1ccdd panels-w1: written from its sheet 2026-11-14 17:55:58 +00:00
aiongg ae4e2ab09e Contract stubs: stage 1 (font-catalog, i18n, keymap, platform, behavior, window) 2026-11-14 01:25:39 +00:00
aiongg 577055bc34 Merge storytold main 3c59a2aa5 into craft-framework (sync 13 Nov)
202 upstream commits since 6cb00467a. Resolutions:
- craft-window, craft-platform: ours. Upstream's frame policy v2, restore
  store and GNOME light/wait_first are the versions carried on 28 Oct;
  ours moved place() to craft-behavior and kept LayoutWatch and the
  appearance/portal.rs split.
- craft-timeline: ours. craft-time (crates/time) lands as upstream wrote
  it and is not yet used by craft-timeline.
- Old crates/ui modules stay removed. Upstream's frosted backdrops, shape
  gallery, dialog tabs and the iconic flyout top-edge rendering are not
  carried. The #1094 model half is in craft-behavior's dock:
  Group::flyout_offset and Action::MoveFlyoutTop.
- craft-update: #586 Save and Update, the install probe on the check
  thread and quiet per-user MSI self-updates, carried into updater.rs,
  stack_dialogs.rs, install/windows.rs and self_update/helper.rs.
- craft-jpeg: progressive Huffman decoding, carried into huffman.rs,
  parse.rs and scan.rs.
- craft-print: the driver settings dialog's new tests and the bounded
  XML parse's tests, as trials.
- Test-only conflicts: upstream tests from before the base that our side
  cut stay cut; tests new upstream are kept.
2026-11-13 17:11:48 +00:00
aiongg 908da71beb New Workspace's Capture boxes sit in a titled group box; contract API lists the workspace captures 2026-11-13 01:22:55 +00:00
aiongg a2e346e414 Trials: dock side width, workspace captures, bottom pane on switch, workspace dialogs 2026-11-13 01:22:55 +00:00
aiongg 307b0467f5 Digit keys set a canvas tool's opacity: DigitKeys pair rule in craft-behavior, the OpacityDigit command set (1…0, Shift+1…Shift+0) in ui-canvas 2026-11-12 14:32:42 +00:00
aiongg e5b9ebac3b Cmd/Ctrl with Page Up or Page Down scrolls a focused document canvas sideways on every OS; the key role marks a document canvas, and roving groups and the Bezier overlay leave those keys 2026-11-12 14:32:42 +00:00
aiongg 9839432649 One Shift-45° helper: turn_to_45 in geometry::lock keeps the length; the measure, gradient and pen copies go, and the gradient's angle_base with them 2026-11-12 14:32:42 +00:00
aiongg 3a58d2262f LayersPanel effects keys: Shift+Left and Right are no moves in stacked rows, and the panel takes Show and Hide Effects on its own scope 2026-11-12 14:32:40 +00:00
aiongg 540c932a0e Collection keys: Space can preview, Ctrl+Space toggles the lead's pick, Space flips Include in the actions panel 2026-11-12 14:32:40 +00:00
aiongg ce5987d114 Collection keys: Enter activates and F2 renames on every platform
The macOS rows that made Enter rename the lead and Cmd+Down activate it go.
2026-11-12 14:32:39 +00:00
aiongg e59460135e Base crates on the framework: theme, behaviour, keymap, platform, window, settings, i18n, fonts 2026-11-12 14:09:48 +00:00