Skip to content

Commit c3526b5

Browse files
authored
Merge branch 'master' into fix/homepage-ab
2 parents 9e4dc60 + f303c22 commit c3526b5

File tree

5 files changed

+82
-62
lines changed

5 files changed

+82
-62
lines changed

packages/app/src/app/overmind/effects/vscode/initializers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function initializeSettings() {
4040
'editor.minimap.enabled': false,
4141
'workbench.editor.openSideBySideDirection': 'down',
4242
'svelte.plugin.typescript.diagnostics.enable': false,
43+
'typescript.locale': 'en',
4344
},
4445
null,
4546
2
@@ -71,6 +72,7 @@ export function initializeSettings() {
7172
settingsChanged = changeIfNeeded('javascript.autoClosingTags', false);
7273
settingsChanged = changeIfNeeded('typescript.autoClosingTags', false);
7374
settingsChanged = changeIfNeeded('html.autoClosingTags', false);
75+
settingsChanged = changeIfNeeded('typescript.locale', 'en');
7476
settingsChanged = changeIfNeeded(
7577
'typescript.tsserver.useSeparateSyntaxServer',
7678
false

packages/app/src/app/pages/Dashboard/Content/SandboxCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class SandboxItemComponent extends React.PureComponent<Props, State> {
404404

405405
copySandboxURL = () => {
406406
const url = sandboxUrl({ id: this.props.id, alias: this.props.alias });
407-
407+
// TODO: Use effects.browse.copyToClipboard after refactoring to Function Component
408408
copyToClipboard(`https://codesandbox.io${url}`);
409409

410410
return true;

packages/app/src/app/pages/Dashboard/Content/routes/Templates/OwnedTemplates/OwnedTemplates.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export const OwnedTemplates = (props: OwnedTemplatesProps) => {
2929
actions: {
3030
dashboard: { deleteTemplate },
3131
},
32+
effects: {
33+
browser: { copyToClipboard },
34+
},
3235
} = useOvermind();
3336
const { teamId } = props;
3437
const { loading, error, data, refetch } = useQuery<
@@ -99,6 +102,15 @@ export const OwnedTemplates = (props: OwnedTemplatesProps) => {
99102
return true;
100103
},
101104
},
105+
{
106+
title: 'Copy Template Link',
107+
action: () => {
108+
copyToClipboard(
109+
`https://codesandbox.io${sandboxUrl(template.sandbox)}`
110+
);
111+
return true;
112+
},
113+
},
102114
],
103115
{
104116
title: `Delete Template`,

packages/app/src/app/pages/GitHub/index.tsx

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -62,56 +62,58 @@ export const GitHub: FunctionComponent = () => {
6262

6363
return (
6464
<MaxWidth>
65-
<Margin vertical={1.5} horizontal={1.5}>
66-
<Container>
67-
<Navigation title="GitHub Import" />
65+
<div style={{ minHeight: '100vh' }}>
66+
<Margin vertical={1.5} horizontal={1.5}>
67+
<Container>
68+
<Navigation title="GitHub Import" />
6869

69-
<Content horizontal vertical>
70-
<Description>
71-
<Title>Import from GitHub</Title>
70+
<Content horizontal vertical>
71+
<Description>
72+
<Title>Import from GitHub</Title>
7273

73-
<SubTitle>
74-
Enter the URL to your GitHub repository to generate a URL to
75-
your sandbox. The sandbox will stay in sync with your
76-
repository.
77-
<br />
78-
<a
79-
href="/docs/importing#import-from-github"
80-
rel="noopener norefereer"
81-
target="_blank"
82-
>
83-
See the docs
84-
</a>
85-
</SubTitle>
86-
</Description>
74+
<SubTitle>
75+
Enter the URL to your GitHub repository to generate a URL to
76+
your sandbox. The sandbox will stay in sync with your
77+
repository.
78+
<br />
79+
<a
80+
href="/docs/importing#import-from-github"
81+
rel="noopener norefereer"
82+
target="_blank"
83+
>
84+
See the docs
85+
</a>
86+
</SubTitle>
87+
</Description>
8788

88-
<Label htmlFor="githuburl">
89-
URL to GitHub Repository (supports branches and paths too)
90-
</Label>
89+
<Label htmlFor="githuburl">
90+
URL to GitHub Repository (supports branches and paths too)
91+
</Label>
9192

92-
<Input
93-
name="githuburl"
94-
onChange={updateUrl}
95-
placeholder="Insert GitHub URL..."
96-
value={url}
97-
/>
93+
<Input
94+
name="githuburl"
95+
onChange={updateUrl}
96+
placeholder="Insert GitHub URL..."
97+
value={url}
98+
/>
9899

99-
{error !== null && <ErrorMessage>{error}</ErrorMessage>}
100+
{error !== null && <ErrorMessage>{error}</ErrorMessage>}
100101

101-
<Label htmlFor="sandboxurl">Converted Sandbox URL</Label>
102+
<Label htmlFor="sandboxurl">Converted Sandbox URL</Label>
102103

103-
<Input
104-
name="sandboxurl"
105-
placeholder="The Sandbox URL"
106-
value={transformedUrl}
107-
/>
104+
<Input
105+
name="sandboxurl"
106+
placeholder="The Sandbox URL"
107+
value={transformedUrl}
108+
/>
108109

109-
<Button disabled={!transformedUrl} to={gitHubToSandboxUrl(url)}>
110-
Open Sandbox
111-
</Button>
112-
</Content>
113-
</Container>
114-
</Margin>
110+
<Button disabled={!transformedUrl} to={gitHubToSandboxUrl(url)}>
111+
Open Sandbox
112+
</Button>
113+
</Content>
114+
</Container>
115+
</Margin>
116+
</div>
115117
</MaxWidth>
116118
);
117119
};

packages/app/src/app/pages/Sandbox/index.tsx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Padding from '@codesandbox/common/lib/components/spacing/Padding';
55
import { getSandboxName } from '@codesandbox/common/lib/utils/get-sandbox-name';
66
import { Title } from 'app/components/Title';
77
import { useOvermind } from 'app/overmind';
8+
import { ThemeProvider } from '@codesandbox/components';
9+
import codesandboxBlack from '@codesandbox/components/lib/themes/codesandbox-black';
810
import { GithubIntegration } from 'app/pages/common/GithubIntegration';
911
import { Navigation } from 'app/pages/common/Navigation';
1012
import React, { useEffect } from 'react';
@@ -137,26 +139,28 @@ export const Sandbox = React.memo<Props>(
137139

138140
if (content) {
139141
return (
140-
<Fullscreen>
141-
<Padding
142-
style={{
143-
display: 'flex',
144-
flexDirection: 'column',
145-
width: '100vw',
146-
height: '100vh',
147-
}}
148-
margin={1}
149-
>
150-
<Navigation title="Sandbox Editor" />
151-
<Centered
152-
style={{ flex: 1, width: '100%', height: '100%' }}
153-
horizontal
154-
vertical
142+
<ThemeProvider theme={codesandboxBlack}>
143+
<Fullscreen>
144+
<Padding
145+
style={{
146+
display: 'flex',
147+
flexDirection: 'column',
148+
width: '100vw',
149+
height: '100vh',
150+
}}
151+
margin={1}
155152
>
156-
{content}
157-
</Centered>
158-
</Padding>
159-
</Fullscreen>
153+
<Navigation title="Sandbox Editor" />
154+
<Centered
155+
style={{ flex: 1, width: '100%', height: '100%' }}
156+
horizontal
157+
vertical
158+
>
159+
{content}
160+
</Centered>
161+
</Padding>
162+
</Fullscreen>
163+
</ThemeProvider>
160164
);
161165
}
162166

0 commit comments

Comments
 (0)