feat(AppShell): add Show Library Elements toggle to editor tree - #1961
Merged
Conversation
Wires up the "Show Library Elements" filter, IsLibraryElement flag, and MakeElementLocal() that already existed in EditorCore/Engine (ported from the old v5 desktop editor) but were never exposed through WasmEditorBridge to the new Svelte tree/properties UI. Library-origin elements from Core.aslx and included libraries can now be shown greyed-out and read-only in the tree via a view-options dropdown, with a banner and "Copy into your game" action in the properties panel that turns one into a normal, locally saved, editable override — matching the old editor's behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core.aslx/included libraries in the tree, greyed out and with no context menu.MakeElementLocal()in place, matching the old v5 desktop editor's behavior — the element becomes a normal, locally-saved, fully editable override of the library original (verified the element shows up in the saved XML afterwards).This is almost entirely plumbing:
EditorController/EditorDatainEditorCorealready hadIsLibraryElement,Filename,MakeElementLocal(), and a"libraries"filter option (all ported from the old v5 editor), but none of it was ever wired throughWasmEditorBridgeto the Svelte UI. The one new piece of logic isEditorController.MakeElementLocal(string key), which wraps the existingMakeElementLocal()in an undo transaction (its raw field sets are otherwise silently dropped — nothing else was starting one) and refreshes that one tree node.Test plan
dotnet build --configuration Release— 0 errors/warningsdotnet test tests/EditorCoreTests— 19/19 passednpm run check/npm run lintinsrc/AppShell— clean🤖 Generated with Claude Code