Skip to content

Support editing properties of type array without oneOf, selector and selectorAll#69

Merged
vincentfretin merged 2 commits into
devfrom
fix-type-array-of-string-dev
Apr 25, 2026
Merged

Support editing properties of type array without oneOf, selector and selectorAll#69
vincentfretin merged 2 commits into
devfrom
fix-type-array-of-string-dev

Conversation

@vincentfretin
Copy link
Copy Markdown
Member

Add support for editing a property of type array without oneOf like animation startEvents, selector and selectorAll types.

vincentfretin and others added 2 commits April 25, 2026 13:25
… startEvents

InputWidget now owns its (de)serialization (mirroring SelectWidget's
pattern): it accepts value as string, array, or custom object, and
when a schema is provided it stringifies non-string values via
schema.stringify for display and parses the input back via schema.parse
on change for array-typed properties. This ensures A-Frame always
receives an array for array-type properties — avoiding arrayStringify
being called on a raw string downstream (which would crash with
"t.join is not a function"). The "custom string type like event-set"
stringify previously done in PropertyRow is also moved here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
For selector and selectorAll types, read the value from getDOMAttribute
(the raw selector string) rather than props.data (the parsed
Element/NodeList), and commit on blur instead of on every keystroke —
querying the DOM on each character is wasteful and a partial selector
is rarely valid. Omit the schema when rendering InputWidget so the
typed string is passed through to setAttribute as-is, which A-Frame
preserves verbatim in attrValue even if it doesn't resolve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vincentfretin vincentfretin merged commit fdd7910 into dev Apr 25, 2026
1 check passed
@vincentfretin vincentfretin deleted the fix-type-array-of-string-dev branch April 25, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant