Skip to content
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

DTL (Test > Levelbuilder): 4aa23197 #20190

Merged
merged 107 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ab0670c
Fix violations of Lint/UnneededRequireStatement.
asherkach Jan 14, 2018
73fdbf1
Reenable rubocop Lint/UnneededRequireStatement.
asherkach Jan 14, 2018
2b000fe
Add actual achievements
Dec 12, 2017
9e5b6c3
Add unused block strings
Dec 12, 2017
2eb4fbd
Don't recompute achievements on every render
Dec 12, 2017
b036e95
Fix test
Dec 13, 2017
0df1a41
Add unit test
Dec 13, 2017
6022930
Fix continue button
Dec 13, 2017
c7ccd1b
Fix block count
Dec 13, 2017
14fb42e
Merge pull request #20046 from code-dot-org/teacher-application-hotfix
mehalshah Jan 16, 2018
f73367c
Merge pull request #20042 from code-dot-org/production_hotfix_broken_…
mehalshah Jan 16, 2018
009e372
Merge pull request #20059 from code-dot-org/dtp_candidate_1c6a6cef
mehalshah Jan 16, 2018
bf89d1e
add DMS replication instance and source/target endpoints
wjordan Jan 17, 2018
ef53079
Fix violations of Lint/UriRegexp.
asherkach Jan 17, 2018
187638a
Reenable rubocop Lint/UriRegexp.
asherkach Jan 17, 2018
f7943bf
Fix violations of Naming/VariableName.
asherkach Jan 17, 2018
bf4a70f
Reenable rubocop Naming/VariableName.
asherkach Jan 17, 2018
e069d49
generate DMS cron tasks from source YAML configuration
wjordan Jan 17, 2018
d6fcb30
Hide droid number input on logic blocks
joshlory Jan 17, 2018
af53542
add existing DMS replication tasks to data stack
wjordan Jan 17, 2018
0c4614d
move Cdo::DMS to lib/cdo/aws
wjordan Jan 17, 2018
1b93204
Merge pull request #20079 from code-dot-org/dtp_candidate_b73a3287
Jan 17, 2018
85319ad
display scoring for 'able to attend single ws' question
Jan 15, 2018
e29dce2
add autoscoring for 'able to attend multiple ws' q
Jan 16, 2018
4a38f7a
add autoscoring for able_to_attend_multiple
Jan 18, 2018
5e0adf8
Animated block count odometer
Jan 11, 2018
ccb1bdc
Animate bubble color
Jan 11, 2018
e4ef06a
Reset dialog state on close
Jan 13, 2018
c2f38bf
Animate block count descriptor
Jan 18, 2018
d6b0b8b
Animate achievements
Jan 18, 2018
dd55147
Merge pull request #20110 from code-dot-org/dtp_candidate_6c6c388d
joshlory Jan 18, 2018
f4a01a8
add hall of fame page for AP CSP Awards
tanyaparker Jan 19, 2018
52ec645
Fix tests
Jan 18, 2018
4fc9322
Render status select at the bottom of the detail view
Hamms Jan 19, 2018
2e89c7e
Remove actor number from droid blocks
joshlory Jan 19, 2018
7c427ca
update DMS task settings
wjordan Jan 19, 2018
45c3b64
Merge branch 'staging' into remove-droid-actor-numbers
joshlory Jan 19, 2018
0ad2d5e
Cleanup
joshlory Jan 19, 2018
70fb17c
Merge pull request #20063 from asherkach/rubocop-uri-regexp
mehalshah Jan 19, 2018
618727e
Merge pull request #20064 from asherkach/rubocop-variable-name
mehalshah Jan 19, 2018
265de3e
Seed schools from S3
Jan 18, 2018
6579e1e
Add eslint-plugin-babel dependency
islemaster Jan 19, 2018
83df657
Enable and autofix babel/semi
islemaster Jan 19, 2018
65e696e
Fix modal dialog css for pegasus
caleybrock Jan 19, 2018
540e015
Merge branch 'staging' of github.com:code-dot-org/code-dot-org into a…
Jan 19, 2018
5d5ca54
Throw out some leftovers
Jan 19, 2018
d37ef9c
code review: remove email
tanyaparker Jan 19, 2018
c5f8dc5
dotd script will only run if you have devinternal_db_writer
Erin007 Jan 19, 2018
38b8d26
Restrict Principal Approval percentages to integers
Hamms Jan 19, 2018
f2c321e
Fix tests
Jan 19, 2018
0006434
switch orientation of edit and status in footer to match (rather than…
Hamms Jan 19, 2018
7e8298b
declare styles in styles object
Hamms Jan 19, 2018
4c1d090
Notify @here for robo-DotD levelbuilder to staging merge failures [ci
Jan 19, 2018
229cbfd
remove unnecessary fluff from tests
Jan 19, 2018
dd0b1be
temporarily disable minecraft Code Connection import test
Hamms Jan 19, 2018
6f063d6
Merge pull request #19638 from code-dot-org/achievements
balderdash Jan 19, 2018
73a1780
Merge pull request #20148 from code-dot-org/notify-here-for-lb-stagin…
aoby Jan 19, 2018
ffdd72c
add comment [skip-ui]
caleybrock Jan 19, 2018
2d1423a
Merge branch 'staging' of github.com:code-dot-org/code-dot-org into a…
Jan 19, 2018
84a19eb
Merge pull request #20127 from code-dot-org/show-status-select-at-bottom
Hamms Jan 19, 2018
878e685
no duplicate story names for NewProjectButtons
Erin007 Jan 19, 2018
59b8d4d
Merge pull request #20150 from code-dot-org/disable-cc-test
Hamms Jan 19, 2018
dec1791
Merge branch 'staging' into remove-droid-actor-numbers
joshlory Jan 19, 2018
fd3f5d3
Merge pull request #20143 from code-dot-org/metrics-reminder-dotd
Erin007 Jan 19, 2018
9b444ae
Merge pull request #20155 from code-dot-org/staging
deploy-code-org Jan 19, 2018
3898d64
Merge pull request #20154 from code-dot-org/dtp_candidate_13be2606
aoby Jan 19, 2018
2307b50
Add filter as an option on the client side call
mehalshah Jan 19, 2018
6fc5d5c
Merge pull request #20140 from code-dot-org/lint-class-property-semi
islemaster Jan 19, 2018
85558bb
Merge pull request #20108 from code-dot-org/animate-bubble
balderdash Jan 19, 2018
9308af0
Test StageLockDialog (81% covered)
islemaster Jan 19, 2018
bb886b3
ES6 StageLockDialog
islemaster Jan 19, 2018
8d49117
Unit test the Radium-wrapped StageLockDialog
islemaster Jan 19, 2018
b635124
Merge pull request #20152 from code-dot-org/storybook-fix-project-button
Erin007 Jan 19, 2018
ec0f7b7
Install apps dependencies before linting JS on staging
islemaster Jan 19, 2018
f7237a5
Add tabIndex to designModeViz element so its keyboard handler will be…
larrypo Jan 19, 2018
2a8d795
Merge pull request #20141 from code-dot-org/manage-students-delete
caleybrock Jan 19, 2018
c21ff59
Fix lint error
Jan 19, 2018
fafb6bb
Merge pull request #20162 from code-dot-org/fix-lint-error
aoby Jan 19, 2018
f6e1e75
Revert "script progress API cleanup"
aoby Jan 20, 2018
70afecb
Merge pull request #20163 from code-dot-org/revert-20018-mergeScriptP…
aoby Jan 20, 2018
70bbfdd
Merge pull request #20163 from code-dot-org/revert-20018-mergeScriptP…
aoby Jan 20, 2018
cf86dfa
Remove npm_use_sudo
islemaster Jan 20, 2018
082c6a2
Merge pull request #20125 from code-dot-org/csp-awards-hall-of-fame
tanyaparker Jan 20, 2018
fe2350a
Merge pull request #20165 from code-dot-org/hotfix-revert-api-cleanup
aoby Jan 20, 2018
7bb437b
Merge pull request #20166 from code-dot-org/production
aoby Jan 20, 2018
9f18448
Merge pull request #20161 from code-dot-org/yarn-before-lint
islemaster Jan 20, 2018
ee82896
Merge pull request #20156 from code-dot-org/move_list_view_query_to_s…
mehalshah Jan 20, 2018
5a85468
Merge pull request #20053 from code-dot-org/teacher-app-workshop-auto…
Jan 20, 2018
9c000c6
Merge pull request #20174 from code-dot-org/staging
deploy-code-org Jan 22, 2018
1e2546e
Merge pull request #20133 from code-dot-org/circle_ci_run_for_ashers_…
mehalshah Jan 22, 2018
7d40f9a
Merge pull request #20164 from larrypo/fix_design_mode_copy_and_paste
islemaster Jan 22, 2018
9cd82b0
Merge pull request #20159 from code-dot-org/es6-stagelockdialog
islemaster Jan 22, 2018
ecf9aea
Merge pull request #20167 from code-dot-org/remove-npm-use-sudo
islemaster Jan 22, 2018
66ef02c
Merge pull request #20131 from code-dot-org/remove-droid-actor-numbers
joshlory Jan 22, 2018
77ff9a2
Merge pull request #20132 from code-dot-org/data-cloudformation
wjordan Jan 22, 2018
0b7b1f0
Make school S3 seeding a script for now.
Jan 22, 2018
6fa5648
Merge branch 'staging' into schools-seed-from-s3
Jan 22, 2018
6f4abc9
remove/fix unneeded rubocop disable comment
wjordan Jan 22, 2018
cf26791
Merge pull request #20003 from asherkach/rubocop-unneeded-require-sta…
wjordan Jan 22, 2018
d2573c7
Merge pull request #20145 from code-dot-org/restrict-percentages-to-i…
Hamms Jan 22, 2018
be62f1d
Merge pull request #20179 from code-dot-org/staging
deploy-code-org Jan 22, 2018
5fe935d
update copy of facilitator decline email to be more general
tanyaparker Jan 22, 2018
f9c488f
staging content changes (-robo-commit)
deploy-code-org Jan 22, 2018
47f998a
Merge pull request #20184 from code-dot-org/levelbuilder
deploy-code-org Jan 22, 2018
4171f6b
Merge pull request #20135 from code-dot-org/schools-seed-from-s3
drewsamnick Jan 22, 2018
ff53656
Merge pull request #20183 from code-dot-org/facilitator-decline-email
tanyaparker Jan 22, 2018
4aa2319
Merge pull request #20187 from code-dot-org/staging
deploy-code-org Jan 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
command: |
echo "
bundler_use_sudo: false
npm_use_sudo: false
properties_encryption_key: $PROPERTIES_ENCRYPTION_KEY
applitools_eyes_api_key: $APPLITOOLS_KEY
saucelabs_username: $SAUCE_USERNAME
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
"plugins": [
"react",
"mocha",
"babel",
],
"extends": [
"eslint:recommended",
Expand All @@ -18,6 +19,7 @@ module.exports = {
},
"rules": {
"array-bracket-spacing": ["error", "never"],
"babel/semi": "error", // autofixable
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-dangle": "off",
"curly": "error",
Expand Down Expand Up @@ -48,7 +50,7 @@ module.exports = {
"react/no-render-return-value": "off", // TODO: turn this on
"react/self-closing-comp": "error",
"react/wrap-multilines": "error", // autofixable
"semi": "error",
"semi": "off", // enforced by babel/semi
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never"
Expand Down
16 changes: 0 additions & 16 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ Lint/ShadowedArgument:
Lint/UnneededDisable:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Lint/UnneededRequireStatement:
Enabled: false

# Offense count: 70
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Expand All @@ -124,11 +119,6 @@ Lint/UnusedMethodArgument:
Lint/UriEscapeUnescape:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Lint/UriRegexp:
Enabled: false

# Offense count: 7
# Configuration parameters: EnforcedStyle.
# SupportedStyles: lowercase, uppercase
Expand All @@ -141,12 +131,6 @@ Naming/HeredocDelimiterCase:
Naming/HeredocDelimiterNaming:
Enabled: false

# Offense count: 2
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, camelCase
Naming/VariableName:
Enabled: false

# Offense count: 173
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, normalcase, non_integer
Expand Down
4 changes: 4 additions & 0 deletions apps/i18n/common/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@
"errorRequiredParamsMissing": "Create a parameter for your function by clicking \"edit\" and adding the necessary parameters. Drag the new parameter blocks into your function definition.",
"errorUnusedFunction": "You created a function, but never used it on your workspace! Click on \"Functions\" in the toolbox and make sure you use it in your program.",
"errorUnusedParam": "You added a parameter block, but didn't use it in the definition. Make sure to use your parameter by clicking \"edit\" and placing the parameter block inside the green block.",
"exactNumberOfBlocks": "Only {numBlocks, plural, one {1 block} other {# blocks}} used!",
"exampleErrorMessage": "The function {functionName} has one or more examples that need adjusting. Make sure they match your definition and answer the question.",
"examplesFailedOnClose": "One or more of your examples do not match your definition. Check your examples before closing",
"explainLessonExtras": "When Lesson Extras is on, students will end each lesson with some bonus challenges and creative projects rather than being automatically advanced to the next lesson. This feature gives students the opportunity to expand their knowledge and further practice, without getting ahead of their classmates.",
Expand All @@ -450,6 +451,7 @@
"extraTopBlocks": "You have unattached blocks.",
"extraTopBlocksWhenRun": "You have unattached blocks. Did you mean to attach these to the \"when run\" block?",
"featured": "Featured",
"fewerNumberOfBlocks": "Fewer than {numBlocks, plural, one {1 block} other {# blocks}} used!",
"filterByStudent": "Filter by student:",
"finalStage": "Congratulations! You have completed the final puzzle.",
"finalStageTrophies": "Congratulations! You have completed the final puzzle and won {numTrophies, plural, one {a trophy} other {# trophies}}.",
Expand Down Expand Up @@ -762,6 +764,7 @@
"published": "Published",
"publicGallery": "Public Gallery",
"publicProjects": "Public Projects",
"puzzleCompleted": "Puzzle completed!",
"puzzleRatingQuestion": "Did you like this puzzle?",
"puzzleTitle": "Puzzle {puzzle_number} of {stage_total}",
"question": "Question",
Expand Down Expand Up @@ -977,6 +980,7 @@
"unpublishPending": "Unpublishing...",
"usernameLabel": "Username: ",
"usingHints": "Using hints",
"usingTooManyBlocks": "Using too many blocks",
"unsubmit": "Unsubmit",
"unsubmitAssessment": "Unsubmit your assessment",
"unsubmitYourProject": "Unsubmit your project",
Expand Down
3 changes: 3 additions & 0 deletions apps/i18n/studio/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"hoc2015_event_free_instructions": "\"You're on your own now, R2-D2.\"",
"hoc2015_event_free_instructions2": "You have all the tools you need now to create your own puzzle. Feel free to explore and play with all the different Commands and Events. When you're done, press the Finish button to continue.",
"iceAge": "Ice Age!",
"ifDroid": "droid",
"ifDroidN": "droid {spriteIndex}",
"ifSpriteN": "actor {spriteIndex}",
"incrementPlayerScore" : "score point",
Expand Down Expand Up @@ -314,6 +315,7 @@
"moveDistanceTooltip": "Move an actor a specific distance in the specified direction.",
"moveSprite": "move",
"moveSpriteN": "move actor {spriteIndex}",
"moveDroid": "move droid",
"moveDroidN": "move droid {spriteIndex}",
"toXY": "to x,y",
"moveDown": "move down",
Expand Down Expand Up @@ -717,6 +719,7 @@
"stopEverySpriteName": "stop every {spriteName}",
"stopSprite": "stop",
"stopSpriteN": "stop actor {spriteIndex}",
"stopDroid": "stop droid",
"stopDroidN": "stop droid {spriteIndex}",
"stopTooltip": "Stops an actor's movement.",
"tennisboy": "tennis boy",
Expand Down
1 change: 1 addition & 0 deletions apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"enzyme": "2.8.0",
"es6-promise": "3.0.2",
"eslint": "^3.19.0",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-mocha": "^4.9.0",
"eslint-plugin-react": "^5.2.2",
"fast-memoize": "2.0.2",
Expand Down
18 changes: 4 additions & 14 deletions apps/src/StudioApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import VersionHistory from './templates/VersionHistory';
import WireframeButtons from './templates/WireframeButtons';
import annotationList from './acemode/annotationList';
import color from "./util/color";
import getAchievements from './achievements';
import i18n from './code-studio/i18n';
import logToCloud from './logToCloud';
import msg from '@cdo/locale';
Expand All @@ -55,6 +56,7 @@ import {setIsRunning} from './redux/runState';
import {setPageConstants} from './redux/pageConstants';
import {setVisualizationScale} from './redux/layout';
import {
setAchievements,
setBlockLimit,
setFeedbackData,
showFeedback,
Expand Down Expand Up @@ -1446,24 +1448,11 @@ StudioApp.prototype.displayFeedback = function (options) {
store.dispatch(setFeedbackData({
isPerfect: feedbackType >= TestResults.MINIMUM_OPTIMAL_RESULT,
blocksUsed: this.feedback_.getNumCountableBlocks(),
achievements: [
{
isAchieved: true,
message: 'Placeholder achievement!',
},
{
isAchieved: true,
message: 'Another achievement!',
},
{
isAchieved: false,
message: 'Some lame achievement :(',
},
],
displayFunometer: response && response.puzzle_ratings_enabled,
studentCode: this.feedback_.getGeneratedCodeProperties(this.config.appStrings),
canShare: !this.disableSocialShare && !options.disableSocialShare,
}));
store.dispatch(setAchievements(getAchievements(store.getState())));
if (!preventDialog) {
store.dispatch(showFeedback());
}
Expand Down Expand Up @@ -2938,6 +2927,7 @@ StudioApp.prototype.setPageConstants = function (config, appSpecificConstants) {
showProjectTemplateWorkspaceIcon: !!config.level.projectTemplateLevelName &&
!config.level.isK1 &&
!config.readonlyWorkspace,
serverLevelId: config.serverLevelId,
}, appSpecificConstants);

getStore().dispatch(setPageConstants(combined));
Expand Down
71 changes: 71 additions & 0 deletions apps/src/achievements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import msg from '@cdo/locale';
import authoredHintUtils from './authoredHintUtils';

export default function getAchievements(state) {
return POSSIBLE_ACHIEVEMENTS.map(
possibleAchievement => possibleAchievement(state)
).filter(achievement => achievement);
}

const POSSIBLE_ACHIEVEMENTS = [
puzzleComplete,
numberOfBlocks,
usingHints,
];

export function puzzleComplete(state) {
return {
isAchieved: true,
message: msg.puzzleCompleted(),
successIconUrl: '',
};
}

export function numberOfBlocks(state) {
const blockLimit = state.feedback.blockLimit;
const blocksUsed = state.feedback.blocksUsed;
if (blockLimit === undefined || blockLimit === Infinity) {
return null;
}

let message, isAchieved;
if (blocksUsed < blockLimit) {
message = msg.fewerNumberOfBlocks({numBlocks: blockLimit});
isAchieved = true;
} else if (blocksUsed === blockLimit) {
message = msg.exactNumberOfBlocks({numBlocks: blockLimit});
isAchieved = true;
} else {
message = msg.usingTooManyBlocks();
isAchieved = false;
}

return {
isAchieved,
message,
successIconUrl: '',
failureIconUrl: '',
};
}

export function usingHints(state) {
const hintsUsed = authoredHintUtils.currentOpenedHintCount(
state.pageConstants.serverLevelId);
let message, isAchieved;
if (hintsUsed === 0) {
message = msg.withoutHints();
isAchieved = true;
} else if (hintsUsed === 1) {
message = msg.usingOneHint();
isAchieved = true;
} else {
message = msg.usingHints();
isAchieved = false;
}
return {
isAchieved,
message,
successIconUrl: '',
failureIconUrl: '',
};
}
1 change: 1 addition & 0 deletions apps/src/applab/Visualization.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Visualization extends React.Component {
<div
id="designModeViz"
className="appModern"
tabIndex="1"
style={commonStyles.hidden}
/>
<VisualizationOverlay width={appWidth} height={appHeight}>
Expand Down
2 changes: 1 addition & 1 deletion apps/src/code-studio/components/CellEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class CellEditor extends React.Component {
row: PropTypes.number.isRequired,
col: PropTypes.number.isRequired,
onUpdate: PropTypes.func.isRequired,
}
};

constructor(props) {
super(props);
Expand Down
49 changes: 23 additions & 26 deletions apps/src/code-studio/components/progress/StageLockDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const styles = {
}
};

const StageLockDialog = React.createClass({
propTypes: {
class StageLockDialog extends React.Component {
static propTypes = {
isOpen: PropTypes.bool.isRequired,
handleClose: PropTypes.func.isRequired,
initialLockStatus: PropTypes.arrayOf(
Expand All @@ -78,13 +78,15 @@ const StageLockDialog = React.createClass({
selectedSectionId: PropTypes.string.isRequired,
saving: PropTypes.bool.isRequired,
saveDialog: PropTypes.func.isRequired
},
};

constructor(props) {
super(props);

getInitialState() {
return {
lockStatus: this.props.initialLockStatus
this.state = {
lockStatus: props.initialLockStatus
};
},
}

componentWillReceiveProps(nextProps) {
if (nextProps.saving) {
Expand All @@ -93,33 +95,27 @@ const StageLockDialog = React.createClass({
this.setState({
lockStatus: nextProps.initialLockStatus
});
},
}

setAllLockStatus(lockStatus) {
this.setState({
lockStatus: this.state.lockStatus.map(item => Object.assign({}, item, {
lockStatus
}))
});
},
}

allowEditing() {
this.setAllLockStatus(LockStatus.Editable);
},
allowEditing = () => this.setAllLockStatus(LockStatus.Editable);

lockStage() {
this.setAllLockStatus(LockStatus.Locked);
},
lockStage = () => this.setAllLockStatus(LockStatus.Locked);

showAnswers() {
this.setAllLockStatus(LockStatus.ReadonlyAnswers);
},
showAnswers = () => this.setAllLockStatus(LockStatus.ReadonlyAnswers);

viewSection() {
viewSection = () => {
window.open(`${window.dashboard.CODE_ORG_URL}/teacher-dashboard#/sections/${this.props.selectedSectionId}/assessments`, '_blank');
},
};

handleRadioChange(event) {
handleRadioChange = (event) => {
const modifiedIndex = parseInt(event.target.name, 10);
const value = event.target.value;

Expand All @@ -137,11 +133,11 @@ const StageLockDialog = React.createClass({
})
});
}, 0);
},
};

handleSave() {
handleSave = () => {
this.props.saveDialog(this.props.selectedSectionId, this.state.lockStatus);
},
};

render() {
const responsiveHeight = {
Expand Down Expand Up @@ -307,8 +303,9 @@ const StageLockDialog = React.createClass({
</BaseDialog>
);
}
});
}

export const UnconnectedStageLockDialog = Radium(StageLockDialog);
export default connect(state => ({
initialLockStatus: state.stageLock.lockStatus,
isOpen: !!state.stageLock.lockDialogStageId,
Expand All @@ -318,4 +315,4 @@ export default connect(state => ({
saveDialog(sectionId, lockStatus) {
dispatch(saveLockDialog(sectionId, lockStatus));
}
}))(Radium(StageLockDialog));
}))(UnconnectedStageLockDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class CompletableLevelThumbnail extends React.Component {
children: PropTypes.element.isRequired,
size: PropTypes.number,
completed: PropTypes.bool,
}
};

render() {
const scale = (this.props.size || 400) / 400;
Expand Down