sveltejs / svelte.dev

The Svelte omnisite
https://svelte.dev
110 stars 67 forks source link

REPL / Playground embed is broken #665

Open SrGeneroso opened 3 weeks ago

SrGeneroso commented 3 weeks ago

The feature of embedding the playground seems broken. https://svelte.dev/playground/embed which translates to https://svelte.dev/playground/hello-world/embed?version=5.0.0-next.272 (I've tried to manually change the version to 5.1.3 which is the current version on the svelte.dev site and is the same) doesn't work and freezes on loading Svelte Compiler Browser console gives this error for Editor.DgIedeOC.js:426

Uncaught (in promise) Error: Workspace must have at least one file
    at Ck.set (Editor.DgIedeOC.js:426:8826)
    at Ck.reset (Editor.DgIedeOC.js:426:8508)
    at Proxy.x (config.BSQVWH8N.js:68:6165)
    at 9.JGmp0oYm.js:1:1331
    at entry.D0hSBSpY.js:1:13001
    at Array.forEach (<anonymous>)
    at st (entry.D0hSBSpY.js:1:12990)
    at fn (entry.D0hSBSpY.js:1:26819)
    at async Module.yn (entry.D0hSBSpY.js:1:11374)
SrGeneroso commented 3 weeks ago

Unrelated question. For context, I'm beggining into the translation of the docs in spanish, and some of the workflow breaks because you need supabase and github authentication for allowing saving and sharing of repls. So... could another version of embed (¿ embed-full ?) include that login feature so I can add the playground in an iframe and have users use the fully featured repl? Would be neat because it eliminates fragmentation of users (spanish users would not live only in our database) and alleviate some of the technical challenges of selfhosting the translated docs (We might not need a database or github authentication at all!) Please let me know.