Skip to content

Commit a2f2ad4

Browse files
moT01Ksound22huyenltnguyen
authored
feat(curriculum): add dev-playground superblock and daily challenge types (freeCodeCamp#60439)
Co-authored-by: Kolade Chris <[email protected]> Co-authored-by: Huyen Nguyen <[email protected]>
1 parent d4c905e commit a2f2ad4

File tree

70 files changed

+4659
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4659
-25
lines changed

client/i18n/locales/english/intro.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4264,6 +4264,20 @@
42644264
}
42654265
}
42664266
},
4267+
"dev-playground": {
4268+
"title": "Dev Playground",
4269+
"intro": ["Playground for creating and testing challenges"],
4270+
"blocks": {
4271+
"daily-coding-challenges-javascript": {
4272+
"title": "Daily Coding Challenges JavaScript",
4273+
"intro": ["Place to create JavaScript daily coding challenges."]
4274+
},
4275+
"daily-coding-challenges-python": {
4276+
"title": "Daily Coding Challenges Python",
4277+
"intro": ["Place to create Python daily coding challenges."]
4278+
}
4279+
}
4280+
},
42674281
"misc-text": {
42684282
"browse-other": "Browse our other free certifications",
42694283
"courses": "Courses",

client/src/assets/superblock-icon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const iconMap = {
4545
[SuperBlocks.B1English]: B1EnglishIcon,
4646
[SuperBlocks.A2Spanish]: A2EnglishIcon,
4747
[SuperBlocks.RosettaCode]: RosettaCodeIcon,
48-
[SuperBlocks.PythonForEverybody]: PythonIcon
48+
[SuperBlocks.PythonForEverybody]: PythonIcon,
49+
[SuperBlocks.DevPlayground]: Code
4950
};
5051

5152
type SuperBlockIconProps = {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Introduction to the Daily Coding Challenges JavaScript
3+
block: daily-coding-challenges-javascript
4+
superBlock: dev-playground
5+
---
6+
7+
## Introduction to the Daily Coding Challenges JavaScript
8+
9+
JavaScript daily coding challenges.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Introduction to the Daily Coding Challenges Python
3+
block: daily-coding-challenges-python
4+
superBlock: dev-playground
5+
---
6+
7+
## Introduction to the Daily Coding Challenges Python
8+
9+
Python daily coding challenges.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Dev Playground
3+
superBlock: dev-playground
4+
certification: dev-playground
5+
---
6+
7+
## Introduction to the Dev Playground
8+
9+
Playground for creating and testing new challenges

client/src/templates/Challenges/classic/desktop-layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ const DesktopLayout = (props: DesktopLayoutProps): JSX.Element => {
232232
challengeType === challengeTypes.multifilePythonCertProject ||
233233
challengeType === challengeTypes.lab ||
234234
challengeType === challengeTypes.jsLab ||
235-
challengeType === challengeTypes.pyLab;
235+
challengeType === challengeTypes.pyLab ||
236+
challengeType === challengeTypes.dailyChallengeJs ||
237+
challengeType === challengeTypes.dailyChallengePy;
236238
const isProjectStyle = projectBasedChallenge || isMultifileProject;
237239
const displayPreviewPane = hasPreview && showPreviewPane;
238240
const displayPreviewPortal = hasPreview && showPreviewPortal;

client/src/templates/Challenges/classic/editor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ const Editor = (props: EditorProps): JSX.Element => {
286286
highlightActiveIndentation:
287287
props.challengeType === challengeTypes.python ||
288288
props.challengeType === challengeTypes.multifilePythonCertProject ||
289-
props.challengeType === challengeTypes.pyLab
289+
props.challengeType === challengeTypes.pyLab ||
290+
props.challengeType === challengeTypes.dailyChallengePy
290291
},
291292
minimap: {
292293
enabled: false
@@ -309,7 +310,8 @@ const Editor = (props: EditorProps): JSX.Element => {
309310
tabSize:
310311
props.challengeType !== challengeTypes.python &&
311312
props.challengeType !== challengeTypes.multifilePythonCertProject &&
312-
props.challengeType !== challengeTypes.pyLab
313+
props.challengeType !== challengeTypes.pyLab &&
314+
props.challengeType !== challengeTypes.dailyChallengePy
313315
? 2
314316
: 4,
315317
dragAndDrop: true,

client/src/templates/Challenges/classic/show.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ const StepPreview = ({
173173
}) => {
174174
return challengeType === challengeTypes.python ||
175175
challengeType === challengeTypes.multifilePythonCertProject ||
176-
challengeType === challengeTypes.pyLab ? (
176+
challengeType === challengeTypes.pyLab ||
177+
challengeType === challengeTypes.dailyChallengePy ? (
177178
<XtermTerminal dimensions={dimensions} xtermFitRef={xtermFitRef} />
178179
) : (
179180
<Preview disableIframe={disableIframe} previewMounted={previewMounted} />

client/src/templates/Challenges/redux/execute-challenge-saga.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ export function* previewChallengeSaga(action) {
292292
challengeData.challengeType === challengeTypes.python ||
293293
challengeData.challengeType ===
294294
challengeTypes.multifilePythonCertProject ||
295-
challengeData.challengeType === challengeTypes.pyLab
295+
challengeData.challengeType === challengeTypes.pyLab ||
296+
challengeData.challengeType === challengeTypes.dailyChallengePy
296297
) {
297298
yield updatePython(challengeData);
298299
} else {
@@ -326,7 +327,8 @@ function* updatePreviewSaga(action) {
326327
if (
327328
challengeData.challengeType === challengeTypes.python ||
328329
challengeData.challengeType === challengeTypes.multifilePythonCertProject ||
329-
challengeData.challengeType === challengeTypes.pyLab
330+
challengeData.challengeType === challengeTypes.pyLab ||
331+
challengeData.challengeType === challengeTypes.dailyChallengePy
330332
) {
331333
yield updatePython(challengeData);
332334
} else {

client/src/templates/Challenges/redux/selectors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ export const challengeDataSelector = state => {
9797
challengeType === challengeTypes.js ||
9898
challengeType === challengeTypes.jsProject ||
9999
challengeType === challengeTypes.jsLab ||
100-
challengeType === challengeTypes.pyLab
100+
challengeType === challengeTypes.pyLab ||
101+
challengeType === challengeTypes.dailyChallengeJs ||
102+
challengeType === challengeTypes.dailyChallengePy
101103
) {
102104
const { required = [], template = '' } = challengeMetaSelector(state);
103105
challengeData = {

0 commit comments

Comments
 (0)