Commit Graph
346 Commits
Author SHA1 Message Date
bflatastic 1e403564d8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/canvas/tools/drag.rs
#	docs/ui-parity.md
2026-11-27 15:28:02 +07:00
BFlat 91501b2be7 Merge pull request #2466 from B-uchi/pr/code-connect-agents
M8: Code Connect for agents
2026-11-27 14:30:09 +07:00
bflatastic 89f3b29a22 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/ui-parity.md
2026-11-27 14:25:48 +07:00
BFlat d543ad2658 Merge pull request #2194 from phonedu/feat/design-review-engine
M13: design review commands (engine, MCP and collab)
2026-11-27 14:08:46 +07:00
bflatastic e309dee7d4 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/mcp/src/tools.rs
#	docs/mcp.md
2026-11-27 13:57:58 +07:00
BFlat b52c55e670 Merge pull request #2616 from denisg0mes/export-bounds-tight-strokes
M8: a layer exports at the size of what it draws, strokes as drawn
2026-11-27 13:45:12 +07:00
FredApps 4cfed8dc63 Merge main into fix/kscale-bound-values-2090
Doc conflicts only (docs/components-parity.md, docs/ui-parity.md): kept main's header and changelog rows and added this PR's #2090 Scale tool clause and row next to them.
2026-11-26 19:22:14 +07:00
Denis Gomes 81eb01e821 M8: a layer exports at the size of what it draws, strokes as drawn
SVG, PNG, PDF and Vector Drawable exports took their size from the
renderer's bounds, and Node::outline_reach grows a line's, vector's or
polygon's box by the weight times the miter limit (up to 4) to leave room
for a mitre at any corner. An icon frame whose outlined strokes stay
inside it exported at 26 x 26 to 30.8 x 24 instead of 24 x 24, its content
moved off the frame's origin.

export_bounds now walks the tree as world_render_bounds does
(Document::world_render_bounds_with) and measures each layer's own paint
on the outlines it draws: its shape and its stroke area from stroke_fill,
in page space, grown by its effects. A dashed stroke counts as a solid one
as well as its dashes, so where the dashes fall doesn't change the size.
Text and drop shadows with a spread keep the renderer's bounds. The
renderer's own bounds, used for drawing and culling, are unchanged.

Shrinking outline_reach itself was rejected: the renderer culls and
caches by it, and an exact stroke there would cost a stroke outline per
layer per bounds query.
2026-11-24 02:32:28 -05:00
phonedu 13cd2f7d6b M13: merge upstream main again 2026-11-22 20:46:38 +08:00
Oleksii Sukholita 7fdb996062 M1: Cmd/Ctrl-click reaches the layers under an unfilled nested frame or instance
With Cmd/Ctrl held, a frame, component or instance nested in another layer caught the pick
across its whole box. An unfilled overlay, such as a device chrome instance (a status bar and a
home indicator over a screen), took every deep click and hover inside it, so the screen's own
layers could not be picked through it. In Figma's web app, measured with synthetic files, such
a layer counts only where it has a visible fill (a hidden or 0% fill and its stroke don't), and
the pick reaches the layer under it, or the top-level frame when nothing else is there.

`HitOpts::deep` makes the hit test do that for a press, a hover, the shape builder's pick and a
right-click with Cmd/Ctrl held. Boards (top-level frames and frames directly in a section) keep
their box, and a plain click is unchanged.

`cmd_click_reaches_through_an_unfilled_nested_frame` fails without the change.
2026-11-21 14:11:55 +01:00
B-uchi d23c8b6456 M8: Code Connect for agents
A link can say where the code component lives (`source`, a path inside the
repository), what a property's design values are called in code (`values`:
{"State": {"Hover": "hovered"}} renders `hovered`; a value without an entry
keeps its design name) and `notes`, through codeConnect.set, the connect file
and Inspect ▸ Connect to code (a Source file field and a row per variant
value). The fields are skipped when empty, so existing files and exports don't
change.

