-
-
Notifications
You must be signed in to change notification settings - Fork 59
--from-playground
& PlaygroundLayout
#731
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
Conversation
🦋 Changeset detectedLatest commit: 432899c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Even if I have said different things in the past, i must say that I kinda like this. The only thing i would like to prevent code wise is to have the massive string in that source code file. Maybe extract it into it's own file, or read that template in from a text file or something similar. That's the only thing i would suggest. |
It's good to have stuff step by step (also before, the idea wass less "designed" and too early). I agree with you that this massive string is not great. I will look at moving it to a file ✌️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a source code perspective, this looks really good and intuitive. The problem is that we stumble upon #568 (or better: svelte-add/svelte-add#193)
This is the error im getting:
[plugin:vite-plugin-svelte:compile] D:/cli-temp/src/lib/PlaygroundLayout.svelte:56:51 Unterminated string constant
https://svelte.dev/e/js_parse_error
PlaygroundLayout.svelte:56:51
54 | <span aria-hidden="true" style="margin-left:0.25em;"> ↗</span>
55 | </a>
56 | <button class="raised theme-toggle" onclick="{()" => setTheme(isDark ? 'light' : 'dark')}
^
57 | aria-label="Toggle theme"
58 | >
I'm not sure if / how we can solve this without #568 which still has quite a long way to go. Maybe we could make both properties component parameters which are initialized from +page.svelte
. I think that's the only reasonable quickfix i can currently imagine.
Hooo, I'm confused! |
Probably because we did not need to parse the file? I think either the parsing or the printing is doing strang stuff, since we are currently not using the svelte compiler |
Yeah, so I updated the code to still use it (to have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great now!
Here is the result:

Summary
/src/lib/PlaygroundLayout.svelte
to bring the Playground look and feel.src/lib/playground