Skip to content

fix(AppShell): wire up <nullable/> control hint - #2149

Merged
alexwarren merged 1 commit into
mainfrom
fix/editor-nullable-control-hint
Aug 27, 2026
Merged

fix(AppShell): wire up <nullable/> control hint#2149
alexwarren merged 1 commit into
mainfrom
fix/editor-nullable-control-hint

Conversation

@alexwarren

Copy link
Copy Markdown
Contributor

Summary

  • Part of Editor: several v5 .aslx control hints not wired through to AppShell (freetext, min/max/increment, nullable, width, ...) #2116.
  • <nullable/> was fully dead (29 uses across 8 .aslx files, e.g. an exit's Alias/Type dropdowns, several CoreEditorObjectContainer.aslx textboxes) - there was no way to fully unset a nullable field's attribute back to inherited/default from the property panel; only to overwrite it with an empty string, which is a different state (WorldModel attribute inheritance distinguishes "unset" from "").
  • RemoveAttribute already existed on the WASM bridge (WasmEditorBridge.cs:3210) and was already exposed to the frontend as removeAttribute (editor-store.ts), used by AttributesEditor.svelte's attribute-table delete button - it just wasn't offered anywhere on a regular property-panel control row.
  • Threads <nullable/> through ToControlInfo/ControlInfo and adds a small "✕" clear button next to any nullable control that currently has an explicit value (hidden once cleared), which calls the existing removeAttribute instead of setAttribute(attribute, "").

Test plan

  • dotnet build --configuration Release
  • dotnet test --configuration Release (all passing)
  • npm run check / npm run lint in src/AppShell (clean)
  • node tests/e2e/find-affected-tests.mjs + ran the relevant flagged scripts (verify-appshell-exits-editor, verify-appshell-attributes-panel-pinned, verify-appshell-code-view) against a local dev server - all pass.
  • Manual check in-browser: typed a value into an exit's nullable Alias field, confirmed the "✕" clear button appears, clicked it, and confirmed via the raw XML view that <exit /> has no alias attribute at all afterward (not even alias="") - i.e. it reverted to truly unset, not just blank.

🤖 Generated with Claude Code

@alexwarren
alexwarren force-pushed the fix/editor-nullable-control-hint branch 2 times, most recently from 1530324 to 544700e Compare August 26, 2026 16:59
<nullable/> was fully dead - a field could be edited freely but never fully
unset back to inherited/default; overwriting it with an empty string still
counts as an explicit override (WorldModel attribute inheritance treats
"unset" and "" differently).

Matches the old Quest 5 desktop editor's TextBoxControl/RichTextControl/
ExpressionControl: emptying a nullable field's value saves null (removing
the attribute) instead of "". No separate UI affordance is needed or
correct - an earlier version of this fix added a per-row "clear" button,
but that rendered in the wrong place for any stacked (multiline, or
long-label) field, since the button and the field it targeted ended up as
separate flex items in the stacked layout, and it also didn't stop the
field's own onchange from saving "" first when the button wasn't used.

Wired through onTextChange/onDropdownChange for textbox, richtext,
expression, and freetext dropdown - the only control types Core.aslx
actually pairs with <nullable/>.

Part of #2116.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alexwarren
alexwarren force-pushed the fix/editor-nullable-control-hint branch from 544700e to b9b3043 Compare August 26, 2026 17:02
@alexwarren
alexwarren merged commit f82ca3d into main Aug 27, 2026
16 checks passed
@alexwarren
alexwarren deleted the fix/editor-nullable-control-hint branch August 27, 2026 10:01
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