Commit Graph
2394 Commits
Author SHA1 Message Date
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
BFlat fbc1cc63ba Merge pull request #1462 from Skyfuller1303/fix/home-tab-sidebar-alignment
M7: line the Home tab's divider up with the icon rail
2026-10-29 10:45:54 +07:00
BFlat da1cf8da3a Merge pull request #1466 from hussain-hz/ar/figcraft-catalog
i18n(ar): add Arabic draft interface catalog
2026-10-29 10:18:37 +07:00
BFlat 4ae1b7c574 Merge pull request #1491 from samhyun/fix/jpeg-finer-than-first
M8: a progressive JPEG sampling a component finer than its first is refused, not decoded
2026-10-29 10:12:58 +07:00
bflatastic 0cc380c228 Merge main into #1466 2026-10-29 10:08:11 +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 158d402ee7 Merge main into #1457 2026-10-29 09:55:12 +07:00
bflatastic d7945584b3 Merge main into #1462 2026-10-29 09:54:48 +07:00
BFlat 7f646aac24 Merge pull request #1468 from samhyun/perf/web-zoom-settle
M8: the browser refines a zoom only once it has paused
2026-10-29 09:49:26 +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 8440cb80f9 Merge main into #1484 2026-10-29 09:48:13 +07:00
BFlat d2811b9d86 Merge pull request #1486 from StrajnarFilip/claude/fix-1059-fig-embedded-copies
M6: .fig embedded images are copied once per blob, not once per hash (#1059)
2026-10-29 09:44:38 +07:00
BFlat 5804c0e2cc Merge pull request #1489 from ChristopherLinnett/issue/857-confirm-quit
fix(app): ask before ⌘Q quits with unsaved changes (#857)
2026-10-29 09:41:19 +07:00
BFlat 738f7c7692 Merge pull request #1470 from watchakorn-18k/fix/context-menu-frame-label
fix(ui): right-click on a frame's name label picks that frame
2026-10-29 09:37:58 +07:00
BFlat 3a86db900d Merge pull request #1424 from samhyun/fix/keepalive-ping-under-presence
M9: a ping every keep-alive interval, whatever else the client sends
2026-10-29 09:37:20 +07:00
BFlat ea2a8ea84a Merge pull request #1443 from devius/ka-new-strings
i18n(ka): Georgian for 76 strings added since the language landed
2026-10-29 09:35:42 +07:00
BFlat 84e0ea5449 Merge pull request #1393 from kler/swedish-ui-2026-10-26
i18n(sv): translate 47 new strings
2026-10-29 09:35:37 +07:00
bflatastic e83f9691b3 Merge main into #1466 2026-10-29 09:32:26 +07:00
bflatastic 7c413dfe0a Merge main into #1486 2026-10-29 09:32:05 +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
BFlat 95fd3c2444 Merge pull request #1482 from StrajnarFilip/claude/fix-1452-stroke-weight
M1: the stroke weight keeps room for its value beside the variable button (#1452)
2026-10-29 09:29:26 +07:00
BFlat 712074ae2d Merge pull request #1481 from StrajnarFilip/claude/fix-1085-normalize-guard
M8: normalising after a command runs under the panic guard (part of #1085)
2026-10-29 09:29:21 +07:00
BFlat f8355c0680 Merge pull request #1480 from StrajnarFilip/claude/fix-1078-linear-repair
M8: repair and library manifests check membership by set lookups (#1078)
2026-10-29 09:28:53 +07:00
bflatastic 170f1fdf32 #1466: gaps and ROADMAP list the Arabic draft as shipped 2026-10-29 09:26:15 +07:00
Christopher Linnett 57cf1bec48 fix(collab): keep in-use images and resync clients after filtered history (#1086)
- An image a layer or style still shows can't be removed: removing it and
  putting other bytes under its key would swap the picture that layer
  shows, which giving the key other bytes directly can't. A batch made by
  the diff stops using an image (node changes, then styles) before it
  removes it; an undo keeps the changes that apply, so its image may stay.
- Restore and replay leave out the image entries history written under
  older rules can't apply, using one method shared with the undo history
  (Replica::apply_kept, extracted from history.rs). It is exact for every
  image rule, including removals in use and replacements, and leaves out
  only image entries: any other change that doesn't apply is still an
  error. The image-only filter it replaces is gone.
- A server whose restore or replay left image entries out, or whose saved
  log puts images, catches every resuming client up with its snapshot,
  including one at the same sequence number.
- Tests: an_image_in_use_cannot_be_removed,
  an_image_no_longer_in_use_can_be_removed, undoing_an_image_layer_still_works,
  a_restart_replays_past_a_logged_removal_of_an_image_in_use,
  a_resume_after_history_was_left_out_catches_up_with_the_snapshot,
  a_resume_after_a_clean_restart_catches_up_with_the_log,
  a_snapshot_with_a_broken_layer_change_still_fails_to_open.
- Docs: collab-protocol.md, collaboration-parity.md.
2026-10-29 10:25:16 +08:00
bflatastic 6c18fe916b Merge main into #1466 2026-10-29 09:23:22 +07:00
bflatastic 1ed9eb6b8c Merge main into #1393 2026-10-29 09:20:18 +07:00
bflatastic 0da3a564ca Merge main into #1443 2026-10-29 09:20:09 +07:00
bflatastic dfe83f63f0 Merge main into #1470 2026-10-29 09:19:59 +07:00
samhyunandClaude Fable 5.1 bdddf9a2ba M8: the baseline fixture of the JPEG sampling test is a well-formed file
From the review of #1491: patching a component's sampling in the header of a baseline JPEG
`image` wrote leaves its entropy data for 1 × 1 components, so decoding it could only fail and
the test proved nothing past the frame not being refused. The fixture is now a baseline CMYK
JPEG as jpeg-encoder writes it with 2 × 2 sampling (its black sampled finer than its cyan), and
the test asserts it is left to the decoder and decodes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 11:16:17 +09:00
bflatastic fdaaeaa218 Merge main into #1462 2026-10-29 09:11:30 +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
Christopher Linnett 7cce115ad6 fix(collab): check old images against the state they apply to (#1086)
- without_refused_images judges each image entry against the document it
  applies to and the batch's earlier entries (image_for, shared with
  apply): a logged put of other bytes under a key the replay state holds
  is left out, so a restart no longer stops there and drops the rest of
  the log.
- Server::restore keeps its saved log only when the log puts no images:
  a resuming client may already hold other bytes under a logged key, which
  the restored state can't check, so clients catch up with the checked
  snapshot instead.
- Tests: a_restart_replays_past_a_logged_image_replacement,
  a_client_resuming_past_a_refused_image_in_the_saved_log_catches_up,
  a_client_resuming_past_a_replaced_image_in_the_saved_log_catches_up.
- Docs: collab-protocol.md, collaboration-parity.md.
2026-10-29 09:37:33 +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 c6ba81b6e6 test: 同帧按下/松开绘制从按下点开始的回归用例 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 f8ddb5a0a8 feat: 复制属性后显示提示 2026-10-29 09:33:55 +08:00
Nicek 7ea6a424e9 chore: Windows 打包签名、忽略本地目录、贡献者署名 2026-10-29 09:33:54 +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
samhyunandClaude Fable 5.1 9aac391e04 M8: a progressive JPEG sampling a component finer than its first is refused, not decoded
zune-jpeg 0.5.15, the decoder behind `image`, asserts in its upsampler on a progressive frame
whose later component is sampled more finely than its first (etemesi254/zune-image#236; an 8 × 8
Y 1×1, Cb 2×2 file is enough). The panic reached everywhere such an image is decoded: the CLI died
writing a thumbnail, the desktop canvas's guard caught it on every render of the page, and in
the browser it aborted the tab. The fix in zune-jpeg (36007420) is in 0.5.16 pre-releases only,
which `image`'s requirement doesn't take.

Such a JPEG is now refused from its frame header before the decoder sees it, as an image past
the byte budget is. The decoder refuses the larger ones of this shape itself, so nothing that
decoded is lost; baseline frames of the same shape decode and are left to it. The check can go
once zune-jpeg 0.5.16 ships.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-29 10:29:56 +09: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 0e508fd316 fix(app): a second quit before the window draws counts once (#857)
The app's logic runs while the main window is minimised, without the
frame that acts on a close. Two quits there queued the main window's close
twice: the first let it take over another window, and the second then
quit the app over that window's unsaved changes, as answered.

- close_current queues a window's close only once.
- Test: quitting_twice_before_the_window_draws_closes_it_once.
- docs/hardware-parity.md revision history.
2026-10-29 08:50:00 +08:00
Christopher Linnett 7660877845 fix(present): nothing opens or releases behind an open link notice (#1096)
- finish(): a viewer-fired link opens directly (notice skipped) only while
  no notice shows; any other link that fires while one shows is dropped.
- finish(): raising a notice ends the press under way, so its release
  doesn't fire the prototype's mouse-up actions (a link, a navigation)
  behind the notice, which takes no input while it shows.
- The mail notice says the link opens the mail app to write a message
  (opening a mailto: link doesn't send anything).
- Tests: nothing_opens_while_a_notice_shows_with_the_notice_skipped,
  a_press_that_raised_a_notice_doesnt_release_behind_it.
- docs/prototyping-parity.md row and revision history.
2026-10-29 08:50:00 +08:00
Christopher Linnett f1c2ee81e4 fix(collab): image entries must match their hash and sane bounds (#1086)
Image entries applied bytes to any key with no checks (audit COL-9): a
collaborator could poison the shared content-addressed image store, claim
absurd dimensions, balloon memory, or name an image `../../x`, which a
saved file then wrote as the archive member `images/../../x`.

- Every key must be 1–128 ASCII letters, digits, `-` or `_`:
  `figcraft_doc::ImageData::is_valid_key`, promoted from the format
  crate's private `is_valid_hash` so the file reader and collab share one
  rule. The reader now also takes `-` and `_`, so the REST importer's
  `rest-image-missing` placeholder survives a save and load.
- The REST importer's side of the same attack: an unresolved `imageRef`
  that can't legitimately be an archive member name (path text, an
  over-long ref) shares the `rest-image-missing` placeholder instead of
  being keyed by its raw name
  (`image_tests::a_path_like_rest_image_ref_never_names_an_archive_member`).
- A key with the shape of a content hash (64 hex chars) must be exactly
  the lowercase sha256 of the bytes, the form `image_hash` writes; an
  uppercase look-alike is refused. Other keys (svg FNV-128, REST
  placeholders) claim no content address and only meet the rules above.
- A side is at most 65 535 px; decoded bytes at most 32 MiB, with the
  base64 text capped before decoding. 0×0 stays valid: the format crate
  stores it for sizes it can't probe.
- Refusals are Error::Invalid and reject their batch, so every replica's
  store stays clean; catch-up snapshots apply through the same check.
- Docs: collab-protocol.md, collaboration-parity.md and
  file-format-parity.md (rows, status lines, histories).
- Tests: collab image_tests (8), format image_tests: round-trip and the
  REST placeholder gate.
2026-10-29 08:11:13 +08:00
Christopher Linnett 73398cedf1 fix(app): ask before ⌘Q quits with unsaved changes (#857)
winit's default macOS app menu ends the process through AppKit's
`terminate:` at once, so ⌘Q and Quit from the menu bar never asked about
unsaved changes (the recovery copies were all that survived).

- Install craft-libs' app menu (craft-menu, same rev as the other
  craft-libs pins; macOS only). Its Quit sends the main window a close
  request, the same path as the window's close button, so
  windows::on_close_request cancels the close and the unsaved-changes
  question asks first. Failure to install keeps winit's menu and logs it.
- windows_tests::a_quit_with_unsaved_changes_waits_for_the_answer pins
  the contract the menu relies on: a close request with unsaved changes
  sends CancelClose and asks; Don't Save then closes.
- Like the close button it closes the main window only: with several
  windows open, each quit closes one (documented).
- docs/hardware-parity.md macOS row, status line and revision history.
- Cargo.lock: craft-menu, craft-quit, craft-keymap, muda and their deps;
  cargo's own minimal resolution also moves a few windows-sys/getrandom
  edges to versions already in the lock.
2026-10-29 08:11:13 +08:00