-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'layout-slider' into ide-ui
Main conflict : usage of `pre` instead of `code`
- Loading branch information
Showing
18 changed files
with
125 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,47 @@ | ||
import * as React from 'react' | ||
|
||
import Resizable from 're-resizable' | ||
|
||
import EditorContainer from '../../containers/IDE/EditorContainer' | ||
import ReplContainer from '../../containers/IDE/ReplContainer' | ||
|
||
const IDE: React.SFC<{}> = () => ( | ||
<div className="IDE"> | ||
<div className="row ide-content-parent"> | ||
<div className="col-xs-6 editor-parent"> | ||
<EditorContainer /> | ||
</div> | ||
<div className="col-xs-6 repl-parent"> | ||
<ReplContainer /> | ||
export interface IIDEProps { | ||
editorWidth: string | ||
handleEditorWidthChange: (widthChange: number) => void // TODO | ||
} | ||
|
||
class IDE extends React.Component<IIDEProps, {}> { | ||
public render() { | ||
return ( | ||
<div className="IDE"> | ||
<div className="row ide-content-parent"> | ||
<Resizable | ||
className="editor-parent" | ||
size={{ width: this.props.editorWidth, height: '100%' }} | ||
// tslint:disable-next-line jsx-no-lambda | ||
onResizeStop={(e, direction, ref, d) => { | ||
this.props.handleEditorWidthChange(d.width * 100 / window.innerWidth) | ||
}} | ||
enable={{ | ||
top: false, | ||
right: true, | ||
bottom: false, | ||
left: false, | ||
topRight: false, | ||
bottomRight: false, | ||
bottomLeft: false, | ||
topLeft: false | ||
}} | ||
> | ||
<EditorContainer /> | ||
</Resizable> | ||
<div className="repl-parent"> | ||
<ReplContainer /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
) | ||
} | ||
} | ||
|
||
export default IDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux' | ||
import { bindActionCreators, Dispatch } from 'redux' | ||
|
||
import { updateEditorWidth } from '../../actions/playground' | ||
import IDE, { IIDEProps } from '../../components/IDE/' | ||
import { IState } from '../../reducers/states' | ||
|
||
type StateProps = Pick<IIDEProps, 'editorWidth'> | ||
type DispatchProps = Pick<IIDEProps, 'handleEditorWidthChange'> | ||
|
||
/** Provides the editorValue of the `IPlaygroundState` of the `IState` as a | ||
* `StateProps` to the Playground component | ||
*/ | ||
const mapStateToProps: MapStateToProps<StateProps, {}, IState> = state => { | ||
return { | ||
editorWidth: state.playground.editorWidth | ||
} | ||
} | ||
|
||
const mapDispatchToProps: MapDispatchToProps<DispatchProps, {}> = (dispatch: Dispatch<any>) => | ||
bindActionCreators( | ||
{ | ||
handleEditorWidthChange: updateEditorWidth | ||
}, | ||
dispatch | ||
) | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(IDE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
374c2b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addresses #25