Skip to content

Commit f7ab0aa

Browse files
Merge branch 'master' into chameleon
2 parents b6c140f + f7a25a3 commit f7ab0aa

File tree

55 files changed

+683
-472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+683
-472
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,15 @@
13851385
"contributions": [
13861386
"code"
13871387
]
1388+
},
1389+
{
1390+
"login": "hetpatel33",
1391+
"name": "Het Patel",
1392+
"avatar_url": "https://avatars0.githubusercontent.com/u/13877514?v=4",
1393+
"profile": "http://hetpatel33.github.io",
1394+
"contributions": [
1395+
"code"
1396+
]
13881397
}
13891398
],
13901399
"contributorsPerLine": 7,

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-146-orange.svg?style=flat-square)](#contributors-) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1+
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-148-orange.svg?style=flat-square)](#contributors-) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
22

33
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
44
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
@@ -41,7 +41,8 @@ Thanks goes to these wonderful people
4141
([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):
4242

4343
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
44-
<!-- prettier-ignore -->
44+
<!-- prettier-ignore-start -->
45+
<!-- markdownlint-disable -->
4546
<table>
4647
<tr>
4748
<td align="center"><a href="http://ivesvh.com"><img src="https://avatars0.githubusercontent.com/u/587016?v=3" width="100px;" alt="Ives van Hoorne"/><br /><sub><b>Ives van Hoorne</b></sub></a><br /><a href="#question-CompuIves" title="Answering Questions">💬</a> <a href="#blog-CompuIves" title="Blogposts">📝</a> <a href="https://github.com/codesandbox/codesandbox-client/issues?q=author%3ACompuIves" title="Bug reports">🐛</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Code">💻</a> <a href="#design-CompuIves" title="Design">🎨</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Documentation">📖</a> <a href="#example-CompuIves" title="Examples">💡</a> <a href="#infra-CompuIves" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#review-CompuIves" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=CompuIves" title="Tests">⚠️</a> <a href="#tool-CompuIves" title="Tools">🔧</a></td>
@@ -232,8 +233,13 @@ Thanks goes to these wonderful people
232233
<td align="center"><a href="https://github.com/Sakthivel"><img src="https://avatars3.githubusercontent.com/u/205201?v=4" width="100px;" alt="Sakthivel Sengodan Sapient"/><br /><sub><b>Sakthivel Sengodan Sapient</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=sakthivel" title="Code">💻</a></td>
233234
<td align="center"><a href="https://github.com/vanya829"><img src="https://avatars0.githubusercontent.com/u/1397979?v=4" width="100px;" alt="vanya829"/><br /><sub><b>vanya829</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=vanya829" title="Code">💻</a></td>
234235
</tr>
236+
<tr>
237+
<td align="center"><a href="http://hetpatel33.github.io"><img src="https://avatars0.githubusercontent.com/u/13877514?v=4" width="100px;" alt="Het Patel"/><br /><sub><b>Het Patel</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=hetpatel33" title="Code">💻</a></td>
238+
</tr>
235239
</table>
236240

241+
<!-- markdownlint-enable -->
242+
<!-- prettier-ignore-end -->
237243
<!-- ALL-CONTRIBUTORS-LIST:END -->
238244

239245
## Backers

packages/app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@
152152
"normalizr": "^3.2.3",
153153
"onigasm": "^2.2.1",
154154
"ot": "^0.0.15",
155-
"overmind": "^19.3.0-1569928101550",
155+
"overmind": "^20.0.0",
156156
"overmind-devtools": "^19.0.0",
157-
"overmind-react": "^20.3.0-1569928101550",
157+
"overmind-react": "^21.0.0",
158158
"phoenix": "^1.3.0",
159159
"postcss": "^6.0.9",
160160
"postcss-selector-parser": "^2.2.3",

packages/app/src/app/components/Preview/DevTools/Tabs/Tab/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ import {
99
} from 'react-dnd';
1010
import CrossIcon from 'react-icons/lib/md/clear';
1111

12+
import { DevToolsTabPosition } from '@codesandbox/common/lib/types';
1213
import { Tab, CloseTab } from './elements';
1314
import { IViewType, Status } from '../..';
14-
import { ITabPosition } from '..';
1515
import { UnreadDevToolsCount } from './UnreadDevToolsCount';
1616

1717
export interface TabProps {
1818
active: boolean;
1919
pane: IViewType;
2020
onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
2121
onMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
22-
moveTab?: (currentPosition: ITabPosition, nextPosition: ITabPosition) => void;
23-
closeTab?: (pos: ITabPosition) => void;
22+
moveTab?: (
23+
currentPosition: DevToolsTabPosition,
24+
nextPosition: DevToolsTabPosition
25+
) => void;
26+
closeTab?: (pos: DevToolsTabPosition) => void;
2427
index: number;
2528
devToolIndex: number;
2629
canDrag: boolean;
@@ -146,11 +149,11 @@ const entryTarget = {
146149
return;
147150
}
148151

149-
const previousPosition: ITabPosition = {
152+
const previousPosition: DevToolsTabPosition = {
150153
tabPosition: sourceItem.index,
151154
devToolIndex: sourceItem.devToolIndex,
152155
};
153-
const nextPosition: ITabPosition = {
156+
const nextPosition: DevToolsTabPosition = {
154157
tabPosition: props.index,
155158
devToolIndex: props.devToolIndex,
156159
};

packages/app/src/app/components/Preview/DevTools/Tabs/TabDropZone/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
DropTargetMonitor,
77
DropTargetConnector,
88
} from 'react-dnd';
9+
import { DevToolsTabPosition } from '@codesandbox/common/lib/types';
910

10-
import { ITabPosition } from '..';
1111
import { PREVIEW_TAB_ID } from '../Tab';
1212

1313
const DropZone = styled.div<{ isOver: boolean }>`
@@ -26,7 +26,10 @@ const DropZone = styled.div<{ isOver: boolean }>`
2626
`;
2727

2828
export interface TabDropZoneProps {
29-
moveTab: (currentPosition: ITabPosition, nextPosition: ITabPosition) => void;
29+
moveTab: (
30+
currentPosition: DevToolsTabPosition,
31+
nextPosition: DevToolsTabPosition
32+
) => void;
3033
index: number;
3134
devToolIndex: number;
3235
}
@@ -61,7 +64,7 @@ const entryTarget = {
6164
return;
6265
}
6366

64-
const previousPosition: ITabPosition = {
67+
const previousPosition: DevToolsTabPosition = {
6568
tabPosition: sourceItem.index,
6669
devToolIndex: sourceItem.devToolIndex,
6770
};

packages/app/src/app/components/Preview/DevTools/Tabs/elements.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const Container = styled.div`
44
display: flex;
55
flex: auto;
66
margin-right: 1rem;
7+
overflow-x: auto;
78
`;
89

910
export const Tabs = styled.div`

packages/app/src/app/components/Preview/DevTools/Tabs/index.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
import React from 'react';
22
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
33
import { ViewTab } from '@codesandbox/common/lib/templates/template';
4+
import { DevToolsTabPosition } from '@codesandbox/common/lib/types';
45

56
import { Status, IViews } from '..';
67
import { Actions, Container, Tabs } from './elements';
78
import { DraggableTab, PaneTab, TabProps } from './Tab';
89
import { TabDropZone, TabDropZoneProps } from './TabDropZone';
910
// import { AddTab } from './AddTab';
1011

11-
export interface ITabPosition {
12-
devToolIndex: number;
13-
tabPosition: number;
14-
}
15-
1612
export interface Props {
1713
hidden: boolean;
1814
currentPaneIndex: number;
1915
owned: boolean;
2016
setPane: (i: number) => void;
2117
devToolIndex: number;
22-
moveTab?: (prevPos: ITabPosition, newPos: ITabPosition) => void;
23-
closeTab?: (pos: ITabPosition) => void;
18+
moveTab?: (prevPos: DevToolsTabPosition, newPos: DevToolsTabPosition) => void;
19+
closeTab?: (pos: DevToolsTabPosition) => void;
2420
status?: { [title: string]: Status | undefined };
2521

2622
panes: ViewTab[];

packages/app/src/app/components/Preview/DevTools/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { TemplateType } from '@codesandbox/common/lib/templates';
77
import { ViewConfig } from '@codesandbox/common/lib/templates/template';
88
import track from '@codesandbox/common/lib/utils/analytics';
99

10+
import { DevToolsTabPosition } from '@codesandbox/common/lib/types';
1011
import { console } from './Console';
11-
import { DevToolTabs, ITabPosition } from './Tabs';
12+
import { DevToolTabs } from './Tabs';
1213
import { problems } from './Problems';
1314
import { reactDevTools } from './React-Devtools';
1415
import { terminal } from './Terminal';
@@ -95,9 +96,12 @@ type Props = {
9596
primary: boolean;
9697
viewConfig: ViewConfig;
9798
devToolIndex: number;
98-
moveTab?: (prevPos: ITabPosition, nextPos: ITabPosition) => void;
99-
closeTab?: (pos: ITabPosition) => void;
100-
setPane: (pos: ITabPosition) => void;
99+
moveTab?: (
100+
prevPos: DevToolsTabPosition,
101+
nextPos: DevToolsTabPosition
102+
) => void;
103+
closeTab?: (pos: DevToolsTabPosition) => void;
104+
setPane: (pos: DevToolsTabPosition) => void;
101105
addedViews?: IViews;
102106
hideTabs?: boolean;
103107
currentDevToolIndex: number;

packages/app/src/app/overmind/effects/jwt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import store from 'store/dist/store.modern';
21
import { identify, resetUserId } from '@codesandbox/common/lib/utils/analytics';
2+
import store from 'store/dist/store.modern';
33

44
export default {
55
get() {

packages/app/src/app/overmind/effects/utils/sandbox.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function transformSandbox(sandbox: Sandbox) {
2222
// We need to add client side properties for tracking
2323
return {
2424
...sandbox,
25+
environmentVariables: null,
2526
modules: sandbox.modules.map(transformModule),
2627
directories: sandbox.directories.map(transformDirectory),
2728
};

0 commit comments

Comments
 (0)