Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
b3ec3f8
Prepared Cerebral and redux strangle strategy
christianalfoni Dec 6, 2017
50b5f7d
Patron refactored
christianalfoni Dec 7, 2017
38cbde6
Prepared sandbox module and workspace
christianalfoni Dec 7, 2017
d6ea725
Fixed loading sandbox, code change and forking
christianalfoni Dec 7, 2017
a4c8284
Header refactored
christianalfoni Dec 8, 2017
22ecba2
Refactored Project
bannerintheuk Dec 8, 2017
cb231e4
Prepared dependencies
christianalfoni Dec 8, 2017
c2c58ba
working project refactor
bannerintheuk Dec 8, 2017
30995d0
Fixed updateSandboxInfo
bannerintheuk Dec 8, 2017
5902a4e
Refactored Tags
bannerintheuk Dec 8, 2017
f26a9fe
File handling implemented
christianalfoni Dec 8, 2017
02cb72e
Tabs and code editor
christianalfoni Dec 9, 2017
5d8ba52
Added signals for preview window
christianalfoni Dec 10, 2017
f8a1b55
Refactored Preferences (EditorSettings/Experiments/Badges/PaymentInfo…
bannerintheuk Dec 11, 2017
1ae394d
workspace, editor and preview running with mobx
christianalfoni Dec 11, 2017
3091706
Refactored Monaco and Preview
christianalfoni Dec 12, 2017
6be7795
Refactored Deployment
bannerintheuk Dec 12, 2017
81807ab
Modals refactored
christianalfoni Dec 12, 2017
38cfb77
Moved from app to newStore
christianalfoni Dec 12, 2017
910801a
Removed shortcuts provider
christianalfoni Dec 13, 2017
0c94852
Fixed user binding and other small stuff
christianalfoni Dec 13, 2017
30cc8cd
Added provider
christianalfoni Dec 13, 2017
1028fc1
Check devtools
christianalfoni Dec 13, 2017
2fecff5
Added local storage for settings
christianalfoni Dec 13, 2017
88c807a
Codemirror running
christianalfoni Dec 14, 2017
48bd1b3
CLI and git integration
christianalfoni Dec 15, 2017
10c7334
Refactored Zeit integration component
bannerintheuk Dec 14, 2017
708f96f
refactored ZenModeIntroduction
bannerintheuk Dec 14, 2017
e1d55a4
Refactored SignOutNotice
bannerintheuk Dec 14, 2017
a036983
Refactored Navigation
bannerintheuk Dec 14, 2017
b1b7d4e
Refactored UserMenu
bannerintheuk Dec 14, 2017
a687fb7
Refactored SignInButton
bannerintheuk Dec 14, 2017
e627a6b
Initial refactor of profile
christianalfoni Dec 17, 2017
841d7eb
Fixed bugs and modals
christianalfoni Dec 18, 2017
b62e788
Fixed workspace bugs
christianalfoni Dec 18, 2017
2fb6e5f
Refactored code editors to support not using store
christianalfoni Dec 21, 2017
2a62714
Embed running again, needs iterations
christianalfoni Dec 21, 2017
80eec1d
Fixed integrations
christianalfoni Dec 21, 2017
f794464
Detached redux, woop woop
christianalfoni Dec 23, 2017
5f01da2
Fixed ContextMenu
christianalfoni Dec 23, 2017
3546643
Removed containers
christianalfoni Dec 23, 2017
faab231
Refactored to use reactions for codeeditor and preview
christianalfoni Dec 25, 2017
407b424
Tabs by shortid to preserve state across sandboxes
christianalfoni Dec 25, 2017
62c8471
Fixed updateModules to use current sandbox
christianalfoni Dec 25, 2017
2ec194d
Fixed is in project view
christianalfoni Dec 25, 2017
0538044
removed store folder, changed around some utils
christianalfoni Dec 26, 2017
e8330b7
Changed newStore to store
christianalfoni Dec 26, 2017
933e01c
Refactored to new components pattern
christianalfoni Dec 26, 2017
788dd35
Fixed #31 and cleaned up Devtools
christianalfoni Dec 27, 2017
e5b6d91
Fixed quick actions
christianalfoni Dec 27, 2017
8448d63
fixed moving and closing tabs
christianalfoni Dec 27, 2017
deb9f9d
Fixed prettify
christianalfoni Dec 27, 2017
0057dda
Fixed dependency changes in preview
christianalfoni Dec 27, 2017
68e4683
Fixed github repo creation
christianalfoni Dec 27, 2017
2cfb46f
Fixed deleting sandbox, new sandbox on other pages and and wrong sign…
christianalfoni Dec 27, 2017
73dd6a6
fixed zenmode
christianalfoni Dec 27, 2017
cd66bb3
Fixed reacting to code editor changes
christianalfoni Dec 27, 2017
7880327
Fixed wrong preferences signal definition and badges
christianalfoni Dec 27, 2017
e326f6f
Fixed change sandbox showcase, delete sandbox and pagination on liked…
christianalfoni Dec 27, 2017
0827036
Fixed router, patron errors and patron feedback
christianalfoni Dec 27, 2017
8e339c0
Refactored and tested embed
christianalfoni Dec 28, 2017
e867d17
Reimplemented prettierrc support due to merging issues
christianalfoni Dec 28, 2017
c6fa07e
Fixed casing
christianalfoni Dec 28, 2017
2015f07
Fixed git commit and pr
christianalfoni Dec 28, 2017
c37d30a
Merge pull request #65 from cerebral/gitFix
christianalfoni Dec 28, 2017
d680a90
Fixed linting and test errors
christianalfoni Dec 29, 2017
7580e57
Merge pull request #66 from cerebral/fixLintingErrors
christianalfoni Dec 29, 2017
a192709
Fixed #68
christianalfoni Dec 29, 2017
343455c
Fix #71
christianalfoni Dec 29, 2017
6021238
Fixed #70
christianalfoni Dec 29, 2017
0a70169
Merge pull request #72 from cerebral/bugRun12
christianalfoni Dec 29, 2017
08433eb
Removed unused React
christianalfoni Dec 29, 2017
a0526ef
fixed prompt when saving new sandbox
christianalfoni Dec 29, 2017
ca99ae5
Fixed toggle devtools
christianalfoni Dec 29, 2017
61fd3cc
fixed wrong signal payload to toggle workspace
christianalfoni Dec 29, 2017
995b3c7
Refactored and fixed keybinding manager
christianalfoni Dec 29, 2017
581e0b3
Merge pull request #73 from cerebral/bugRun13
christianalfoni Dec 29, 2017
d5c1e7f
Refactored keybindings and fixed preferences
christianalfoni Dec 30, 2017
8221f6a
Fixed key binding errors
christianalfoni Dec 30, 2017
f4540c1
Optimistic file handling
christianalfoni Dec 30, 2017
91579d8
Refactored structure
christianalfoni Dec 31, 2017
0725599
Optimistic dependencies, resources, renaming modules and directories
christianalfoni Dec 31, 2017
91f4740
Merge pull request #75 from cerebral/optimisticUx
christianalfoni Dec 31, 2017
24a0796
Handle fork and sandbox change
christianalfoni Dec 31, 2017
afbc74e
Start load sandbox sequence before mount and update
christianalfoni Jan 1, 2018
e0c34ba
Fix codemirror setting for editor
christianalfoni Jan 2, 2018
32fb4b8
Fixed handling no user
christianalfoni Jan 6, 2018
a847372
fixed #74
christianalfoni Jan 6, 2018
2b8b13c
Fixed #79
christianalfoni Jan 6, 2018
ca0211a
Changed preferences to use id instead of index
christianalfoni Jan 6, 2018
d5c5ca7
Fixed #82
christianalfoni Jan 6, 2018
ec3b252
Merge pull request #88 from cerebral/bugRun10
christianalfoni Jan 6, 2018
f522cf1
Fixed #83
Jan 7, 2018
83755ab
Fixed #84
Jan 7, 2018
f6bc24e
Fixed #85 and other url options
Jan 7, 2018
479a63a
Merge pull request #89 from cerebral/bugRun11
christianalfoni Jan 7, 2018
c7924ea
Merge branch 'master' into sandbox
Jan 7, 2018
a277c16
Fix lint errors
Jan 7, 2018
016ee16
Merge branch 'master' of github.com:CompuIves/codesandbox-client into…
Jan 7, 2018
092245b
Mark tab as not dirty when changing code
Jan 7, 2018
2af77a7
Make deployment modal less wide
Jan 7, 2018
dbdf1e2
Fix Alert modal styling
Jan 7, 2018
511535f
Fix badge visibility
Jan 7, 2018
f528971
Fix ZEIT sign out
Jan 7, 2018
7ed93be
Redesign
Jan 8, 2018
301bb51
More preview hooks
Jan 9, 2018
1e8eb67
Sidebar work
Jan 9, 2018
4905f68
Add more workspace items
Jan 10, 2018
62a91f8
Deployment
Jan 11, 2018
84b60b6
Merge branch 'master' into sandbox
Jan 11, 2018
65b16bf
Merge branch 'sandbox' into redesign
Jan 11, 2018
ed60f62
Fix integrations
Jan 11, 2018
67fd9f9
Git fixes
Jan 11, 2018
25f5bd2
Change git fetching
Jan 12, 2018
9d69e36
Fix signing in and github commiting
Jan 12, 2018
3e727bb
Add tags, improve API
Jan 12, 2018
fc9fd61
Update Zen Mode
Jan 12, 2018
4d5679a
Fix typo
Jan 12, 2018
c6a2e7b
Fix toggle
Jan 13, 2018
ff6ca9b
Fix dragging with scrolling preview
Jan 13, 2018
8f5857e
Remove the fix from devtools
Jan 13, 2018
8e4f044
Non-owned sandboxes design
Jan 13, 2018
99c9a66
Fix title overflow
Jan 13, 2018
327a134
Fix #87
christianalfoni Jan 7, 2018
8fec622
Refactored modals
christianalfoni Jan 13, 2018
a97b14a
Merge pull request #96 from cerebral/bugRun12
christianalfoni Jan 13, 2018
0752f86
Fix resizer height
Jan 14, 2018
6f09653
Add social icons and fix minor styling
Jan 14, 2018
13f4281
Merge remote-tracking branch 'cerebral/sandbox' into redesign
Jan 14, 2018
15f11b8
Cleanup of modals
Jan 14, 2018
e67b341
Fix image viewer
Jan 14, 2018
54bd288
Fixed patron loading and modals
christianalfoni Jan 14, 2018
b803e47
Merge pull request #97 from cerebral/patronFix
christianalfoni Jan 14, 2018
c0cf7c6
Progress
Jan 16, 2018
592f383
Progress
Jan 17, 2018
fe3c6fb
Merge branch 'master' of github.com:CompuIves/codesandbox-client into…
Jan 17, 2018
e86cafd
Fixed issue related to code execution when changing modules
christianalfoni Jan 17, 2018
298f4da
Parallel loading of user
christianalfoni Jan 17, 2018
d650d2d
Merge pull request #99 from cerebral/bugRun14
christianalfoni Jan 17, 2018
c8dd36e
UI Config
Jan 17, 2018
e4856ae
Push!
Jan 18, 2018
f0781cc
Fix sizes
Jan 18, 2018
3f1cea9
Fixed embed bugs
christianalfoni Jan 18, 2018
cd7b30b
Merge pull request #100 from cerebral/bugRun15
christianalfoni Jan 18, 2018
21447ed
Custom babel config
Jan 18, 2018
2d0d288
BabelRC
Jan 19, 2018
575c22d
Babel plugins
Jan 21, 2018
f35b7ea
Fixes
Jan 24, 2018
d085c20
Fix types
Jan 24, 2018
b5768f0
Fix ATA in Editor
Jan 25, 2018
2bb8ffd
Sandbox config support and forking fixes
Jan 26, 2018
e2cb7a8
Configuration progress
Jan 28, 2018
c58c63f
add package.json
Jan 28, 2018
3d9bdc9
Configurations
Jan 29, 2018
b48296e
Add yarn install to codesandbox-fs
Jan 29, 2018
2624739
Fix installing
Jan 29, 2018
606287d
Update package name
Jan 29, 2018
5783885
Prevent infinite loop
Jan 29, 2018
e092738
Add cache for codesandbox-fs
Jan 29, 2018
240aefa
Remove hook
Jan 29, 2018
79645ae
Deploy commit
Jan 29, 2018
8589bc1
Fix SSR problem with keybindings
Jan 29, 2018
6bb2921
Fix undefined template for homepage
Jan 29, 2018
4461870
Angular
Jan 29, 2018
7168524
Fixes
Jan 29, 2018
36dfca2
Fix homepage
Jan 29, 2018
aed4e4f
Fix build script
Jan 29, 2018
231070a
Add tslint
Jan 29, 2018
acba5dd
Add fixtures
Jan 29, 2018
3c638d0
Add more fixtures
Jan 29, 2018
ce1b78a
Merge branch 'master' into redesign
Jan 30, 2018
8ad7338
Mark dependency type fetching as done regardless of the outcome
Jan 30, 2018
ae2bac8
Merge branch 'master' into redesign
Jan 30, 2018
70c02d7
Test UI
Jan 31, 2018
129615e
Fix describe block handling
Jan 31, 2018
dea0aae
Fix idle status
Jan 31, 2018
ec57cfc
Another fix
Jan 31, 2018
809548b
Better work with files
Jan 31, 2018
5084529
Test progress
Jan 31, 2018
377b20a
Test progress
Feb 2, 2018
3f53df4
Almost finish tests
Feb 2, 2018
8b89d6b
Remove extra tests in sidebar
Feb 3, 2018
83e6262
Process test feedback
Feb 3, 2018
4a37480
Typings
Feb 3, 2018
427e0a9
Merge branch 'master' into redesign
Feb 3, 2018
43022ac
Fix Stripe subscription loading
Feb 3, 2018
3317e97
Logo
Feb 3, 2018
d4797dc
Fix jest errors
Feb 3, 2018
c6bd26e
Fix a bunch of fork scenarios
Feb 3, 2018
0b9a8da
Add Download back
Feb 3, 2018
76cd4c8
Fix deleting sandboxes from profile
christianalfoni Feb 3, 2018
87cc105
Fixes
Feb 3, 2018
3b96ca3
More improvements
Feb 3, 2018
ba02d05
Test feedback by @gautamarora
Feb 4, 2018
014e923
Size changes
Feb 4, 2018
a8413ab
Process more feedback
Feb 4, 2018
7c37633
Partly fix lint/tests
Feb 4, 2018
264aa44
Force transpilation of test files to happen in the test runner
Feb 4, 2018
c3edb33
Snapshot testing
Feb 4, 2018
5932ed3
Fix describe blocks with snapshot testing
Feb 4, 2018
cb41fe7
Fixes
Feb 4, 2018
b2ce083
Fix peerDependency problems
Feb 5, 2018
32707dd
Fix dep conflict resolving
Feb 5, 2018
2621af9
Add version safety
Feb 5, 2018
9e46e61
More safety
Feb 5, 2018
b3c6eac
Schemas
Feb 5, 2018
1c142da
Make integration tests sequential
Feb 5, 2018
037199a
Temporarily disable jest-lite tests
Feb 5, 2018
a3283c9
Fixes
Feb 5, 2018
9c29744
Fix snapshot testing
Feb 6, 2018
35f237c
Fix action spam
Feb 6, 2018
52f4276
Fix transpilation of modules with missing dependencies
Feb 6, 2018
bc74700
Fix tabSize
Feb 6, 2018
cbd742b
Fix dir renaming
Feb 6, 2018
ca3d763
Change checkout key for windows
CompuIves Feb 7, 2018
3db9f53
Fix keybindings for windows
CompuIves Feb 7, 2018
f230158
Update 'new' sandbox
Feb 7, 2018
9374a23
Fix tab scrolling
Feb 7, 2018
c09d933
Fix main module resolving
Feb 7, 2018
4061906
Fix showcase
Feb 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactored Project
  • Loading branch information
bannerintheuk authored and christianalfoni committed Dec 28, 2017
commit 22ecba25bd411d97950d09c3c15b066bf01d98d0
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ import * as sequences from './sequences';
export default Module({
model,
state: {
project: {
title: '',
description: '',
},
isWorkspaceHidden: false,
isProcessingNpmDependencies: false,
},
signals: {
valueChanged: sequences.changeValue,
updateSandboxInfo: sequences.updateSandboxInfo,
workspaceToggled: sequences.toggleWorkspace,
npmDependencyAdded: sequences.addNpmDependency,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { types } from 'mobx-state-tree';

export default {
project: types.model({
title: types.string,
description: types.string,
}),
isWorkspaceHidden: types.boolean,
isProcessingNpmDependencies: types.boolean,
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import { set, toggle } from 'cerebral/operators';
import { state } from 'cerebral/tags';
import { state, props } from 'cerebral/tags';
import * as actions from './actions'

export const changeValue = [
set(state`editor.workspace.project.${props`field`}`, props`value`),
];

export const updateSandboxInfo = [
set(state`editor.workspace.project.title`, props`title`),
set(state`editor.workspace.project.description`, props`description`),
]

export const toggleWorkspace = toggle(
state`editor.workspace.isWorkspaceHidden`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import styled from 'styled-components';
import { Link } from 'react-router-dom';

export const Item = styled.div`
margin: 1rem;
margin-top: 0;
font-size: 0.875rem;
`;

export const GitContainer = styled.div`
display: inline-block;
margin: 0 1rem;
margin-bottom: 0.25rem;
`;

export const UserLink = styled(Link)`
display: block;
text-decoration: none;
color: rgba(255, 255, 255, 0.8);
font-size: 0.875rem;
`;

export const StatsContainer = styled.div`
height: 2rem;
font-size: 0.875rem;
box-sizing: border-box;
color: rgba(255, 255, 255, 0.8);
`;

export const PrivacyContainer = styled.div`
margin: 0 1rem;
font-size: 0.875rem;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 1rem;
`;
169 changes: 53 additions & 116 deletions packages/app/src/app/pages/Sandbox/Editor/Workspace/Project/index.js
Original file line number Diff line number Diff line change
@@ -1,120 +1,37 @@
// @flow
import * as React from 'react';
import styled from 'styled-components';
import { Link } from 'react-router-dom';
import ConfirmLink from 'app/components/ConfirmLink';
import GithubBadge from 'app/components/sandbox/GithubBadge';
import { inject, observer } from 'mobx-react';

import {
sandboxUrl,
githubRepoUrl,
profileUrl,
} from 'common/utils/url-generator';

import UserWithAvatar from 'app/components/user/UserWithAvatar';
import Stats from 'app/components/sandbox/Stats';
import PrivacyStatus from 'app/components/sandbox/PrivacyStatus';
import getTemplateDefinition from 'common/templates';
import ConfirmLink from 'app/components/ConfirmLink';
import GithubBadge from 'app/components/sandbox/GithubBadge';

import getTemplateDefinition from 'common/templates';
import type { User, GitInfo } from 'common/types';
import WorkspaceInputContainer from '../WorkspaceInputContainer';
import WorkspaceSubtitle from '../WorkspaceSubtitle';

const Item = styled.div`
margin: 1rem;
margin-top: 0;
font-size: 0.875rem;
`;

const GitContainer = styled.div`
display: inline-block;
margin: 0 1rem;
margin-bottom: 0.25rem;
`;

const UserLink = styled(Link)`
display: block;
text-decoration: none;
color: rgba(255, 255, 255, 0.8);
font-size: 0.875rem;
`;

const StatsContainer = styled.div`
height: 2rem;
font-size: 0.875rem;
box-sizing: border-box;
color: rgba(255, 255, 255, 0.8);
`;

const PrivacyContainer = styled.div`
margin: 0 1rem;
font-size: 0.875rem;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 1rem;
`;

type Props = {
id: string,
title: ?string,
description: string,
viewCount: number,
likeCount: number,
forkCount: number,
forkedSandbox: ?{ title: string, id: string },
updateSandboxInfo: (id: string, title: string, description: string) => any,
preventTransition: boolean,
author: ?User,
git: ?GitInfo,
privacy: number,
template: string,
};

export default class Project extends React.PureComponent<
Props,
{
title: ?string,
description: ?string,
}
> {
constructor(props: Props) {
super(props);

this.state = {
title: props.title,
description: props.description,
};
}

setValue = (field: string) => (e: Event) => {
// $FlowIssue
this.setState({ [field]: e.target.value });
};

updateSandboxInfo = () => {
const { id, title: oldTitle, description: oldDescription } = this.props;
const { title, description } = this.state;

if (title !== oldTitle || description !== oldDescription) {
this.props.updateSandboxInfo(id, title || '', description || '');
}
};

handleKeyUp = (e: KeyboardEvent) => {
if (e.keyCode === 13) {
// Enter or escape
this.updateSandboxInfo();
}
};

componentWillReceiveProps = (nextProps: Props) => {
if (nextProps.title !== this.props.title) {
this.setState({ title: nextProps.title });
}
if (nextProps.description !== this.props.description) {
this.setState({ description: nextProps.description });
}
};

render() {
const {
import {
Item,
GitContainer,
UserLink,
StatsContainer,
PrivacyContainer,
} from './elements';

export default inject('store', 'signals')(
observer(
({
store,
signals,
id,
forkedSandbox,
viewCount,
Expand All @@ -125,28 +42,48 @@ export default class Project extends React.PureComponent<
template,
preventTransition,
privacy,
} = this.props;
const { title, description } = this.state;
return (
}) => (
<div>
<WorkspaceInputContainer>
<input
value={title || ''}
onChange={this.setValue('title')}
value={store.editor.workspace.project.title}
onChange={event => {
signals.editor.workspace.valueChanged({
field: 'title',
value: event.target.value,
});
}}
type="text"
onBlur={this.updateSandboxInfo}
onKeyUp={this.handleKeyUp}
onBlur={() => {
signals.editor.workspace.updateSandboxInfo();
}}
onKeyUp={event => {
if (event.keyCode === 13) {
signals.editor.workspace.updateSandboxInfo();
}
}}
placeholder="Title"
/>
</WorkspaceInputContainer>

<WorkspaceInputContainer>
<textarea
value={description || ''}
onChange={this.setValue('description')}
value={store.editor.workspace.project.description}
onChange={event => {
signals.editor.workspace.valueChanged({
field: 'description',
value: event.target.value,
});
}}
type="text"
onBlur={this.updateSandboxInfo}
onKeyUp={this.handleKeyUp}
onBlur={() => {
signals.editor.workspace.updateSandboxInfo();
}}
onKeyUp={event => {
if (event.keyCode === 13) {
signals.editor.workspace.updateSandboxInfo();
}
}}
rows="2"
placeholder="Description"
/>
Expand Down Expand Up @@ -227,6 +164,6 @@ export default class Project extends React.PureComponent<
/>
</StatsContainer>
</div>
);
}
}
)
)
);