openpencil/packages/scene-graph/tests
Danila Poyarkov aeba9a6bd5
fix(scene-graph): leave a field a component property drives to its instance (#843)
* fix(scene-graph): leave a field a component property drives to its instance

A component states the default for a field a property reference drives,
but the enclosing instance's assignment decides the value. Synchronising
copied the default over it, so loading a page into an open document —
which synchronises every component it places — reset those layers. A
label a navigation item assigned came back as the component's default
when its page loaded on its own, while reading the whole archive gave
the assigned text.

Synchronising now skips a field whose reference names a property an
enclosing instance assigns, and carries everything else as before.

* fix(scene-graph): read an own assignment, not an inherited key

A document-authored component property id can collide with an Object
prototype key, and `in` would then report an assignment the instance
never made, silently leaving the referenced field unsynchronised.

* test(core): cover visibility and swap on an independent page load

The fix skips any field a component property reference drives, so the
page-scoped test should exercise VISIBLE and INSTANCE_SWAP alongside
TEXT rather than leaving the other two to full-document reads.

* fix(scene-graph): leave slot content to its own guard

#850 added a SLOT_CONTENT reference field, which drives a slot frame's
children rather than a scalar field, so the property-driven field map
no longer claims to cover every reference field.
2026-10-04 01:38:23 +04:00
..
basic feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
clone test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
color fix(tools): judge describe text contrast by WCAG ratio (#758) 2026-09-30 11:32:34 +04:00
components fix(scene-graph): leave a field a component property drives to its instance (#843) 2026-10-04 01:38:23 +04:00
helpers test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
text feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
transfer feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
undo test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
variable/binding test(core): move the fig round-trip suite home, and stop test imports drilling 2026-10-01 14:11:53 +04:00
buffered-events.test.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
copy.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
instance-overrides.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
instance-sync-duplication.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
layout-guides.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
mutation-impact.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
reparent-transform.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
source-metadata.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
vector-network.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00
world-bounds.test.ts fix(figma-api): size groups and boolean operations to their contents (#775) 2026-09-30 05:23:59 +04:00
world-transform.test.ts test: migrate Scene Graph tests into the package and gate new tests/engine files (#790) 2026-09-30 04:53:28 +04:00