codeConnect.list and the MCP tool component_mappings say which code
component each design component is: import line, name, ready snippet,
properties and variants, and with a repository root whether each source file
is there. sync_mappings imports or exports a repository's connect file.
codeConnect.export {path} keeps the file's other top-level keys and the links
of components this design doesn't have, so several designs can share one file.
2026-11-19 01:39:29 +01:00
bflatastic 05c719d0b1 M12: one table for a code language's id and name
The id and label matches listed every language twice (Sonar's duplication gate on #2457).
2026-11-19 02:41:28 +07:00
Trevor Brown 0d70c332b1 M12: boards: code blocks (doc and engine): a board code block that hugs its lines, with a language (#2237) (#2282)
The change from #2282 by @TrevorBrown-dev, as one commit.
2026-11-19 02:00:46 +07:00
bflatastic e4bc567855 M3: library analytics count insertions and detachments of styles and variables
Applying a style or variable, or copying or duplicating content that uses it,
inserts it; the Detach button detaches it; an instance counts as its component
alone. Show usage and library.usage give them over the chosen period.
2026-11-18 19:38:54 +07:00
Trevor BrownandClaude Opus 5.5 873e9998a8 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 driver, no subagent
2026-11-17 06:34:07 -05:00
BFlat 38a287e36c Merge pull request #2341 from ljkx/fix/point-radius-full-edge-2334
M4: a rounded vector point reaches along the whole of a segment whose other end is sharp (#2334)
2026-11-17 18:03:36 +07:00
phonedu 8a77266f84 M13: sharing refuses a file whose review settings pass the limits 2026-11-16 16:26:30 +08:00
Trevor BrownandClaude Opus 5.5 78f1a10851 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 01:35:23 -05:00
Trevor BrownandClaude Sonnet 5.5 3bbd1d3ce5 Pages: Set as opening page, so a shared file opens on the page the team chooses (#1817) (#1972)
* M9: page.setOpening sets the page a shared file opens on, for everyone who joins (#1817)

A file on a figcraft-server opened on the page current at publish time, with no way to change it:
`DocProp::CurrentPage` was synced but nothing wrote it (`page.select` is each viewer's own page,
only a local save stamps the document). `page.setOpening {id?}` writes `doc.current_page` as a
document edit: one undo step, a synced change in a live session, so every later join opens on it;
the current page when none is named; a divider or a layer refused; nobody's own page moves. The
pages list's context menu gets "Set as opening page". Docs: mcp.md, collaboration-parity.md.

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

* M9: the pages menu's new string is in the English catalog (#1817)

The gate's i18n test wants every tr() key in locales/en.toml.

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

* Opening page: the parity doc states the default when no opening page is set (#1972 issue)

With none set, a file opens on its saved current page, not the first page, and a link cannot name a page, so the row is partial.

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

* Opening page: one sharing row, and the spotlight exception on the opening-page row (#1972 issue)

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

* Opening page: the parity row states where the joiner's page comes from (#1972 issue)

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

* Opening page: a no-op set adds no step, deleting the opening page falls back, and the tests cover junk ids, refusals, undo and the menu item (#1817)

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

* M5: the chosen opening page is saved with the file and opens it for everyone (#1817)

The opening-page flag now lives on the page node (NodeKind::Page opening), so it syncs
through the existing node kind. Saving writes the flagged page as current_page instead of
the page the saver was viewing. A duplicated page does not copy the flag, and deleting the
page removes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-15 00:05:48 -06:00
Trevor BrownandClaude Opus 5.5 0d4845e21e Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:49:15 -05:00
ljkx 1c88f84acf Merge remote-tracking branch 'origin/main' into fix/point-radius-full-edge-2334
# Conflicts:
#	docs/ui-parity.md
2026-11-13 18:46:44 +01:00
bflatastic 35aa524f8a Merge main into #2291 2026-11-13 23:42:21 +07:00
Trevor BrownandClaude Opus 5.5 ba712cea2a Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-13 11:41:15 -05:00
ljkx dc7bc62c5e M4: rustfmt the radius test's arc check (#2334) 2026-11-13 17:35:34 +01:00
ljkx 4d60cfbcf9 Merge remote-tracking branch 'origin/main' into fix/point-radius-full-edge-2334
# Conflicts:
#	docs/ui-parity.md
2026-11-13 17:34:58 +01:00
ljkx e62b140845 M4: the radius tests pick each arc by its middle too (opposite corners share both ends, #2334) 2026-11-13 17:34:37 +01:00
ljkx 8336043787 M4: a rounded vector point reaches along the whole of a segment whose other end is sharp (#2334) 2026-11-13 15:16:59 +01:00
phonedu 15d0a4683c M13: cap the disabled-rule list at the wire like radii and brand 2026-11-13 11:48:53 +08:00
Trevor BrownandClaude Opus 5.5 3be1a6a60b Merge upstream/main into feat/select-layer-locked-1560
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:19:23 -05:00
Trevor BrownandClaude Opus 5.5 38c68e6714 Merge upstream/main into fix/fig-list-start-2273
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:17:54 -05:00
Trevor BrownandClaude Sonnet 5.5 eb4cec986f Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 20:41:20 -05:00
NetterSilverandClaude Opus 5.5 7b34dbab00 Keep library links working when the project folder is moved or cloned (#2132)
Fixes #2122

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 01:48:30 +01:00
Trevor BrownandClaude Sonnet 5.5 4e9b414cc7 M6: tests for where a list starts counting, through the issue's own steps (#2273)
The engine test now follows the issue: a list typed at 5, saved as .fig and opened, split by Backspace at the start of "b". The REST fixture is a top-level list, the junk sweep reaches the new loop through a listed text layer, and the document crate tests the new rule for nested, bullet, plain and over-deep levels. ParaList gets its doc comment back, and the revision row names the item written with 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.2 queued; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 05:56:47 -05:00
Trevor BrownandClaude Sonnet 5.5 bb480bdfad M6: .fig import: a numbered list keeps its start only where it starts counting (#2273)
Figma writes a list's start on every line of the list (measured in Figma's web app, 2026-11-12, from a saved .fig: a list started at 5 has listStartOffset 4 on all its lines, and the item split off by Backspace is written with 0). The import kept every line's value, so after a split the items after it restarted at the old start instead of 1.

The import now keeps a start only on the item where a numbered list starts counting, and gives every item that goes on counting 0, for .fig and REST listStartOffsets alike. The rule is one function in the document model, list_item_starts_counting, which the layout's list numbering now uses too. The export is unchanged and its re-import now equals what went in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.2 queued; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-12 05:25:35 -05:00
Trevor BrownandClaude Opus 5.5 87f7b7d944 M5: drop two lint allows the argument count does not need
The workspace threshold for too_many_arguments is 10; hit_rec and rec take 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and reviewed
2026-11-12 03:09:01 -05:00
Trevor BrownandClaude Sonnet 5.5 6cb015d4f8 M5: Select layer lists locked layers with a padlock and picks them (#1560)
The context menu's Select layer now lists locked layers (and what a locked frame holds) with a padlock in the leading column, and picking one selects it, as the help center's "Lock and unlock layers" says and as measured in Figma's web app, 2026-11-10. The submenu shows only with more than one layer under the pointer (measured on a single locked layer only, the least certain rule). Clicks, hover and marquee still never reach a locked layer.

- doc: geometry::HitOpts { locked } and layers_at_opts; layers_at and the other public hit functions keep their signatures and pass the default.
- engine: select.layersAt lists locked layers and its rows gain locked (the layer or an ancestor is locked).
- ui-egui: indented_item takes locked and paints the Layers panel's padlock icon; a row both selected and locked shows the check.
- docs: ui-parity Select layer row, revision row and status line; mcp.md select.layersAt.

Tests: layers_at_a_point_list_locked_layers_with_a_flag_and_select_set_takes_them, select_layer_marks_locked_layers_with_a_padlock_and_picks_them, select_layer_needs_more_than_one_layer_under_the_pointer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.1 briefed; Sonnet 5.5 wrote at medium
2026-11-12 03:03:25 -05:00
phonedu e23ff06e34 M13: merge upstream main again 2026-11-12 12:36:00 +08:00
bflatastic 6bbd92856c Merge main into #2224 2026-11-12 11:24:51 +07:00
BFlat 57b6607457 Merge pull request #2094 from TrevorBrown-dev/feat/wrap-style-paragraph-and-style-1827
M4: a wrap style per paragraph and in text styles, overriding the layer's (#1827)
2026-11-12 11:20:11 +07:00
phonedu 2c3e8802f7 M13: merge upstream main; fix the Tamil catalog's stale color-profile key 2026-11-12 12:12:37 +08:00
bflatastic ebca682595 Merge main into #2224 2026-11-12 11:12:04 +07:00
BFlat 6c7532e8b0 Merge pull request #2240 from TrevorBrown-dev/fix/outline-after-pen-bridge-1951
M4: a rounded vector's fill and outline follow every corner when a segment closes its open loop (#1951)
2026-11-12 11:09:33 +07:00
bflatastic 7ecb6f1c03 Merge main into #2094 2026-11-12 11:07:19 +07:00
bflatastic 0c5bbc07a7 Merge main into #2224 2026-11-12 11:03:16 +07:00
bflatastic 3c0505def6 Merge main into #2094 2026-11-12 10:50:07 +07:00
bflatastic 2c7bffbc32 Merge remote-tracking branch 'origin/main' into landb/2240 2026-11-12 10:49:19 +07:00
bflatastic c1cf6cc08e Merge main into #2085 2026-11-12 10:45:54 +07:00
Trevor BrownandClaude Opus 5.5 059d91e006 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:38:57 -05:00
bflatastic a905f50211 Merge main into #2224 2026-11-12 10:11:23 +07:00
bflatastic ed4f4defc8 Merge main into #2240 2026-11-12 10:03:15 +07:00