Commit Graph
130 Commits
Author SHA1 Message Date
bflatastic 5d4bd9f12d Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:47:44 +07:00
bflatastic 8b53445116 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:45:35 +07:00
bflatastic 450db00e9a Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:43:50 +07:00
bflatastic 3e2272057f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:43:13 +07:00
bflatastic 8ed8860632 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:39:29 +07:00
bflatastic 32a416fe9f Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:10:24 +07:00
bflatastic 5d218f6387 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:09:03 +07:00
bflatastic 75aab2372c Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:08:12 +07:00
bflatastic 026c1b33ca Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:07:58 +07:00
bflatastic 010bb86c0b Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:06:19 +07:00
bflatastic eddba16aae Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/components-parity.md
2026-11-27 14:06:02 +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 fd45d4f05b M3: a main pasted from its library file into another file is an instance of it
Copying a main component in a library file and pasting it into another
file made a copy of the main there: a new component of that file, not
linked to the library. Copy then Paste of a main in its own file already
makes an instance, and pasting an instance from the library file already
uses the main from the library. Now a main the source file publishes is
an instance of it from that library too, which gets enabled the same way,
as Figma does with a published component. A variant is an instance of that
variant.

A main the library doesn't offer (hidden from publishing, added since the
last publish) and a main from a file that publishes no library still paste
as a copy. Making those an instance as well was rejected: their main would
stay in the other file, so the instance would show a missing main.

The part of adopt_pasted that brings published components in is now
from_published, shared with the new published_main.
2026-11-24 03:00:27 -05:00
Denis Gomes 8056e20dcf M3: a variant switch keeps typed text the other variant nests in other frames
Switching an instance to another variant matched its old layers to the
new variant's by source and then by name path. When the two variants nest
the same text layer differently (text > Label in one, div > text > Label
in the other), the path differs, the typed layer matched nothing, and the
new variant's own text came back.

A text layer of the new variant that nothing else matched now takes the
old text layer of the same name, when exactly one layer on each side has
that name. Two of one name stay unmatched, since either could be the one
typed into. Layers inside nested instances are left to their own mains'
rebuild, so a text layer never moves between instances.

