Commit Graph
888 Commits
Author SHA1 Message Date
BFlat 8dc3ab5703 Merge pull request #669 from yelintong/feat/flutter-codegen
M7: Flutter code generation
2026-10-29 13:37:49 +07:00
BFlat 299c1d5f59 Merge pull request #1458 from MortenHusted/fix/layout-key-order
M2: auto layout settings in one call don't depend on how their keys are spelled
2026-10-29 13:37:32 +07:00
bflatastic 2a63418d57 #634: region fills drawn by their own helper, and the long region-paint test split by case, for cognitive_complexity 2026-10-29 12:28:47 +07:00
bflatastic 789fa33444 Merge main into #634 2026-10-29 12:25:06 +07:00
bflatastic ee12a51045 Merge main into #1458 2026-10-29 12:22:29 +07:00
bflatastic ce14b431da #669: explicit imports in flutter.rs, a capped layer's name stays on its comment line, the Flutter variant asserts in their own test, the Arabic catalog's key 2026-10-29 11:59:14 +07:00
bflatastic a81efe5466 Merge main into #669 2026-10-29 11:52:03 +07:00
BFlat 1a755ccb0c Merge pull request #1425 from Silvertree2010/fix/h3041-node-set-opacity-1-gives-full-op
Treat a % suffix on node.set opacity as a percentage
2026-10-29 11:41:54 +07:00
BFlat 27c3232930 Merge pull request #1426 from Silvertree2010/fix/h3039-color-of-silently-drops-non-nume
Reject colour arrays containing non-numeric entries in color_of
2026-10-29 11:41:48 +07:00
BFlat 18abd3ab48 Merge pull request #1467 from Silvertree2010/fix/h3521-node-set-paddinghorizontal-paddi
Reject non-numeric paddingHorizontal/paddingVertical in node.set
2026-10-29 11:38:41 +07:00
BFlat c3f8790f0b Merge pull request #1469 from Silvertree2010/fix/h3578-page-duplicate-accepts-a-non-pag
Reject non-page ids in page.duplicate
2026-10-29 11:38:31 +07:00
BFlat f90a7c5e22 Merge pull request #1419 from avhn/fix/1410-batch-undo-rollback
M8: keep undo entries after a failed batch undoes an earlier edit (#1410)
2026-10-29 11:38:24 +07:00
BFlat bc1319ccf0 Merge pull request #1432 from Zaxaerith/fix/1428-set-as-thumbnail
fix(engine): make Set as thumbnail affect saved files (#1428)
2026-10-29 11:38:08 +07:00
BFlat c9aa95e437 Merge pull request #1479 from Silvertree2010/fix/1477-auto-width-text-aligned-right-ex
Keep the right edge of right-aligned auto-width text as it grows
2026-10-29 11:38:01 +07:00
BFlat 80ffd8308c Merge pull request #1405 from Silvertree2010/fix/h2933-cornerradius-padding-strokesides
Reject cornerRadius/padding/strokeSides arrays with non-numeric entries
2026-10-29 11:35:03 +07:00
bflatastic 4fcc49aa37 Merge main into #1458 2026-10-29 11:15:01 +07:00
BFlat 60ea32f171 Merge pull request #1465 from phonedu/mcp-agent-feedback
M12: MCP comment feedback and live change events
2026-10-29 10:51:24 +07:00
BFlat 2e6612e002 Merge pull request #1457 from culiulemon/pr/misc-fixes
feat: property copy/paste, blend-mode hover preview and clipboard fixes
2026-10-29 10:47:30 +07:00
bflatastic aa5c016518 Merge main into #1419
# Conflicts:
#	docs/roadmap.md
2026-10-29 10:30:12 +07:00
bflatastic 069449e33c #1425: share fraction_of for opacity, fill opacity, innerRadius and arcInner 2026-10-29 10:29:16 +07:00
bflatastic d5494fc989 Merge main into #1425
# Conflicts:
#	crates/engine/src/cmd/props.rs
2026-10-29 10:29:16 +07:00
bflatastic d03f385f6c Merge main into #1426 2026-10-29 10:29:14 +07:00
bflatastic 5721140cb4 Merge main into #1405 2026-10-29 10:29:13 +07:00
bflatastic 5db45f11b3 Merge main into #1467
# Conflicts:
#	crates/engine/src/cmd/props.rs
2026-10-29 10:29:12 +07:00
bflatastic 53d4676e1f Merge main into #1469 2026-10-29 10:29:10 +07:00
bflatastic d3551f3c6c #1432: accept components and instances as thumbnails; move the tests to thumbnail_tests.rs 2026-10-29 10:29:06 +07:00
bflatastic c49acd1db9 Merge main into #1432 2026-10-29 10:29:05 +07:00
bflatastic b9db7dce25 Merge main into #1479 2026-10-29 10:29:04 +07:00
BFlat a8753e4aca Merge pull request #1484 from StrajnarFilip/claude/fix-922-scaled-instances
M3: scaled instances keep their scale when their main is rebuilt (#922)
2026-10-29 10:07:47 +07:00
bflatastic 6abddb0f68 Merge main into #1465 2026-10-29 09:55:55 +07:00
bflatastic 158d402ee7 Merge main into #1457 2026-10-29 09:55:12 +07:00
BFlat 4a0bd79797 Merge pull request #1488 from ChristopherLinnett/issue/1086-image-validation
fix(collab): image entries must match their hash and sane bounds (#1086)
2026-10-29 09:49:20 +07:00
bflatastic a6b41b2f4c Merge main into #1484 2026-10-29 09:31:53 +07:00
BFlat cff1d0bf45 Merge pull request #1487 from ChristopherLinnett/issue/1096-openurl-gesture
fix(present): prototype links open only behind the notice or a viewer's click (#1096)
2026-10-29 09:30:04 +07:00
BFlat baaafc381b Merge pull request #1485 from StrajnarFilip/claude/fix-1476-guides-reopen
M1: page ruler guides survive save and reopen (#1476)
2026-10-29 09:29:31 +07:00
bflatastic 2bc14d946b #1465: split the event and prompt code for cognitive complexity, drop the panel header button 2026-10-29 09:20:55 +07:00
bflatastic 9d42833008 Merge main into #1465 2026-10-29 09:18:39 +07:00
Nicek 1c253ef30d fix: pasted image keys stay archive-valid when the content hash is taken
The blend menu and its hover preview now live beside upstream's split menu module.
2026-10-29 09:46:50 +08:00
Nicek fae356fd50 fix: 粘贴图片的内容哈希键被占用时改用空闲键 2026-10-29 09:33:55 +08:00
Nicek 4c0eb71a4c fix: 粘贴图片填充时避开目标文件已占用的图片键
目标文件已有同名键但数据不同时,粘贴的 paint 改用复制数据的内容哈希键,避免渲染成目标文件里的图片;目标文件原图片保留给已有图层。
2026-10-29 09:33:55 +08:00
Nicek dd93a6a2a8 fix: 修复 PR #1457 的选择与拖拽评审问题
- 标签在选择边界外也参与收窄,Dev Mode 单击已选图层只选它
- 区分点击命中图层与描边空白处的拖拽回退目标
- 重排圆环按按下时的修饰键判断点击,画布外松手视为拖拽结束
- 修复 clippy unnecessary_get_then_check
2026-10-29 09:33:55 +08:00
Nicek ce93dc6ff5 feat: 混合模式悬停预览、多选层点击与图层属性预览 2026-10-29 09:33:54 +08:00
Nicek 88477723c5 fix: ArkUI 百分比间距输出与同帧按下/松开坐标 2026-10-29 09:33:54 +08:00
Nicek bb495bcf70 feat: 属性与样式复制粘贴,含图片/图案跨文件处理与多语言 2026-10-29 09:33:20 +08:00
Christopher Linnett 949d74f7ca fix(collab): image checks keep documents shareable and history replayable (#1086)
- The entry size cap is figcraft_doc::ImageData::MAX_BYTES (256 MiB), the
  cap the .fig, .sketch and REST importers already read images with (now
  one constant), instead of 32 MiB: an imported image larger than 32 MiB
  made the document unjoinable and its server snapshot unrestorable.
- History written before the checks (a restored or joined snapshot, a
  replayed server log, a file published to a server) applies without the
  image entries they refuse (docprops::without_refused_images), instead of
  the file not opening or a restart dropping every edit after the image.
- A key that already holds an image can't be given other bytes: producers
  key images by their bytes (the REST importer's placeholder keys always
  hold the same picture), and merge treats a key's image as never
  changing.
- REST import: an unresolved imageRef shaped like a content hash shares
  the rest-image-missing placeholder (the placeholder's bytes don't hash to
  it); ImageData::claims_content_hash is shared with collab.
- Tests: collab image_tests (4 new, size test uses a small cap), format
  image_tests (1 new).
- Docs: collab-protocol.md, collaboration-parity.md, file-format-parity.md.
2026-10-29 08:55:03 +08:00
Christopher Linnett 53f47706ec fix(present): prototype links open only behind the notice or a viewer's click (#1096)
An Open link action carries a URL from the document and fires from whatever
trigger the prototype sets, so an unattended presentation could open web links
and mail messages one after another: a mail link bypassed the leaving-the-
prototype notice entirely, and a skipped notice let any trigger open any
number of links.

- finish() routes every openable URL, mail included, through the notice.
- Skipping the notice ("Don't show this again") opens at once only a link the
  viewer's own click, press, drag or key fired, one per frame. A delay, the
  pointer passing over a layer (enter, leave, hover) and a timed mouse
  trigger that fires after the gesture is over still show the notice, which
  then offers no checkbox: it couldn't skip that notice anyway.
- The player tags each queued link with whether the viewer fired it
  (Presenter::fire_from); an OpenUrl outside an interaction defaults to not.
- The notice covers mail links (new locale string, mail wording).
- Engine prefs/command doc text follows the rule; behavior untouched there.
- present_links_tests: shared setup helpers for the link tests; new
  tests for the skip rule (delay, hover, delayed mouse-up, key, one link per
  click, checkbox only for clicked links); the scheme-filter test now clicks
  with the notice skipped so the filter alone keeps those URLs out.
- docs/prototyping-parity.md row, status line and revision history updated.
2026-10-29 08:11:13 +08:00
Filip StrajnarandClaude Opus 5.5 652bf35b19 M1: page ruler guides survive save and reopen (#1476)
A page kept its ruler guides in `NodeKind::Page`, and since frame guides
(#70) every layer also has its own `guides` field. Both are written as
`guides`, and on reading the layer's own field takes the key, so:

- a reopened page's guides landed in the layer field and were not drawn;
- saving that page wrote `guides` twice (the page kind's list, always
  written, then the layer's), and the file no longer opened ("duplicate
  field `guides`").

Every layer, pages included, now keeps its guides in the one layer field;
the key in the file is unchanged, so existing files open with their guides.
The field reads every `guides` list a layer has, so files already saved
with the key twice open again with both lists, in file order. This also
covers collab `Create` payloads from older peers.

Regressions: JSON round trips of page and frame guides, a page with two
lists, a bad list still refused (doc); save, reopen, save, reopen through
`.figcraft` and a document.json with the key twice (format). Checked in the
app over the control channel: guides drawn after two save/reopen cycles, and
a file with the key twice opens with all its guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvG6Dyzof21BCrUsByhx2w
2026-10-28 22:47:24 +01:00
Filip StrajnarandClaude Opus 5.5 2d6638599d M3: scaled instances keep their scale when their main is rebuilt (#922)
The Scale tool (and `transform.scale`) scales a layer's children whatever
their constraints. After the edit, overrides are recorded by diffing the
changed layers, and a size or place that changed while an ancestor resized
is read as what constraints give, so it isn't an override. For a scaled
instance that left its layers' scaled size and points unrecorded: the next
rebuild of the instance (a layer added to its main, say) put a 14 px
icon's triangle back at the main's 24 px size. Strokes already kept their
scaled weight, as a separate override group.

`scale_node` now marks `size` and `position` overrides on the layers it
scales below the scaled layer when they are layers of an instance and the
value changed. Undo takes them back with the rest of the edit.

The report's own sequence (clearing effects on the component holding the
icon) no longer reproduces on main; this covers the rebuild path that
still did. Regressions: a scaled instance through value edits and a
rebuild of its main; one scaled with the tool, with undo; a scaled icon
nested in a component and in an instance of that component, through edits
of both mains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvG6Dyzof21BCrUsByhx2w
2026-10-28 22:45:32 +01:00
NetterSilverandClaude Opus 5.5 71571cccad Keep the right edge of right-aligned auto-width text as it grows
Fixes #1477

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 22:34:52 +01:00
Filip StrajnarandClaude Opus 5.5 62c69ba7ab M8: normalising after a command runs under the panic guard (part of #1085)
Session::execute ran a command under guard::run but normalised what it
changed afterwards, outside it: a panic in normalisation escaped execute
instead of becoming EngineError::Internal with the edit rolled back. Inside
a batch it unwound through Session::grouped, which then never restored the
undo limit it had lifted or ended the group. Normalising is now the last
step of the guarded result chain, so a panic there fails the command like
one in the command itself (and a batch step fails like any other failed
step); live text previews normalise under the guard too.

The other half of #1085, restoring grouped()'s state when its closure
panics, is left alone: #1419 rewrites that function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvG6E2qDnjtMzfPVuEP7iH
2026-10-28 22:11:31 +01:00