Skip to content

Commit df07ca0

Browse files
committed
project.readme -> project.instructions
1 parent 6633716 commit df07ca0

6 files changed

Lines changed: 14 additions & 13 deletions

File tree

src/clients/github.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ function buildGistFromProject(project) {
108108
language: 'JavaScript',
109109
};
110110
}
111-
if (trim(project.readme)) {
111+
if (trim(project.instructions)) {
112112
files['README.md'] = {
113-
content: project.readme,
113+
content: project.instructions,
114114
language: 'Markdown',
115115
};
116116
}

src/components/Dashboard.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Dashboard extends React.Component {
7777
}
7878

7979
render() {
80-
const {readme, isOpen} = this.props;
80+
const {instructions, isOpen} = this.props;
8181
if (!isOpen) {
8282
return null;
8383
}
@@ -92,8 +92,8 @@ class Dashboard extends React.Component {
9292
return (
9393
<div className={sidebarClassnames}>
9494
{this._renderMenu()}
95-
<div className="dashboard__readme">
96-
{remark().use(remarkReact).processSync(readme).contents}
95+
<div className="dashboard__instructions">
96+
{remark().use(remarkReact).processSync(instructions).contents}
9797
</div>
9898
<div className="dashboard__spacer" />
9999
{this._renderLinks()}
@@ -105,9 +105,9 @@ class Dashboard extends React.Component {
105105
Dashboard.propTypes = {
106106
currentUser: PropTypes.object.isRequired,
107107
gistExportInProgress: PropTypes.bool.isRequired,
108+
instructions: PropTypes.string.isRequired,
108109
isExperimental: PropTypes.bool.isRequired,
109110
isOpen: PropTypes.bool.isRequired,
110-
readme: PropTypes.string.isRequired,
111111
onExportGist: PropTypes.func.isRequired,
112112
onExportRepo: PropTypes.func.isRequired,
113113
};

src/containers/Dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ function mapStateToProps(state) {
1717
return {
1818
currentUser: getCurrentUser(state),
1919
gistExportInProgress: isGistExportInProgress(state),
20+
instructions: project ? project.instructions : '',
2021
isExperimental: isExperimental(state),
2122
isOpen: isDashboardOpen(state),
22-
readme: project ? project.readme : '',
2323
};
2424
}
2525

src/css/application.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ body {
370370
font-weight: bold;
371371
}
372372

373-
.dashboard__readme {
373+
.dashboard__instructions {
374374
overflow: scroll;
375375
}
376376

src/records/Project.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ export default class Project extends Record({
1414
enabledLibraries: new Set(),
1515
hiddenUIComponents: new Set(),
1616
updatedAt: null,
17-
readme: '',
17+
instructions: '',
1818
}) {
1919
static fromJS({
2020
projectKey = null,
2121
sources = {},
2222
enabledLibraries = [],
2323
hiddenUIComponents = [],
2424
updatedAt = null,
25-
readme = '',
25+
instructions = '',
2626
}) {
2727
return new Project({
2828
projectKey,
2929
sources: new Sources(sources),
3030
enabledLibraries: new Set(enabledLibraries),
3131
hiddenUIComponents: new Set(hiddenUIComponents),
3232
updatedAt,
33-
readme,
33+
instructions,
3434
});
3535
}
3636
}

src/reducers/projects.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function unhideComponent(state, projectKey, component, timestamp) {
3232
function contentForLanguage(files, language) {
3333
const filesForLanguage = sortBy(
3434
filter(files, {language}),
35-
file => file.filename);
35+
file => file.filename,
36+
);
3637
return map(filesForLanguage, 'content').join('\n\n');
3738
}
3839

@@ -52,7 +53,7 @@ function importGist(state, projectKey, gistData) {
5253
},
5354
enabledLibraries: popcodeJson.enabledLibraries || [],
5455
hiddenUIComponents: popcodeJson.hiddenUIComponents || [],
55-
readme: contentForLanguage(files, 'Markdown'),
56+
instructions: contentForLanguage(files, 'Markdown'),
5657
},
5758
);
5859
}

0 commit comments

Comments
 (0)