* 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: require login as step
* fix: cert rendering temporary
* fix: remove keys from other translation files
* fix: cypress test
* chore: shauns suggestions
* fix: remove steps
* fix: use a seperate UseEffect function
* Suggestions from Shaun
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* fix: certification temp rendering
* fix: cert temp rendering hopefully
* fix: button visibility and cert test
* fix: condition
* test: improve claim cert tests
Without npm run seed, retries will be in a different state.
Check the scroll position to (hopefully) catch the weird cert claim bug.
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix(deps): update monaco editor
* chore: rollback monaco, update react-monaco-editor
The latest version of react-monaco-editor is only compatible with monaco
v0.27
* fix: roll-back monaco-editor-webpack-plugin
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* feat(curriculum): add accessibility-quiz practice project
* add parts 002-006
* add parts 7-8, tentative on logo aspect-ratio
* add parts 008-013
* add parts 013-016
* add parts 017-026
* add parts 026-027
* add parts 027-029
* add parts 029-044
* add parts 044-067 - all parts done
* add tests 001-009
* add tests 010 - 033
* add tests 034 - 039
* update tests 008~033, add tests 040-050
* add all tests
* fix some stuff, remove final.md
* take reasonable suggestions from Nich, ignore rest
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* replace svg link with actual CDN
* remove getAttribute in potentially bad places
* add method to form
* fix silly querySelectors
* adjust selectors for 028
* fix selectors, and add color transformations
Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
* fix: typos, and make one test lenient
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* fix: move ActionRow outside the ReflexContainer
It does not need to be resizable.
* fix: make DesktopLayout aware of ActionRow
The ReflexContainer seems to need to be inside a display: flex component
to correctly compute the sizes of it's children.
* refactor: remove unused props
* fix: enforce multifile tab order
* fix: sort challengeFiles to prevent remounts
If the challengeFiles are used unsorted, this can unmount an editor.
The editors rely on the mount hook for initialization, so extra mounts
can cause unwanted behaviour.
* fix: make editor tabs and panes match
* refactor: remove ambiguity about editable region
Since the editable region is implemented via decorations and defined in
challenge object, getEditableRegionFromRedux, makes the source obvious
* fix: make jaws follow the highlighted region
* fix: update the jaws on all content changes
* feat: make editable region 'absorb' text
As the user types, the editable region can move, expand and contract.
With this PR then if the user, say, presses backspace on the line after
the editable region, causing that line to move up, then the new contents
will expand/contract as if they had always been part of the region.
* feat(Cypress): hotkey tests
* fix: test previous next for projects
* fix: link time-out firefox
* feat: test the "r" hotkey
* fix: change select back to body for now
* fix: retain navigation mode for video challenges
* test: find focused elements
* fix: move focus from panel before pressing 'r'
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* test: add hotkey test for backend
* test: remove redundant {esc} presses
* refactor: naming change
* fix: refactor properly
* fix: actually refactor it properly
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* fix: message removed when not logged in
* removed unnecessary code from DonateCompletion.tsx that was added
* now using isSignedIn in props and not donationFromState
* feat(curriculum): add initial steps
Add the initial step files for this project.
* feat(curriculum): write test texts
Add some test text (tests coming soon).
* feat: tests for HTML bits
Add tests for the HTML bits - CSS holding off until parser lands.
* feat: CSS tests
New CSS parser works great!
* fix: link href
Fix the href in the boilerplate.
* chore: apply suggestions from code review
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* fix: clarify link element
* fix: optional chaining
* fix: remove unused meta props
* fix: update helper and fix tests
* chore: apply tom's review suggestions
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
* chore: no console logs
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* feat: intro
Add introductory text, tweak instructions a bit.
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* feat: change logos on chinese language
* fix: use Ahmads logos
* fix: error
* fix: tencent logo size
* feat: include chinese traditional
* Apply suggestions from code review
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* test: check that JS projects can be submitted.
* refactor: remove stale workflow comments
* refactor: remove redundant build
* chore: update Cypress version in CI
* test: create separate electron-only workflow
* test: put data-cy on correct button
* test: drop mailhog from electron CI
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* refactor: update differences comment
* test: separate toggling from logging in
* test: check solutions can be viewed on cert
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* Changes made as directed in the instructions
* second revision
* Third revision
* Cypress Test updated
* cypress test updation
* directly linking to top-contributors news page
Co-authored-by: Ilenia <nethleen@gmail.com>
* initial loading state unification
* feat(client): show buttons after 3 seconds
* fix: use window.setInterval explicitly
Otherwise TS assumes that it's node's setInterval
* feat(client): remove spinner when first button load
* feat(client): move the loader to the donate page button area
* feat(client): extract grid from modal donation form
* feat(client): remove duplicate donation forms
* feat(client):extract unused components from donationForm
* feat(client): load paypal on load not onInit (for perf)
* feat(client): set paypal loading state if stripe already loaded
* feat(clinet):make lpaypal oading condition strickt.
* Apply suggestions from code review
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* feat: clean up
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix(client): convert challengeFiles->files before sending to api
* update use of user.completeChallenges
* parse response in ajax, pre-typing
* add typing to getSessionUser
* refactor: use Omit
* fix: reorganise getSessionUser
* refactor ajax for simplicity
* refactor to be worse
* allow for undefined completedChallenges
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* chore: rename APIs and Microservices to include "Backend" (#42515)
* fix typo
* fix typo
* undo change
* Corrected grammar mistake
Corrected a grammar mistake by removing a comma.
* change APIs and Microservices cert title
* update title
* Change APIs and Microservices certi title
* Update translations.json
* update title
* feat(curriculum): rename apis and microservices cert
* rename folder structure
* rename certificate
* rename learn Markdown
* apis-and-microservices -> back-end-development-and-apis
* update backend meta
* update i18n langs and cypress test
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* fix: add development to front-end libraries (#42512)
* fix: added-the-word-Development-to-front-end-libraries
* fix/added-the-word-Development-to-front-end-libraries
* fix/added-word-development-to-front-end-libraries-in-other-related-files
* fix/added-the-word-Development-to-front-end-and-all-related-files
* fix/removed-typos-from-last-commit-in-index.md
* fix/reverted-changes-that-i-made-to-dependecies
* fix/removed xvfg
* fix/reverted changes that i made to package.json
* remove unwanted changes
* front-end-development-libraries changes
* rename backend certSlug and README
* update i18n folder names and keys
* test: add legacy path redirect tests
This uses serve.json from the client-config repo, since we currently use
that in production
* fix: create public dir before moving serve.json
* fix: add missing script
* refactor: collect redirect tests
* test: convert to cy.location for stricter tests
* rename certificate folder to 00-certificates
* change crowdin config to recognise new certificates location
* allow translations to be used
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* add forwards slashes to path redirects
* fix cypress path tests again
* plese cypress
* fix: test different challenge
Okay so I literally have no idea why this one particular challenge
fails in Cypress Firefox ONLY. Tom and I paired and spun a full build
instance and confirmed in Firefox the page loads and redirects as
expected. Changing to another bootstrap challenge passes Cypress firefox
locally. Absolutely boggled by this.
AAAAAAAAAAAAAAA
* fix: separate the test
Okay apparently the test does not work unless we separate it into
a different `it` statement.
>:( >:( >:( >:(
Co-authored-by: Sujal Gupta <55016909+heysujal@users.noreply.github.com>
Co-authored-by: Noor Fakhry <65724923+NoorFakhry@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* 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>
* feat: initial button setup client
* feat: rename walletsButton to .tsx
* chore: typescriptize wallet component
* chore: re-add keys to config, env, etc + check in gatsby-node
* feat: refactor donate form and wallet component
* feat(client): set labels correctly
* chore: add stripe package back to server
* chore: add stripe back to allowed paths
* chore: copy donate.js code from PR #41924
* feat: attempt to make back end work
* feat: make redux work
* feat: clean up
* feat: hokify
* feat: add error handling
* fix: back-end should be working
* fix: type errors
* fix: clean up back-end
* feat:addd styles
* feat: connect the client to the api
* feat: display wallets button everywhere
* test: add stripe key for cypress action
* test: fix for cypress tests
* test: cypress tests again
* test: maybe?
* test: more
* test: more
* test: more
* test
* askdfjasklfj
* fix: tests finally?
* revert: remove space from cypress yaml action
* remove logs
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix: store accessibility for screenreaders
* Apply suggestions from code review
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* fix: remove old comments
* feat: at short cut announcement when running test
* feat: announce that accesibility mode is turned on
* fix: use Redux values
* Apply suggestions from code review
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* Apply suggestions from Oliver
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix: "rip out redux stuff" and use store instead
* Apply suggestions from code review
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* Apply suggestions from code review
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* fix: old use of props
* Update client/src/templates/Challenges/classic/editor.tsx
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>