* fix: replace index with script/styles as needed
* fix: remove redundant fileKey
It's overwritten by createPoly, so the parser does not need to create it
* fix: curriculum test suite
* Update client/src/templates/Challenges/classic/MultifileEditor.js
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* feat: dispatch resetChallenge action
* fix: copy challengeFiles instead of in-place sort
* fix: handle null updateFile payloads in redux
* refactor: reorganise region initialization
* refactor: pull code into editorDidMount
Then we can rely on the presence of the editor and monaco and don't have
litter the code with null checks.
* refactor: use better name for editable region init
* refactor: remove unused decoration
* refactor: rename forbidden region init functions
* fix: keep all challengeFiles when resetting
* refactor: remove unused decoration class
* fix: reinitialize editor on reset
* fix: stop adding multiple scroll listeners
Since the challengeFile update on each keystroke extra (unnecessary)
adding of listeners slowed the editor to a crawl.
* fix: only scroll to editor on mount
Rather than on any edit.
* refactor: remove logs and comments
* fix: rename toSortedArray and fix broken test
* fix: check for null not falsy in updateFile
* fix: only update project features when project
* fix: only reset if editor contents have changed
* feat: focus on editor after reset
* 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>
* 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
* 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.
* fix: restrict removeJSComments to test-evaluator
To prevent @babel from being included everywhere, this only calls
removeJSComments inside the test-evaluator
* test: add removeJSComments test
* Removes comments in js challanges by default
* fix local-scope-and-functions test regex
* fix all languages
* revert language changes
* removed unnecessary removeJSComments from challenges
* fix challanges in other languages
* removed removeJSComments from all challanges
* 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>
* feat: __testEditable allows editable region tests
It's not entirely isolated, but it makes it possible to select only the
element with id 'editable-only' which is built solely from code inside
the editable region.
* fix(client): missing editableContents -> ''
Previously it was added as the string 'undefined'
* fix: more informative error messages
* fix: DRY, correct and test getLines
* fix: make help button use subforum topics
* fix: add test to check that block exists
Co-authored-by: ojeytonwilliams <ojeytonwilliams@gmail.com>
* fix: improve error message
* Update curriculum/test/test-challenges.js
Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix(client): add cache-busting hashes to chunks
* fix: create cache-busting names for the workers
Prior to this PR the first webpack compilation gave the workers static
names. This can cause caching problems, so this PR adds hashes to
their names to invalidate the cache.
In order for Gatsby to find them, the names are added to the
config directory.