Matching every layer kind by name alone was left out: a fill or size kept
from another place in the tree would land on a layer that only shares a
name, while text is what was typed and the layer most likely to be the
same one.
2026-11-24 02:57:37 -05:00
Denis Gomes 167ce234bc M3: Library styles show in the style pickers without the Assets tab, with a source menu
Enabled libraries were read from disk only by the Assets panel
(refresh_libraries ran from its show). After a file with enabled
libraries was opened, the Design panel's style pickers found none in
the cache, and a library's text styles weren't offered ("No text styles
yet") until the Assets tab had been opened once.

refresh_libraries now runs from the app's background tick, whichever
tab shows, and reads a local library not read yet at once instead of
waiting out the 2 s throttle. A library the read refuses (too large, or
not on this computer) is never cached, so the tick remembers the paths
it last tried and tries those again only after the throttle; otherwise
it would read again every frame. The periodic repaint that picks up a
library changed on disk stays with the Assets panel, so an idle window
isn't woken every 2 s; the panel's doc comment now describes that
repaint.

The style picker gets Figma's source menu under the search field when
the file has enabled libraries: All libraries (the default, the list as
before), This file, or one library, kept while the picker is open. A
library that goes away falls back to All libraries.
2026-11-19 16:18:29 -05:00
Denis Gomes 0f54b38f42 M3: A variable created with a group shown goes into that group
With a group selected in the Local variables window, + Create variable
named the new variable after its type alone ("Number"), so it went to
the collection's top level. The table, showing the group, didn't show
it; only All variables did. In Figma it's made in the group shown.
Duplicate already kept the group (the copy is "space/sm copy").

The new variable's name now starts with the group shown. Its name opens
for editing right away, and the row's field edited the whole name while
the row shows only the last part, so typing a name over the new grouped
variable would have moved it straight back out of the group. The field
now edits the part shown and keeps the group; the Edit variable window
still edits the whole name, which is where a variable moves between
groups by typing.

A name typed there with nothing but slashes and spaces is ignored, as an
empty one is: under the group it would clean up to the group's own name
and drop the variable out of it. Creating a collection clears the group
shown, as picking another collection does, so its first variable isn't
named after a group of the collection shown before.
2026-11-19 15:51:49 -05:00
Denis Gomes 6c590e4e89 M3: Several selected instances show and set the properties they share
With two or more instances selected the Design panel showed no instance
properties, so changing a variant or a property meant selecting each
instance in turn. instance.setProperties already took several ids.

The panel now shows the variant, boolean, text and instance-swap
properties the selected instances share, matched by name and type. A
variant property lists only the values every one of their sets has, so
the command can't be refused for one of them. Where the values differ
the row reads Mixed (a dropdown's label, the text field's placeholder,
the checkbox's third state), and a value chosen there is set on every
selected instance in one step. A selection with any layer that isn't an
instance shows none of this. Slots are filled one instance at a time,
so their rows show only for one.

A single instance goes through the same code with one id. One
difference: a single instance's slot property whose slot can't be
found now shows no row, where it showed a label with nothing beside it.
swap_dropdown takes `mixed` to label such a row.

A text field that reads Mixed changes nothing when committed empty: the
field reports its text on every Enter or focus loss, edited or not, so
an empty commit there can't be told from a click in and out.
2026-11-19 15:41:56 -05:00
Denis Gomes 807d78b86d M3: A binding the main layer doesn't have stays an override when instances are relinked
Linking imported instances to their mains (and detaching an outer
instance, or restoring a main) finds overrides by comparing each layer
with its main layer, and compared values only. A layer bound to a
variable its main layer doesn't bind, resolving to the main's colour,
therefore wasn't an override. The next copy or edit of the main reset it
to the main's unbound paint: in a file using a library, a button's icon
lost the colour variable the library's button gave it, while the label
next to it, whose main binds the variable, kept it.

rebase_instance now adds the groups whose bindings differ from the main
layer's (diff::rebound_groups), as record_overrides already did for a
binding made in an instance. record_overrides no longer clears such an
override when an edit sets the value back to the main's (hiding and
showing the fill). Bindings are compared by what they bind, so `fill`
and `fills/0/color` are one binding.
2026-11-19 15:29:16 -05:00
Denis Gomes 85de85d569 M3: Paste with a variant's set selected adds the copied variants to it
Copying a variant and pasting with that variant, a layer in it or its set
selected pasted an instance on the page: the set was not a place paste
could put layers, and a copied main component pastes as an instance of
it. Copied variants of one set now paste into that set as new variants
(deep copies, like Duplicate makes), under the copied variants where they
are now and below the lowest variant with a gap of 20 as Add variant
places one, and the set grows to hold them.

Only a plain edit.paste with the copied variants' own set, or a layer in
it, selected does this: paste decides it and passes it to paste_into's
worker, which also checks the target is that set. Inferring it from the
parent being a component set made copies of the mains for every other
paste into a set too. Those keep making instances: a variant pasted with
another set selected, a main that is no variant pasted with a set
selected, Paste over and Paste to replace on a sibling variant, and an
explicit parent, even the variant's own set. Each has a test.

copying_a_variant_pastes_an_instance_but_copying_its_set_keeps_the_components
now pastes with nothing selected for its instance case.
2026-11-19 15:27:42 -05:00
bflatastic 0e5070d6cf M3: a library's style that reaches a file through another library stays bound (#2414)
Publishing keeps the variables its styles bind and where its copies of other libraries' assets came
from; importing files such a copy under that library when the file links it.
2026-11-19 03:54:44 +07:00
bflatastic 116094a6db M3: a selected variant's property dropdown shows and sets its own value (#2349)
It showed the set's default, and choosing a value set the default, so the variants swapped places.
2026-11-19 03:16:35 +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
bflatastic d21aebab4b M3: combining components gives every variant the properties any of them had
A property added to a set goes to all its variants (component.addProperty), but
Combine as variants kept each component's own definitions, so a property made
on one component before combining was missing from the others: their layers
couldn't be bound to it ("the component has no property") and an instance
switched to one of them dropped its value. make_variant_set now gives every
variant the properties any of them has (share_props, through the give_prop step
addProperty uses too); a variant with a property of that name keeps its own.
Tests: variant_shared_props_tests.
2026-11-18 19:12:17 +07:00
BFlat 5f87a60f2d Merge pull request #2445 from storytold/carry/2370
M3: a text field shows a value too long for it with an ellipsis and a tooltip (#2368)
2026-11-18 19:09:07 +07:00
Trevor Brown d494fad166 M2: Fill across a hugging axis takes the line, as Figma does
In a hugging parent, Fill on the other axis follows the line the way
Figma does, instead of forcing the parent Fixed. This also covers item 2
of #2090 on both axes: a hugging main that becomes Fixed is followed by
its instances' roots.

Fixes #2091 item 3. Fixes #2034. Fixes item 2 of #2090.
2026-11-18 18:31:20 +07:00
FredApps 08f346d0d7 Merge remote-tracking branch 'origin/main' into fix/kscale-bound-values-2090
Signed-off-by: FredApps <153173854+FredApps@users.noreply.github.com>

# Conflicts:
#	docs/components-parity.md
#	docs/ui-parity.md
2026-11-18 16:42:57 +07:00
Trevor BrownandClaude Sonnet 5.5 ed8df474f0 M3: a text field shows a value too long for it with an ellipsis and a tooltip (#2368)
A text field that isn't being edited painted its whole value clipped to the field, so the variant value "Down left" read "Down lef". It now paints the value shortened with an ellipsis to fit, and hovering shows the whole value (not for a secret field). Editing and screen readers keep the whole value.

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-18 15:32:25 +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
Trevor BrownandClaude Opus 5.5 d3d48eebd5 Merge upstream/main into feat/variables-window-resize-2354
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 driver, no subagent
2026-11-17 06:33:56 -05:00
Trevor BrownandClaude Opus 5.5 89cc2fbe14 Merge upstream/main into fix/kscale-bound-values-2090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:33:26 -05:00
Trevor BrownandClaude Opus 5.5 7e1db33e63 Merge upstream/main into docs/repair-merged-rows-1113
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:33:24 -05:00
Trevor BrownandClaude Opus 5.5 e981f66d2d Merge upstream/main into feat/variables-window-resize-2354
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:33:23 -05:00
Trevor BrownandClaude Opus 5.5 4b9e900f89 M3: the Local variables window's minimum width fits the table's header row (#2354)
At 480 points the table was 279 wide, leaving 11 points next to the 220-point search field for a library collection's Extend collection button. The minimum is now 600 x 240 (table 399 wide); the default size's clamp uses the same minimum. variables 43 passed, clippy clean (CodeRabbit on #2363).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 02:49:35 -05:00
Trevor BrownandClaude Sonnet 5.5 c59dc0fdcb M3: the Local variables window resizes from its edges and corners (#2354)
The window was fixed at 880 x 480. It now resizes from every edge and corner, down to 480 x 240 and up to the screen less a margin, and its header, sidebar and table follow its current size. Egui's memory keeps the size and place while the app runs.

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-14 00:41:10 -05:00
Zinadin Zidan 7644de9f81 Variables: renaming a group to a path with / nests it (#2353)
Renaming a group in the Local variables window replaced every slash in the
typed name with a hyphen, so "Palette/Orange" gave a flat Palette-Orange
group and there was no way to move a group under a new parent.

The typed path now replaces the group's last part, so a slash nests the
group as in Figma: Orange/100 becomes Palette/Orange/100 and the sidebar
shows Orange under Palette. Each part is trimmed and empty parts are
dropped; a name that comes out empty or unchanged does nothing. The
renames go deepest name first, so a group moved into its own new subgroup
(Orange to Orange/Warm) never collides with a variable that is still to
move. A rename onto a variable name that stays is refused by
variable.update and the batch rolls back; it stays one undo step.
2026-11-14 02:36:36 +06:00
Trevor BrownandClaude Sonnet 5.5 a870a08cdb docs: merge back the parity rows that recent merges duplicated or garbled
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 12:16:52 -05: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
Trevor BrownandClaude Sonnet 5.5 29b4e34c90 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-13 10:39:23 -05:00
Trevor BrownandClaude Sonnet 5.5 654f1c4911 M8: a scale that would take an instance past its scale range is refused, so bound and unbound lengths stay equal (#2090)
scale_node clamped only the stored scale factor while every other length took the full factor, so past 0.001 to 1000 a bound length (drawn at the variable's value times the factor) and an unbound one drifted apart. A new scale_fits checks every instance the scale multiplies (sharing the covered rule with scale_node) and scale_node and transform.scale refuse before changing anything; a selection where only one root fails changes nothing. The Scale tool drag keeps the last frame that fit.

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 22:28:38 -05:00
Trevor BrownandClaude Sonnet 5.5 7057fbf3a5 Merge upstream/main into feat/variables-duplicate-group-2084
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:57 -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
Trevor BrownandClaude Sonnet 5.5 a60cb1a6fa M7: the Design panel shows the page's variable modes with nothing selected (#2215) (#2312)
Pages take a variable mode, set from the Page section of the right sidebar once a local collection has more than one mode. With nothing selected the Page section now shows the same Variable modes section the frames have: a row per multi-mode collection, Auto or one of its modes, one undo step per pick (variable.setMode without layers sets the page's mode). The frame's row drawing is shared, not copied.


Model-Effort: Opus 5.5 drove; Fable 5.2 queued; Opus 5.5 briefed; Sonnet 5.5 measured and wrote at medium

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 01:45:48 +01:00
Trevor BrownandClaude Sonnet 5.5 3d781caa92 Merge remote-tracking branch 'upstream/main' into feat/variables-duplicate-group-2084
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 05:00:10 -05:00
BFlat e6b16f5f43 Merge pull request #2089 from TrevorBrown-dev/feat/variables-edit-several-2082
Variables: edit Hide from publishing and scopes of several variables at once
2026-11-12 11:27:40 +07:00
bflatastic 561f7fc2b9 Merge main into #2089 2026-11-12 11:07:42 +07:00
bflatastic 7ecb6f1c03 Merge main into #2094 2026-11-12 11:07:19 +07:00
bflatastic 3c0505def6 Merge main into #2094 2026-11-12 10:50:07 +07:00
bflatastic a257d93866 Merge remote-tracking branch 'origin/main' into landb/2089 2026-11-12 10:47:28 +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 a5b98d9612 Merge main into #2223 2026-11-12 10:11:57 +07:00