Commit Graph

69 Commits

Author SHA1 Message Date
Oliver Eyton-Williams
9ad29e03d5 refactor: handle certs separately (#44434)
* refactor: split createChallenge into two functions

* refactor: remove certification metas

* fix: remove the metas I missed
2021-12-09 11:53:12 -08:00
Oliver Eyton-Williams
22afdd1aad fix: stop modal appearing in steps (#43728)
* fix: stop showing completion modal on steps

* feat: submit steps with ctrl+enter

* fix: handle ctrl+enter when not focussing editor

* fix: reset tests when user types

* refactor: pass showCompletionModal as an option

Otherwise we have to write executeChallenge(true) which does not mean
what you might reasonably expect.

* fix: always executeChallenge when not on step

* fix: update frontend project show

* fix: handle missing payload

* refactor: isProjectStep -> hasEditableRegion

* refactor: more renaming

* fix: make meta.json control multifile editor use

* fix: update the challengeSchema correctly

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

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* fix: remove logging

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-10-13 14:47:59 +03:00
Shaun Hamilton
59f17f237b refactor: files{} -> challengeFiles[], and key -> fileKey (#43023)
* fix(client): fix client

* fix propType and add comment

* revert user.json prettification

* slight type refactor and payload correction

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* update ChallengeFile type imports

* add cypress test for code-storage

* update test and storage epic

* fix Shaun's tired brain's logic

* refactor with suggestions

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* update codeReset

* increate cypress timeout because firefox is slow

* remove unused import to make linter happy

* use focus on editor

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* use more specific seletor for cypress editor test

* account for silly null challengeFiles

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-08-12 20:48:28 +02:00
awu43
dd5d2919be feat(client): ts-migrate client/utils/** (#42823)
* rename js files

* update imports and references

* migrate build-challenges

* migrate challenge-types

* migrate utils/index

* migrate state-management

* install @types/psl for tags

* migrate tags

* migrate tags.test

* migrate challenge-page-creator

* migrate utils/gatsby/index

* migrate layout-selector

* migrate layout-selector.test

* revert challenge-types

Curriculum can't handle TS or modules

* convert arrow functions

* revert build-challenges

* revert utils/gatsby/index

* revert challenge-page-creator

* revert challenge-types reference

* Delete state-management

Deleted in #42960

* Disable render-result-naming-convention (for now)

* update layout-selector.test comment

* reorder imports in build-challenges

* change ts-ignore to ts-expect-error
2021-08-09 10:30:31 +02:00
Oliver Eyton-Williams
e118dda13a fix: order imports and remove circular dependencies (#41824)
* fix: remove circular dependency

redux depended on templates/Challenges/redux and vice versa.  This
meant that import order mattered and confusing bugs could arise.

(cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc)

* feat: require imports to be in alphabetical order

Import order generally does not matter, but there are edge cases
(circular  imports and css imports, for example) where changing order
changes behaviour

(cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c)

* chore: order imports

* fix: lift up challenge description + title comps

This brings the classic Show closer to the others as they
now all create the description and title components

* fix: remove donation-saga/index circular import

(cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207)

* refactor: extract action-types from settings

(cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd)

* fix: lint errors

* feat: prevent useless renames
2021-08-02 08:39:40 -05:00
Mrugesh Mohapatra
a378bc6dd4 chore: rework the language audits for build (#42510)
This also reverts commit cd5c28b332.
2021-06-15 23:07:52 +05:30
Nicholas Carrigan (he/him)
cd5c28b332 revert: disable portuguese (#42508)
* revert: disable portuguese

First certification is not 100% yet. Shipped too soon. :(

* feat: enable portuguese curriculum

Curriculum can build in portuguese, leaving client disabled to
prevent language from appearing in nav bar.

* feat: move audited cert list

Moves the audited cert list to the config, instead of the utils.
2021-06-15 21:32:29 +05:30
Oliver Eyton-Williams
c6aa6ddbcd fix: get showUpcomingChange from env.json (#42440) 2021-06-11 16:40:37 +02:00
renovate[bot]
21dd80c47a chore(deps): update dependency prettier to v2.3.0 (#42074)
* chore(deps): update dependency prettier to v2.3.0

* chore: apply formating per prettier

* fix: correctly disable import/no-unresolved

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Mrugesh Mohapatra <hi@mrugesh.dev>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-05-10 08:48:49 -07:00
Oliver Eyton-Williams
cbdf317aae fix: suppress warning for seedless challenges (#41507)
Both challengeType 11 and challengeType 3 have no seeds, so there's no
need to warn about a lack of seed.

The warning has been updated to better reflect the problem (lack of
seed, not lack of comments)
2021-03-16 09:22:39 -06:00
Mrugesh Mohapatra
b5f4754e2a fix: re-revert the API decoupling (#41263)
* fix(api): decouple api from curriculum

This reverts commit 8f0e441644 and
introduces the implementations from #40703.

* fix(gitpod): add curriculum build to GitPod

This reverts commit 706d70f58d and
introduces implementations from #41234.

* docs: update DevOps manual for api change (#41259)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-02-25 12:02:35 -08:00
Mrugesh Mohapatra
8f0e441644 revert(api): decouple api from curriculum
This reverts commit c077ffe4b9
via PR #40703
2021-02-25 03:40:09 +05:30
Oliver Eyton-Williams
f8699a8d55 refactor: simplify challenge.block usage (#41185) 2021-02-23 09:52:48 +05:30
Oliver Eyton-Williams
c077ffe4b9 feat(api): decouple api from curriculum (#40703) 2021-02-22 12:23:59 +05:30
Oliver Eyton-Williams
97fcaa693f refactor: only use dasherized superBlock (#41067) 2021-02-13 10:36:04 +05:30
Oliver Eyton-Williams
6c1f6bebed feat: label un-audited challenges (#41002)
Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Mrugesh Mohapatra <me@raisedadead.com>
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2021-02-11 18:10:32 +05:30
Oliver Eyton-Williams
73c06a5d71 refactor: tidy up translation-parser 2021-02-03 22:26:36 +05:30
Oliver Eyton-Williams
7640147a07 feat: curriculum dictionaries to objects (#40878)
* test: update to catch missing comments

* feat: convert dictionaries to JSON objects

* chore: update dictionaries

* fix: update tests for new dictionary objects

* fix: convert fixture to json

* fix: updated the incomplete dicts to new format
2021-02-02 12:14:29 -07:00
Oliver Eyton-Williams
a3a678b7af chore: remove old parser 2021-02-02 09:51:02 +05:30
Oliver Eyton-Williams
e3511f2930 chore: rename challenge-md-parser 2021-02-02 09:51:02 +05:30
Oliver Eyton-Williams
6abfcd8608 fix(curriculum): use js-yaml to parse certs 2021-02-02 09:51:02 +05:30
Randell Dawson
00a876d9b2 fix(learn): use json files for comments (#40844) 2021-01-31 21:36:57 +05:30
Oliver Eyton-Williams
ac6fc605ad refactor: clean up supportLangs refs 2021-01-31 12:15:34 +05:30
Oliver Eyton-Williams
24d9c94fe5 refactor: remove confusing abstraction 2021-01-31 12:15:34 +05:30
Oliver Eyton-Williams
7c4e0ec41e refactor: abstract out walk in getChallenges 2021-01-31 12:15:33 +05:30
Tom
3978c6be28 feat: i18n user interface (#40306)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-01-31 12:15:32 +05:30
Oliver Eyton-Williams
ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00
Oliver Eyton-Williams
1f65b3b7eb fix: require project completion to claim certs (#40399)
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>

Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
2020-12-08 07:53:02 -08:00
Oliver Eyton-Williams
0bd52f8bd1 Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
2020-11-27 10:02:05 -08:00
Oliver Eyton-Williams
e4a9b2988c feat: update Ask for help (#40114)
* feat: get helpCategory from frontmatter

* DEBUG: sets all the projects to JavaScript

This is just so the tests pass, it'll need to go.

* fix: updated helpCategoryMap categories

* fix: added Python to helpCategory frontmatter key

Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
2020-10-30 14:10:34 -05:00
Oliver Eyton-Williams
92a60f8bce fix(tools): update translation parser
Since we're adding more validation we can simplify the parser and
make sure it does catch all the comments.  Rather than worry about a
load of edge cases that do not appear in our challenges.
2020-10-22 03:18:16 +05:30
Oliver Eyton-Williams
793fa8fb52 test: check replaced iff translatable comment
All translatable comments should be replaced, but nothing else.
2020-10-22 03:18:13 +05:30
Oliver Eyton-Williams
d2ecd03013 fix: recreate comment map 2020-10-22 02:51:46 +05:30
Randell Dawson
2cae697f65 fix: change variables to match exported names 2020-10-22 02:51:45 +05:30
Randell Dawson
5eb33e36e1 fix(learn): add a comments dictionary 2020-10-22 02:51:45 +05:30
Oliver Eyton-Williams
1b895e7809 fix: translate title and dashName correctly 2020-10-06 23:10:08 +05:30
Oliver Eyton-Williams
df532099bc test: stop relying on curriculum dir structure
Also refactors path resolution a little
2020-09-29 22:09:02 +02:00
Oliver Eyton-Williams
9089ddca5c fix: use location for language, not extension
Rather than relying on .lang.md this expects to find the English source
challenge in /curriculum/challenges/english/<translationPath>
2020-09-29 22:09:01 +02:00
Oliver Eyton-Williams
34f2c4ae32 refactor: acceptedLanguage -> supported 2020-09-29 22:08:59 +02:00
Oliver Eyton-Williams
7bed07ee8a fix(tools): update parser for multi-file editor 2020-09-16 11:54:13 +05:30
Oliver Eyton-Williams
301212e194 feat: handle multi-file solutions 2020-09-16 11:54:06 +05:30
Oliver Eyton-Williams
754a33970e refactor(multi) move preparation into curriculum 2020-09-16 11:54:05 +05:30
Oliver Eyton-Williams
bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00
Shaun Hamilton
83c6de0144 fix: add backslash to path test for windows paths (#39454)
* fix: add backslash to path test for windows paths

* fix: add posix seperator to path tester

Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
2020-08-25 13:22:03 -07:00
Oliver Eyton-Williams
b197f73881 feat: restrict translation to audited certs 2020-08-16 04:45:19 +05:30
Oliver Eyton-Williams
1ec6cf1efd fix: handle video challenges 2020-08-16 04:45:19 +05:30
Oliver Eyton-Williams
0952ca6bfd feat: parse translated challenges
Using the English challenge as a source for the seed, solution and tests
this takes the parts that can be translated from the translated version
of the challenge. It also translates known comments in the seed.
2020-08-16 04:45:17 +05:30
Oliver Eyton-Williams
de3492fded Chore: remove old translation tools, import parser (#39273) 2020-07-27 18:11:53 +05:30
Oliver Eyton-Williams
b4926052f4 chore: refactor and simplify testing (#39050) 2020-06-13 14:57:15 +05:30
Oliver Eyton-Williams
d233cb35a3 fix(client): ensure validation works during watch (#38936) 2020-05-28 20:54:29 +05:30