Skip to content

Commit

Permalink
fix(sites): fix REPL styles (#8770)
Browse files Browse the repository at this point in the history
* Push

* Push fixes

* Delete vite.config.js.timestamp-1687278902174-a59162675b2f6.mjs

* Remove log

* bump site-ki
  • Loading branch information
PuruVJ authored Jun 21, 2023
1 parent 3858321 commit fe60894
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/svelte.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@resvg/resvg-js": "^2.4.1",
"@sveltejs/adapter-vercel": "^3.0.1",
"@sveltejs/kit": "^1.20.4",
"@sveltejs/site-kit": "6.0.0-next.6",
"@sveltejs/site-kit": "6.0.0-next.8",
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@types/marked": "^5.0.0",
"@types/node": "^20.3.1",
Expand Down
2 changes: 1 addition & 1 deletion sites/svelte.dev/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
%sveltekit.head%
</head>
<body data-sveltekit-preload-code="hover">
<div>%sveltekit.body%</div>
<div style="height: 100%">%sveltekit.body%</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export async function load({ fetch, params, url }) {

return {
gist,
version: url.searchParams.get('version') || '3'
version: url.searchParams.get('version') || '4.0.0-next.2'
};
}
5 changes: 3 additions & 2 deletions sites/svelte.dev/src/routes/(authed)/repl/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
onMount(() => {
if (data.version !== 'local') {
fetch(`https://unpkg.com/svelte@${data.version || '3'}/package.json`)
fetch(`https://unpkg.com/svelte@${data.version || '4.0.0-next.2'}/package.json`)
.then((r) => r.json())
.then((pkg) => {
version = pkg.version;
Expand Down Expand Up @@ -101,7 +101,8 @@
<style>
.repl-outer {
position: relative;
height: calc(100vh - var(--sk-nav-height));
height: calc(100% - var(--sk-nav-height));
height: calc(100dvh - var(--sk-nav-height));
--app-controls-h: 5.6rem;
--pane-controls-h: 4.2rem;
overflow: hidden;
Expand Down
9 changes: 7 additions & 2 deletions sites/svelte.dev/src/routes/tutorial/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,20 @@
$: mobile = width < 768;
function reset() {
repl.update({
repl.set({
files: data.tutorial.initial.map(clone)
});
//! BUG: Fix handleChange on REPL side, setting repl.set doesn't trigger it, and repl.update doesn't even work
completed = false;
}
function complete() {
repl.update({
repl.set({
files: data.tutorial.complete.map(clone)
});
completed = true;
}
let completed = false;
Expand Down

0 comments on commit fe60894

Please sign in to comment.