freeCodeCamp/utils
Oliver Eyton-Williams e4ba0e23ea
feat: enable reset in multifile editor (#43617)
* 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
2021-10-01 10:36:20 +02:00
..
__fixtures__ refactor: files{} -> challengeFiles[], and key -> fileKey (#43023) 2021-08-12 20:48:28 +02:00
block-nameify.d.ts feat(curriculum): add project creation tool (#42410) 2021-06-09 00:57:45 +05:30
block-nameify.js feat(curriculum): add project creation tool (#42410) 2021-06-09 00:57:45 +05:30
get-lines.js Feat: editable dom element (#39341) 2020-09-16 11:54:11 +05:30
get-lines.test.js chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00
index.js feat: add 'back/front end' in curriculum (#42596) 2021-08-13 21:57:13 -05:00
is-audited.js chore: rework the language audits for build (#42510) 2021-06-15 23:07:52 +05:30
polyvinyl.js refactor: files{} -> challengeFiles[], and key -> fileKey (#43023) 2021-08-12 20:48:28 +02:00
preformatted-block-names.json feat(curriculum): add piano project (#43364) 2021-09-13 17:51:42 +01:00
slugs.js fix: replace . with - in slugs (#39168) 2020-07-03 20:28:53 +05:30
slugs.test.js chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00
sort-challengefiles.js feat: enable reset in multifile editor (#43617) 2021-10-01 10:36:20 +02:00
sort-challengefiles.test.js feat: enable reset in multifile editor (#43617) 2021-10-01 10:36:20 +02:00
validate.js fix: valid username lowercase (#42172) 2021-05-20 09:04:00 +02:00
validate.test.js chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00