* feat(client): ts-migrate Flash/redux
* add app types
* convert Flash/redux/index to vanilla TS
* update redux types.ts
* use FlashState type over State type
* update typing
* fix: prettier errors I caused?
* fix: re-add comment I removed
* remove comment
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix type to not include {}
* remove commented out code for future use
* remove unused initialState object
* rename Flash onClose prop to match action name
* directly type reducer to return state
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* refactor: MultifileEditor to functional component.
* fix: make editor acquire focus once on mount
Now the editors can leave the dom (e.g. if a tab is clicked), but an
editor will only call for focus if the MultifileEditor itself remounts
* refactor: remove forbidden regions
We aren't using them and they're implemented badly. To recreate them, we
should simply track the editable region and update them when it's Range
changes.
* refactor: simplify the refs considerably
There's no point keeping an object with properties for all possible
editors when only one is created at once.
Instead of relying on heuristics like "does the current content
differ from the initial content?" this just resets if the reset button
has been pressed.
* feat(UI): language in the side menu is now a drop down. navigation items are now text wrapped
* fix: use redux navigation to redirect links instead
* fix: fix to use clientLocale as curent language instead
* fix: tests to use clientLocale
For legacy challenges, there's only one editor and it must be focused.
For project steps, only the editor with the editable region should call
for focus.
* feat(curriculum): add registration-form practice project
* add parts 001-006
* add parts 007-009
* add parts 010-013
* add parts 014-024, fix 013
* add parts 025-043
* add parts 043-046
* add parts 0047-057 without tests
* fix tests and adjust index.md file I do not understand
* add css tests to parts 037-040
* add tests parts 040-057
* remove space around ERM
* add true assertion until document iframe is fixed
* add critical review suggestions
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* use clear, Tom-like language for 038
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
* change order to match author's age
* apply suggestions with personal pazzaz
* add that thing Nich forgets
* use innerText
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* feat(ts-migrate): rename sass-compile.js to ts
* feat(ts-migrate): rename test-evaluator.js to ts
* feat(ts-migrate): add webworker in client tsconfig
* fix(ts-migrate): fix errors in sass-compile.ts
* chore(ts-migrate): install chai types in client
* fix(ts-migrate): fix errors in test-evaluator.ts
* fix(ts-migrate): rename extensions in webpack-worker
* fix(ts-migrate): separate tsconfig for workers
* fix(ts-migrate): add worker tsconfig to parser options
* chore(ts-migrate): remove unnecessary comment
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix(ts-migrate): use let instead of const
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix(ts-migrate): fix eslint errors in sass-compile.ts
* fix(ts-migrate): fix eslint errors in test-evaluator.ts
* chore(ts-migrate): use unknown instead of generics
* chore(ts-migrate): revert worker tsconfig
* chore(ts-migrate): add libs in client tsconfig
* fix(ts-migrate): use ctx alias in test-evaluator.ts
* fix(ts-migrate): use ctx alias in sass-compile.ts
* chore: fix errors
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* 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>
* fix: update jaws on resize
Use isProjectStep to determine if the jaws need to be updated
* refactor: isProjectStep -> hasEditableRegion
isProjectStep was misleading. hasEditableRegion correctly describes
that function and leaves isProjectStep to enable features that are
unique to project steps, but nothing to do with the editable region
If the code has changed without the user typing (e.g. they've pushed
the restart button), then we jump them back to the editable region.
Otherwise (e.g. they've typed in the editor) we reset the display, but
do not move the editor.
* feat: remove eslint-plugin-prettier for prettier
This removes the annoying lint warnings when all that needs to change is
formatting
* fix: use .js lint-staged config to ignore properly
* fix: lint everything if a lot of files are changed
It's faster than making lots of individual linter calls
* chore: apply prettier
* fix: ignore code in curriculum-file-structure
* feat: added warning for unreachable server
* fix: update initial state in test file
* fix: make offline warning scroll with page
* adjust z-indexes for warning banners
* add hyperlink for offline warning