Skip to content

fix: wire up embedded examples correctly #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Oct 8, 2024

also cleans up some code in the embed Svelte component

fixes #259, though there's a lot of work around getting examples building properly to do:

  • right now it's built from a generated-and-checked-in JS file. Should come from a folder instead
  • decision: should that examples folder be curated inside the Svelte repo or here?
  • the examples page is gone at the moment, we need to bring them back in some form (IIRC the idea was to have a dropdown on the REPL)

also cleans up some code in the embed Svelte component
Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 0:52am

@Rich-Harris
Copy link
Member

right now it's built from a generated-and-checked-in JS file. Should come from a folder instead

I don't totally follow what this means — what file is generated/checked in?

should that examples folder be curated inside the Svelte repo or here?

definitely in here, I think

the examples page is gone at the moment, we need to bring them back in some form (IIRC the idea was to have a dropdown on the REPL)

Yeah my thinking was that we'd have a menu icon directly beneath the Svelte logo, which would open a dropdown with a bunch of examples and also a 'create new' option that would blank everything out. The current default 'hello world' would be one of those options

@dummdidumm
Copy link
Member Author

dummdidumm commented Oct 8, 2024

I don't totally follow what this means — what file is generated/checked in?

It's coming from src/lib/generated/examples-data.js right now. I believe you checked it in (by accident or on purpose, I don't know) when setting up this repo.

I'll continue working on this once this is merged.

@Rich-Harris Rich-Harris merged commit 31d679a into main Oct 8, 2024
3 checks passed
@Rich-Harris Rich-Harris deleted the playground-examples-embed branch October 8, 2024 13:21
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.

Playground embeds don't work
2 participants