Commit Graph
13 Commits
Author SHA1 Message Date
Trevor BrownandClaude Sonnet 5.5 a7a9e62721 M8: Tidy up takes a row whose layers overlap in a chain, and raises a negative gap so no layer reaches the one two before it, as in Figma
Measured in Figma's web app on 2026-11-13. Co-Authored-By below.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 measured and wrote at medium
2026-11-13 00:00:02 -05:00
Trevor BrownandClaude Sonnet 5.5 d3f7ae9029 M8: Tidy up rounds the gap, tidies overlapping rows and grids along their longer axis, as measured
Third Figma run (web app, 2026-11-12): the mean gap rounds half up (X 0, 60, 135, 215 gives 0, 72, 144, 216; 0, 60, 135 gives 0, 68, 136); a tie between repeated gaps takes the smaller; a row is one row group of layers and may overlap along X, a negative gap counting in the mean (X 0, 60, 105, 170 gives 0, 57, 114, 171); a grid is packed along the axis with more groups (2 x 3 by centred columns, 3 x 2 by centred rows); a diagonal, an irregular layout and layers that all overlap are unavailable. The earlier cell rule is removed.

Choices, not measured: a 2 x 2 grid as columns, auto layout flow children unavailable, the 2,000 layer cap, rotated layers by their box, spacing with two layers, no rounding with Snap to pixel grid off. Grid positions along a stack can differ by a pixel from Figma's (it read 52 and 51 for the same mean 51.67).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.2 briefed; Sonnet 5.5 measured and wrote at medium
2026-11-12 16:32:48 -05:00
Trevor BrownandClaude Sonnet 5.5 cfd6bf5273 M8: Tidy up keeps the order and sizes and evens the gaps, as measured in Figma
Measured in Figma's web app on 2026-11-12 (top-level rectangles): a row, a column and a 2 x 3 grid of unequal sizes, eight runs on the gap, and the cases where Tidy up is greyed out (fewer than three layers, overlapping layers). Figma keeps the order, the sizes and the first layer, evens one gap per axis (the most common existing gap, else the mean taken down to a whole number) and tidies a grid by columns.

Choices, not measured: the smaller of two equally common gaps, a mean ending in .5 going down, gaps a pixel apart differing, a diagonal being a row, a grid with an empty place, a grid always read by columns, one overlapping pair making it unavailable, auto layout flow children making it unavailable, the 2,000 layer cap, rotated layers by their box, spacing with two layers, and no rounding with Snap to pixel grid off. A selection that is none of a row, a column or a grid keeps the earlier rule unchanged.

The Design panel's Tidy up row is greyed out with a tip when unavailable; the command then moves nothing and adds no undo step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.2 briefed; Sonnet 5.5 measured and wrote at medium
2026-11-12 16:18:06 -05:00
dotCooCoo 10f3e0d589 Merge main into feat/selection-colors-library 2026-11-06 18:39:28 -08:00
Dylan M. Taylor ee4edc7364 perf(engine): replace linear scans that made document-sized inputs quadratic (#1921)
* perf(engine): replace linear scans that made document-sized inputs quadratic

enum_of re-classified the whole string for every character; widget names,
comment mentions and devcompare's common siblings each searched a growing
Vec; data.fill's export names and codegen's class names retried every
suffix from 2 against a list, cubic in the number of copies of one name;
and a batch rename template had no length cap although it is expanded
again for every match.

* address review: report the pattern in its own length error
2026-11-03 23:48:20 -05:00
dotCooCoo cb429813f3 Selection colors: Create style keeps the variables bound to the row's paint
selection.createColorStyle gives the new style the variable bindings of the fill or stroke it is made from, the color and the gradient stops, so linked layers keep following the variables. Targets bound to different variables are refused, and the Styles menu leaves Create style out for them.
2026-10-31 04:58:28 -07:00
dotCooCoo 1b7d9221e2 Selection colors: a library that is not a string is refused instead of linking a local style
selection.applyColorStyle chose the library path only when `library` read as a string, so an
object or array fell through and linked a local style of the same name. Any non-null `library`
now goes to the library lookup, which refuses a non-string before any change.
2026-10-31 04:47:01 -07:00
dotCooCoo 889983ffe2 Selection colors: Create style refuses a row whose fill or stroke list holds other paints
A created style holds the row's one paint, and linking it replaces the target's whole fill or
stroke list, so a layer with other fills or strokes lost them. selection.createColorStyle now
refuses such targets before any change, and the Styles menu leaves Create style out for those
rows.
2026-10-31 04:41:03 -07:00
dotCooCoo c7cd72b09e M3: Selection colors rows apply library color styles and create a style
A row's Styles menu lists this file's color styles (library copies are no
longer listed as local), then each enabled library's published color
styles under the library's name. Choosing a library style copies it in,
linked and read-only, and applies it to every fill and stroke the row
stands for in one undo step (selection.applyColorStyle with `library`).
A row linked to a style or variable now has the Styles button too, so it
can switch to another style.

Create style on an ordinary row opens a window with the next free
"Color n" name. Create makes a style of the row's whole paint (gradient
stops, opacity and blend mode included) and links it to every target in
one undo step (selection.createColorStyle {targets, name, description?}).
A name another style has, an empty name, or a row whose slots no longer
share one paint is refused, and the window stays open. Text ranges with
fills of their own take the style's value without a link.
2026-10-31 04:28:23 -07:00
bflatastic 9f5178f53a Merge main into #1421
# Conflicts:
#	crates/engine/src/cmd/props.rs
#	crates/engine/src/selection/selection_colors.rs
#	docs/roadmap.md
2026-10-29 11:50:45 +07:00
Dylan M. Taylor e98b97de2b refactor(engine): simplify session and test helpers 2026-10-28 16:00:36 +00:00
0d47564737 M3: bind fill and stroke variables directly in layer props (#1000)
node.create and node.set take {"$var": variable id or name} for fill and stroke: an exact id
first, then an unambiguous name or Collection/name. The binding goes through the same code as
variable.bind, is applied after literal values and style links, replaces other bindings of that
paint's colour and clears its style link, all in one undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
2026-10-27 12:55:48 +03:00
aiongg a587d964c9 refactor(engine): move selection_colors, selection_reorder, selection_spacing, rename to selection/ 2026-10-26 20:17:47 +00:00