Skip to content

Commit 42a3e06

Browse files
committed
Tweak the design
1 parent 5bcf922 commit 42a3e06

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

packages/playground/remote/remote.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>WordPress Playground</title>

packages/playground/remote/src/lib/boot-playground-remote.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ import workerV2Url from './playground-worker-endpoint-blueprints-v2.ts?worker&ur
3636
const origin = new URL('/', (import.meta || {}).url).origin;
3737

3838
function getWorkerUrl(): string {
39-
const runner = new URL(document.location.href).searchParams.get('blueprints-runner');
39+
const runner = new URL(document.location.href).searchParams.get(
40+
'blueprints-runner'
41+
);
4042
const isV2 = runner === 'v2';
4143
const selected = isV2 ? workerV2Url : workerV1Url;
4244
return new URL(selected, origin) + '';

packages/playground/website/src/components/layout/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { SiteManager } from '../site-manager';
44
import { CSSTransition } from 'react-transition-group';
55
import type { PlaygroundReduxState } from '../../lib/state/redux/store';
66
import { useAppSelector } from '../../lib/state/redux/store';
7-
import type { BlueprintV1Declaration } from '@wp-playground/blueprints';
87
import { useState, useRef } from 'react';
98
import { acquireOAuthTokenIfNeeded } from '../../github/acquire-oauth-token-if-needed';
109
import { GithubExportModal } from '../../github/github-export-form';
@@ -80,7 +79,7 @@ export function Layout() {
8079
* over other modals (e.g. connect to GitHub). Discuss whether modals should be declared at the
8180
* top level, like here, or contextual to where the "Show modal" button is rendered.
8281
*/
83-
function Modals(blueprint: BlueprintV1Declaration) {
82+
function Modals() {
8483
const query = new URL(document.location.href).searchParams;
8584

8685
const [githubExportFiles, setGithubExportFiles] = useState<any[]>();

packages/playground/website/src/components/playground-viewport/index.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,12 @@ export const KeepAliveTemporarySitesViewport = () => {
160160
</div>
161161
</div>
162162
)}
163-
{!activeSite && activeSiteSlugIsSet && (
164-
// Show a progress bar while the site is being created.
165-
// Once the site exists and is being rendered, the iframe
166-
// will show its own loading screen ("Preparing WordPress...").
167-
<div className={css.loadingViewport}>
168-
<h3 className={css.loadingCaption}>&nbsp;</h3>
169-
<div className={css.progressWrapper}>
170-
<div className={css.progressBar} />
171-
</div>
163+
<div className={css.loadingViewport}>
164+
<h3 className={css.loadingCaption}>&nbsp;</h3>
165+
<div className={css.progressWrapper}>
166+
<div className={css.progressBar} />
172167
</div>
173-
)}
168+
</div>
174169
{slugsSeenSoFar.map((slug) => {
175170
const site = sitesBySlug.get(slug);
176171
const viewportKey = site

packages/playground/website/src/components/playground-viewport/style.module.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@
99
border: 0;
1010
margin: 0;
1111
padding: 0;
12+
background: #fff;
1213
}
1314

1415
.loading-viewport {
15-
position: relative;
16+
position: absolute;
17+
top: 0;
18+
left: 0;
19+
right: 0;
20+
bottom: 0;
1621
width: 100%;
1722
height: 100%;
1823
display: flex;
@@ -50,7 +55,7 @@
5055
}
5156

5257
.progress-wrapper {
53-
background: #32363a;
58+
background: #1e1e1e;
5459
}
5560
}
5661

0 commit comments

Comments
 (0)