Skip to content

Fix/continue #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 1, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove unused
  • Loading branch information
ShMcK committed Dec 1, 2019
commit 0fd10d3f6899adb8f3d4b546cdc9881c95f53f18
148 changes: 74 additions & 74 deletions web-app/src/containers/Overview/OverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,87 @@ import * as G from 'typings/graphql'
import Markdown from '../../components/Markdown'

const styles = {
page: {
position: 'relative' as 'relative',
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
width: '100%',
},
summary: {
padding: '0rem 1rem 1rem 1rem',
},
title: {
fontWeight: 'bold' as 'bold',
},
description: {
fontSize: '1rem',
},
header: {
height: '36px',
backgroundColor: '#EBEBEB',
fontSize: '16px',
lineHeight: '16px',
padding: '10px 1rem',
},
levelList: {
padding: '0rem 1rem',
},
options: {
position: 'absolute' as 'absolute',
bottom: 0,
display: 'flex' as 'flex',
flexDirection: 'row' as 'row',
alignItems: 'center' as 'center',
justifyContent: 'flex-end' as 'flex-end',
height: '50px',
padding: '1rem',
paddingRight: '2rem',
backgroundColor: 'black',
width: '100%',
},
page: {
position: 'relative' as 'relative',
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
width: '100%',
},
summary: {
padding: '0rem 1rem 1rem 1rem',
},
title: {
fontWeight: 'bold' as 'bold',
},
description: {
fontSize: '1rem',
},
header: {
height: '36px',
backgroundColor: '#EBEBEB',
fontSize: '16px',
lineHeight: '16px',
padding: '10px 1rem',
},
levelList: {
padding: '0rem 1rem',
},
options: {
position: 'absolute' as 'absolute',
bottom: 0,
display: 'flex' as 'flex',
flexDirection: 'row' as 'row',
alignItems: 'center' as 'center',
justifyContent: 'flex-end' as 'flex-end',
height: '50px',
padding: '1rem',
paddingRight: '2rem',
backgroundColor: 'black',
width: '100%',
},
}

interface Props {
title: string
description: string
levels: G.Level[]
onNext(): void
title: string
description: string
levels: G.Level[]
onNext(): void
}

const Summary = ({ title, description, levels, onNext }: Props) => (
<div style={styles.page}>
<div>
<div style={styles.header}>
<span>CodeRoad</span>
</div>
<div style={styles.summary}>
<h2 style={styles.title}>{title}</h2>
<Markdown>{description}</Markdown>
</div>
<div>
<div style={styles.header}>
<span>Levels</span>
</div>
<div style={styles.levelList}>
{levels.map((level: G.Level, index: number) => (
<div key={index}>
<h4>
{index + 1}. {level.title}
</h4>
<div>{level.description}</div>
</div>
))}
</div>
</div>
</div>
<div style={styles.page}>
<div>
<div style={styles.header}>
<span>CodeRoad</span>
</div>
<div style={styles.summary}>
<h2 style={styles.title}>{title}</h2>
<Markdown>{description}</Markdown>
</div>
<div>
<div style={styles.header}>
<span>Levels</span>
</div>
<div style={styles.levelList}>
{levels.map((level: G.Level, index: number) => (
<div key={index}>
<h4>
{index + 1}. {level.title}
</h4>
<div>{level.description}</div>
</div>
))}
</div>
</div>
</div>

<div style={styles.options}>
{/* TODO: Add back button */}
<Button type="primary" onClick={() => onNext()}>
Start
</Button>
</div>
</div>
<div style={styles.options}>
{/* TODO Add back button */}
<Button type="primary" onClick={() => onNext()}>
Start
</Button>
</div>
</div>
)

export default Summary
10 changes: 0 additions & 10 deletions web-app/src/services/state/actions/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ export default {
type: 'EDITOR_TUTORIAL_LOAD',
})
},
// TODO: syncProgress unused
syncProgress(context: CR.MachineContext): void {
// sync progress in editor local storage for persistence
channel.editorSend({
type: 'EDITOR_SYNC_PROGRESS',
payload: {
progress: context.progress,
},
})
},
initializeTutorial(context: CR.MachineContext, event: CR.MachineEvent) {
// setup test runner and git
if (!context.tutorial) {
Expand Down