Adding Quest Viva WebEditor#1716
Merged
Merged
Conversation
- Add WasmEditor project (net10.0/browser-wasm) with JSExport bridge:
Initialise, GetTreeNodes, GetEditorData, Save, Undo, Redo
- Add ByteArrayGameDataProvider to Common for passing file bytes from JS
- Change EditorController.Initialise to accept IGameDataProvider instead
of a filename string; update EditorCoreTests call sites accordingly
- Remove unused System.Data.DataSetExtensions from EditorCore.csproj
- Use source-generated JSON (JsonSerializerContext) and
[assembly: SupportedOSPlatform("browser")] — builds with zero warnings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add src/WebEditor/ — SvelteKit 2 / Svelte 5 / Vite 6 project - vite.config.ts serves WasmEditor AppBundle at /AppBundle/ with COOP/COEP headers required for .NET WASM SharedArrayBuffer - src/lib/wasm.ts loads the .NET runtime and exposes WasmBridge - src/lib/editor-store.ts wraps all WASM calls behind Svelte stores - Welcome page: file picker → Uint8Array → Initialise() → /editor - Editor page: TreePanel (hierarchical, indented) + PropertyEditor (attr list) + Toolbar (save-as-download, undo, redo) - Simplify WasmEditor/Program.cs — no JSHost.ImportAsync needed until JSImport callbacks are wired up in a later phase Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wire up SvelteKit to the .NET WASM runtime via a dynamic import (new Function pattern) pointing at /AppBundle/_framework/dotnet.js, with nested object property access for exports (exports.QuestViva.WasmEditor.WasmEditorBridge) - Fix tree population: subscribe no-op handlers to ClearTree/BeginTreeUpdate/ EndTreeUpdate so UpdateTree() doesn't bail early, then call UpdateTree() after Initialise succeeds - Fix JSON camelCase: add JsonSourceGenerationOptions(CamelCase) so tree node keys deserialise correctly in TypeScript (was causing each_key_duplicate errors) - Fix navigation guard: replace $effect (fires during SSR) with onMount + get() so redirecting to / only runs client-side - Add +layout.ts disabling SSR/prerender for the WASM SPA - Add return; to Program.cs to satisfy CS5001 entry-point requirement - Set Vite dev server port to 5174 to avoid clash with Squiffy editor - Add build-editor.sh convenience script for rebuilding the WASM module Co-Authored-By: Claude Sonnet 4.6 <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.
This PR adds the scaffolding for the new Quest Viva WebEditor. It will replace Quest 5's desktop and web editors, running entirely locally (in the browser, or wrapped in a desktop app) - compiling the C# code to WASM for an in-browser "back-end", with a Svelte front-end talking to it.