Commit Graph

613 Commits

Author SHA1 Message Date
Caden Parker
85f3ecbb0a Change Link Regex Tests to DOM queries (#45890)
* Change link regex tests to DOM queries

* Keep injection of style tag

Co-authored-by: Florencia <sicref001@gmail.com>
Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-06-27 10:37:23 +02:00
Oliver Eyton-Williams
8bc5b0a310 fix: show completion modal (#46589)
* fix: make ctrl/cmd + enter trigger modal

Multifile projects should be handled like legacy challenges in this
regard.

* test: check modal appears

* refactor: ignore additional solutions

* test: fix ctrl + enter tests

* fix: only run on electron

* fix: remove log

* fix: show completion modal if instructions focused

* fix: handle undefined challengeType
2022-06-26 12:23:46 -05:00
Naomi Carrigan
74a03ce0e5 feat: only 3 attempts before showing buttons (#46641)
* feat: only 3 attempts before showing buttons

* fix: linter
2022-06-24 08:27:18 +03:00
Oliver Eyton-Williams
44b1a3dab5 fix(client): inject user's script.js contents correctly (#46627)
With this change the preview should function as if the user had written
a script with script.js's contents.  <script src="script.js"> is
replaced, so the script element's position in the html matters.
2022-06-23 16:34:29 +01:00
Bruce Blaser
bcb048a93b fix(a11y): improve RWD challege grid accessibility (#45957)
* fix: improve RWD challege grid accessibility

* fix: change wording from challenge to step

* fix: improve keyboard focus indicator on step links

* fix: style jump link as button

* fix: accessible background color for completed steps

* refactor: make steps a nav region

* refactor: remove duplicate selector

* fix: enhance focus indicator on jump link

* fix: TS type

* refactor: remove unneeded CSS

* chore: resolve conflict

* chore: translate accessible name on nav

* fix: remove h4 from button

* fix: add course name to toggle button

* fix: improve accessibility of course stats on toggle button

* fix: prefix step links with sr-only "Step"

* fix: add start project button

* refactor: remove unnecessary spaces

* fix: clean up styles

* Update client/src/templates/Introduction/intro.css

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-06-17 15:45:40 +03:00
Radi Totev
9e51b59584 feat: show sign in button for unauthenticated users (#46401) 2022-06-16 13:47:30 +02:00
Bruce Blaser
46450b802c fix(a11y): improve challenge test suite results accessibility (#45802)
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2022-06-14 12:09:25 +05:30
Radi Totev
c0e0dcfef9 chore: improve spelling (#46421) 2022-06-09 16:18:35 +02:00
Bruce Blaser
4f54125e76 fix:enable default mouse/touch events on monaco content widget (#46217)
* fix:enable default mouse events on monaco content widget

* add touch event handling

* initial test of scroll gutter

* disable scroll gutter

* re-enable gutter scroll as content widget

* move scroll gutter over line numbers

* fix: bug in moving scroll gutter over line numbers

* CSS adjustments to put scroll gutter over line numbers

* fix: scroll gutter height

* fix: make scroll gutter width responsive

* refactor: consolidate event handlers

* refactor: simplify args to createWidget
2022-06-09 12:07:40 +05:30
Oliver Eyton-Williams
f0f44ca315 feat(client): re-enable failed update re-submission (#46064)
* refactor: return response with data from ajax

Because we still need to manipulate the data coming back from the server
(files -> challengeFiles) and we want to keep ajax.ts as the interface
between client and server we need to return the manipulated data with
the response.

* feat: re-enable failed updates flushing

* test: failed updates get resubmitted and flushed

* fix: convert settings requests to use { data }

* refactor: use preserveSession
2022-06-07 17:52:23 +03:00
Jordan Moore
fcf2dd7254 fix(UI): Remove 'CTRL + Enter' on CTA for mobile (#46239)
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-06-07 18:20:16 +05:30
Radi Totev
e581bd9081 feat(client): shortcuts legend modal available on pressing the ? key (#45530)
* Add modal texts in translations.json file

* Add shortcuts modal state in redux

* Create shortcuts modal

* Integrate shortcuts modal

* Resolve codefactor.io issues

* Extend list of shortcuts

Based on this comment:
https://github.com/freeCodeCamp/freeCodeCamp/issues/36841#issuecomment-933310078

* Remove temporary placeholder for modal title

* Open modal fom Hotkeys instead of learn.tsx

As suggested in this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101224993

* Complete list in transaltions

* Change shortcut presentation fo better a11y

Use table instead of list items as suggestedin this comment:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101796368

* Add aria-labelledby

* Remove GAnalytics

* Remove leftover style

* Remove table caption

* autofocus on modal close button

* Improve modal a11y

- Add requested changes from https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1104764766
- Leave autofocus and parent div role=dialog changes for later. (https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107754148)

* [WIP] Alllow users to turn off keyboard shortcuts

* Add keyboard shortcuts switch in settings

* Disable shortcuts

* Remove toggle switch description

* Refactor and cleanup

* Remove close button from modal header

Suggested by bbsmooth:
https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107861091

* Fix lint issues

* Disable shortcuts

* Disable shortcuts by default

* Update challenge output test

* Update challenge-hot-keys test

* Disable shortcuts from inside handlers

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-06-03 09:57:52 -07:00
Sem Bauke
345268019c fix(client): reduce line number bar width (#46309) 2022-06-03 15:01:08 +02:00
SadmanSyfe
12d742a4f0 fix(client): prevent lower jaw breaking on code evaluation (#46154)
* Fix(issue:#46062)

* feat: render based on earliest available lower jaw conditions

* fix: persist challenge completion properly

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-06-03 12:10:49 +02:00
Oliver Eyton-Williams
f55a4c48db test: tighten up two more cypress tests (#46273)
* test: tighten up user-token

This should be faster and a little more reliable.  before should have
worked, but beforeEach seems more reliable, so I'm trying it.

* test: use a single test for intro-page

Should be more robust as well as a lot faster.
2022-06-03 11:44:20 +03:00
Ahmad Abdolsaheb
78090c76ca feat(client): contextually show reset step button (#46272)
* feat: show reset step button contexually

* feat: rename render function

* fix:clean up

* feat: open a reset step modal
2022-06-02 19:34:31 +02:00
Shaun Hamilton
33e0bb79d7 fix(client): add mathjax to intermediate-algorithm-scripting (#46270) 2022-06-01 20:01:22 +05:30
Lasse Jørgensen
6d89576b6c fix(curriculum): don't block fragment links (#46246) 2022-06-01 12:56:19 +05:30
Niraj Nandish
d67a617e47 fix(client): prevent code duplication when using help button (#46232)
* fix(client): prevent code duplication when using help button

* feat(client): comment file name when opening issue in forum

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

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2022-05-30 22:29:28 +05:30
Sem Bauke
2790362df8 feat: instruction hiding with button (#46086)
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
2022-05-30 18:50:32 +05:30
renovate[bot]
4a1d223429 fix(deps): update dependency react-reflex to v4.0.9 (#46206)
* fix(deps): update dependency react-reflex to v4.0.9

* fix(deps): update dependency react-reflex to v4.0.9

* fix(client): chore to remove unneeded ts comment

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2022-05-30 18:50:01 +05:30
Bruce B
8d90c02747 fix(a11y):add main landmark to super block intro (#46168) 2022-05-27 10:52:49 +02:00
Tom
658b48ba62 fix: third-party cookie issues with CodeAlly login (#46090) 2022-05-26 21:44:10 +05:30
Ahmad Abdolsaheb
97423f7a2f feat: add a leading submitChallenge debounce (#46085)
* feat: reduce submitChallenge debounce

* feat: register the leading call

* fix: presist debounce calls

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

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

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-05-26 21:43:12 +05:30
Sem Bauke
c3e1ba4390 fix(client): prevent iframe from duplicating by using preventDefault (#46082)
* fix: prevent iframe from duplicating

* fix: remove old stuff

* fix: changes

* fix: change wording

* Update client/src/templates/Challenges/utils/frame.ts

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
2022-05-21 09:59:28 +04:00
Radi Totev
ea4cedd3f2 chore(client): typescript migration - utils/frame.js (#46075)
* Change extension to .ts

* Resolve ts issues

* Update test:curriculum script
2022-05-20 14:59:08 +02:00
Bruce B
3d9293f14b fix(a11y): improve accessibility on completed Step heading (#46047)
* fix: improve accessibility on completed Step heading

* fix: add translation
2022-05-20 13:29:03 +02:00
Niraj Nandish
d4e01b66fb chore: TS migrate MultifileEditor (#45857) 2022-05-19 21:14:22 +05:30
Radi Totev
aaca146d2b fix(client): show checkmark for completed challenges in new RWD (#46038) 2022-05-18 18:57:53 +05:30
Ahmad Abdolsaheb
d89b129d18 feat(client): combine editor submission and execution calls (#46037)
* feat: combine submission and execution calls

* refactor: rename the click listeners

onChallengeSubmission sounds like something that will get called in
response to challenge submission, not something that will trigger it

* fix: create one debounced function

* fix: use lodash-es

Otherwise we'll include all of lodash in the bundle.

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-05-18 14:34:39 +04:00
Oliver Eyton-Williams
301c2a598a fix: comments out update-my-current-challenge call (#46028) 2022-05-18 02:07:29 +05:30
Naomi Carrigan
2fbdfa5d09 feat: add ask for help button (#45636)
* feat: add ask for help button

* feat: move button to test output area

* feat: track number of attempts

* feat: add ask button to buttons container

* feat: restructure lower jaw

* feat: adjust the lower jaw styles

* fix: unmount component

* feat: restructure the lowerjaw

* fix: move aria live region to encompass both status and hint

* feat: rebase main

* feat: remove lower jaw update from test useEffect

* fix: output viewzone resize on output change

* fix: change encouragement message based on attemps

* fix: maintain lowerjaw height when tests run

* feat: remove set height and clear feedback

* fix: adjust lower jaw state on reset

* fix: focus submit button when challenge is completed

* fix: add aria-hidden after 500ms

* add translations

* fix: clean up

* feat: fade in test feedback after each attempt

* feat: make lower jaw accessible

* fix: clean up

Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: Bruce B <bbsmooth@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2022-05-17 21:22:03 +05:30
Tom
3503b473cc fix: remove update-current-challenge call (#46019) 2022-05-17 08:44:55 -07:00
Tom
b7155694d9 fix(curriculum): interfering style elements (#46000)
* fix: interfering style elements

* fix: node tests

* fix: allow style tags or styles.css
2022-05-17 21:13:36 +05:30
Shaun Hamilton
a993c21b9f chore(client): remove naomi's code (#46017) 2022-05-17 19:21:58 +04:00
Shaun Hamilton
e296dd5b55 fix(client): add debounce to challenge submission (#46009)
* fix(client): add debounce to challenge submission

* add timeout to shortcut

* add clear for dep
2022-05-17 15:17:05 +02:00
Naomi Carrigan
fe71a9cf25 feat: new js cert (#45873)
* chore: move files

* wip: i have no idea what i am doing

* feat: finish up the logic

* chore: use order from randy sheet

* chore: standardise titles

* feat: fix layout for new js projects

* fix: utils test

* fix: challenge tests

* fix: ignore show new curriculum on non-english tests

* chore: help category????

* fix: if these tests would fail locally that'd be great

* chore: duplicate ids
2022-05-16 11:53:45 +02:00
Naomi Carrigan
d808d726f4 fix: add scrollable anchor to grid project block (#45954) 2022-05-14 09:17:20 +02:00
Oliver Eyton-Williams
538e7c787b feat: improve file insertion (#45942) 2022-05-14 10:06:26 +05:30
Naomi Carrigan
0677464b68 feat: banner for updated RWD (#45936) 2022-05-12 21:38:20 -07:00
Tom
898d6eafa3 fix: cert project links going to english (#45923)
* fix: cert project links going to english
2022-05-12 13:29:10 +05:30
Naomi Carrigan
23b4be71d7 feat: release RWD from beta (#45865)
* feat: release RWD from beta

* feat: replace beta banner with legacy banner

* feat: update project links

* fix: cypress tests

* fix: map selector

* chore: legacy verbiage

* chore: remove isBeta flag

* fix: go back url verbiage

* feat: separate order for i18n

* fix: curriculum utils test

* fix: cypress

* tests: use data-cy for robustness

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-05-10 11:44:23 -05:00
Benjamin Rio
1457c362c1 fix(client): remove duplicate css properties (#45902) 2022-05-10 10:03:53 -05:00
Bruce B
c25634c05e fix(a11y): beta RWD course toggle button accessibility (#45544)
* fix: beta RWD course toggle button accessibility

* refactor: passing props to icons

* simplify prop name and give it a default value

* remove console log

* fix: added translations

* refactor: announce percentage of course completed to screen readers

* fix: variable name typo

* fix: add a clear separation between course title and status
2022-05-09 16:27:50 +03:00
Tahseen Islam
7ab15bd4ce fix(client): remove duplicate css properties (#45889) 2022-05-09 08:57:45 +02:00
Brandon Barricklow
60cb648734 fix(client): remove duplicate css properties (#45891) 2022-05-09 08:55:23 +02:00
Tom
f04fbba22d feat: convert RWD cert projects (#44564)
* feat: convert RWD cert projects

* feat: convert original projects

* fix: add usesMultiFileEditor to meta

* feat: add cypress tests for saving and loading to/from database

* fix: broken cypress tests

* fix: inconsistent variable naming

* fix: missed variable name

* fix: more cypress

* feat: add solutions for english

* fix: ctrl+s to database only if signed in

* fix: prioritize code from db

* refactor: expand the comments slightly
2022-05-05 10:58:14 +02:00
Bruce B
00123db8c4 fix(a11y): place textarea between the jaws (#45803)
* fix: place textarea between the jaws

* refactor: convert upper jaw to content widget

* fix: upper jaw shift on restart button

* fix: reset height of lower jaw on restart

* fix: upper jaw width resizing

* fix: placement of upper jaw on editor resize

* chore: remove unnecessary code

* chore: add useful comment

* refactor: create function to set height on test feedback
2022-05-03 11:38:33 -07:00
Oliver Eyton-Williams
2432fbb428 fix: create config files before linting (#45723) 2022-04-19 08:27:19 -07:00
Bruce B
647469a479 fix(a11y): beta RWD feedback for code check (#45579)
* fix: beta RWD feedback for code check

* cleaned up comments

* move colon on hint heading to CSS

* fix: keep status message box size consistent
2022-04-19 14:34:15 +03:00