Commit Graph

1669 Commits

Author SHA1 Message Date
awu43
f8aa621672 delete old ts-ignore comments (#43329) 2021-08-27 23:38:30 +02:00
awu43
58ed9330bf fix(client): ensure unmount effect has most recent values (#43282)
* ensure unmount effect has most recent values

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-08-26 18:03:11 -05:00
Ismail Tlemcani
67ee31cbfc feat(client): ts-migration for layout index file, Intro Component and header test file (#43094) 2021-08-26 17:17:25 -05:00
Sem Bauke
cd005668b9 feat: change logos on chinese language (#43269)
* 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>
2021-08-25 18:21:56 +02:00
Nicholas Carrigan (he/him)
b9d08f2fea feat: locale specific help posts (#43290) 2021-08-25 21:43:40 +05:30
Oliver Eyton-Williams
d161998acc test: check that JS projects can be submitted. (#43222)
* 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>
2021-08-24 20:26:48 +02:00
Christian Z. Tamayo
a42348d3b9 test: Privacy terms redirection (#43195) 2021-08-24 22:36:23 +05:30
Oliver Eyton-Williams
5e49521fc2 fix(client): some editor edge cases (#43256)
* fix: handle erm on line zero

* refactor: fix eslint errors

* fix: prevent crash on zero height editable region
2021-08-23 11:34:53 -07:00
Mohamed Naufal A
498805c235 fix(client): use en top contributor link for i18n (#43248)
* 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>
2021-08-23 16:50:28 +01:00
ABHINAV SHARMA
bd7a6780a9 feat(client): ts-migrate Map component (#42845)
* feat(client) Renamed index.js to index.tsx

* feat(client): ts-migrate Map component
2021-08-21 12:06:09 +01:00
Nicholas Carrigan (he/him)
b99ee5e7de feat: english forum for guide posts (#43246) 2021-08-20 11:58:07 +05:30
Ahmad Abdolsaheb
1fec73cdf7 feat(client): Unify donation loading state (#43179)
* 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>
2021-08-19 14:47:25 -05:00
Victor Duarte
84760cba9e fix(client): removes cut off in certificate page (#43090) 2021-08-18 09:23:34 -05:00
Shaun Hamilton
5806c3047d fix(client): convert challengeFiles->files before sending to api (#43204)
* 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>
2021-08-17 12:31:25 -05:00
Tom
7ef9afcec4 Revert "fix(client): open curriculum links in new tabs (#43136)" (#43215)
This reverts commit 925891858c.
2021-08-16 19:19:23 +02:00
Shaun Hamilton
c2a11ad00d feat: add 'back/front end' in curriculum (#42596)
* 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>
2021-08-13 21:57:13 -05:00
Shaun Hamilton
e98d3dd3da fix(client): allow old local-storage code (#43196) 2021-08-13 13:15:50 -05:00
Shaun Hamilton
59f17f237b refactor: files{} -> challengeFiles[], and key -> fileKey (#43023)
* 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>
2021-08-12 20:48:28 +02:00
Tom
925891858c fix(client): open curriculum links in new tabs (#43136) 2021-08-12 09:02:57 +02:00
Nicholas Carrigan (he/him)
c8ec196dbc fix: scrollable nav (#42600)
* fix: scrollable nav

Modify the drop down menu to be scrollable.

* fix: account for really small screens
2021-08-11 18:17:21 +01:00
Nicholas Carrigan (he/him)
28003256c3 fix: restore navatar class (#43176) 2021-08-11 09:38:31 +02:00
Victor Duarte
7c6524186e refactor(client): docs, ts and test challenges (#42978)
* refactor(client): relocate to learn path tests file

* refactor(client): add docs for to learn path

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>

* fix: order imports

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-08-10 15:22:39 +02:00
Ahmad Abdolsaheb
b0b438a40f Revert "fix(client): remove wallets (#43159)" (#43163)
This reverts commit 5a4c02addd.
2021-08-09 16:39:48 -05:00
Ahmad Abdolsaheb
5a4c02addd fix(client): remove wallets (#43159) 2021-08-09 21:28:38 +03:00
Tom
0ae8b0c0e8 chore: clean-up unsed things in stripe integration (#43156)
* chore: clean-up unsed things in stripe integration

* fix: use logged in users email over email given to payment form
2021-08-09 21:27:14 +03:00
awu43
dd5d2919be feat(client): ts-migrate client/utils/** (#42823)
* rename js files

* update imports and references

* migrate build-challenges

* migrate challenge-types

* migrate utils/index

* migrate state-management

* install @types/psl for tags

* migrate tags

* migrate tags.test

* migrate challenge-page-creator

* migrate utils/gatsby/index

* migrate layout-selector

* migrate layout-selector.test

* revert challenge-types

Curriculum can't handle TS or modules

* convert arrow functions

* revert build-challenges

* revert utils/gatsby/index

* revert challenge-page-creator

* revert challenge-types reference

* Delete state-management

Deleted in #42960

* Disable render-result-naming-convention (for now)

* update layout-selector.test comment

* reorder imports in build-challenges

* change ts-ignore to ts-expect-error
2021-08-09 10:30:31 +02:00
Ahmad Abdolsaheb
b623c340a9 feat(client): add google pay (#43117)
* 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>
2021-08-08 23:22:25 +03:00
Sem Bauke
eccc642d83 fix(client): store accessibility for screenreaders (#42996)
* 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>
2021-08-06 14:17:17 +02:00
Tom
f0aeb3b267 fix(curriculum): rename rdbms cert project to proper name (#43042)
* fix:(curriculum): rename rdbms cert project

* fix: some more spots to rename

* fix: rename i18n's
2021-08-05 22:15:44 +01:00
awu43
4134404bfd feat(client): ts-migrate WithInstantSearch.js (#42923)
* rename to TS

* update import

* migrate with-instant-search

* change falsy values to empty string

* update import order

Finish resolving conflict from #41824

* update import order for search-bar

* update setTimeout() type
2021-08-05 21:00:30 +01:00
Tom
7b27821871 feat(curriculum): add icon for rdbms (#43109)
* feat(curriculum): add icon for rdbms

* fix: add better behaved icon
2021-08-04 13:22:58 -07:00
Nicolás Restrepo
e34ec814ef feat(client): migrate donate module to ts (#42561)
* change DonationTextComponent extension to tsx

* migrate DonationTextComponents to ts

* change DonationModal extension to tsx

* add @types/react-redux

* migrate DonationModal to ts

* change PaypalButton extension to ts

* change DonateCompletion extension to tsx

* migrate DonateCompletion to TypeScript

* change PayPalButtonLoader extension to tsx

* first changes in paypal button (help needed)

* first changes in PayPalButtonScriptLoader (help needed)

* change DonateForm extension to tsx

* migrate donate module to ts

* Update client/src/components/Donation/DonateForm.tsx

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

* Update client/src/components/Donation/DonationModal.tsx

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

* Update client/src/components/Donation/DonationModal.tsx

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

* Update client/src/components/Donation/DonateForm.tsx

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

* Update client/src/components/Donation/DonateForm.tsx

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

* Delete console.log client/src/components/Donation/DonationModal.tsx

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

* applied changes requested

* fix: readjust default one time amount

* fix types

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

* chore: restore comments.json

* fix: type assertion

* fix: specific DonateForm props

* Apply suggestions from code review

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

* Update client/src/components/Donation/PaypalButton.tsx

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

* fix:set default stat for paypalbutton

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2021-08-04 11:21:11 +01:00
Oliver Eyton-Williams
e118dda13a fix: order imports and remove circular dependencies (#41824)
* 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
2021-08-02 08:39:40 -05:00
Tom
826992fabf fix(client): open all certs in same tab (#43061) 2021-07-29 14:56:36 +03:00
Shaun Hamilton
47adbde90b feat(client): add multifile editor breadcrumbs (#42907)
* feat(client): add multifile editor breadcrumbs

* adjust margin

* update snapshot

* re-remove duplicate css

* adjust arrow colours

* update that pesky snapshot

* add title to editor jaw

* remove bolding, and center

* update snapshot
2021-07-28 17:29:11 +03:00
Shaun Hamilton
9731ea31b8 fix(client): fix i18n external locations in nav (#42995) 2021-07-28 07:31:07 +07:00
Oliver Eyton-Williams
49b4e1f2b3 fix: remove HOME_PATH (#43034)
It was only used as a default for hardGoTo, but that function is only
called once and does not need the default
2021-07-27 08:35:14 -07:00
Victor Duarte
a4358fc56c fix(client): update display prop on element (#42912)
* fix: profile menu icon overlapping content

* refactor: profile icon usage
2021-07-27 12:27:32 +03:00
Ahmad Abdolsaheb
9b401570bc fix(client): adjust big cta size (#43017) 2021-07-26 16:35:54 +01:00
Victor Duarte
80e75ea690 fix(client): remove odd snap of editor panels (#42990)
* fix(client): remove odd snap of editor panels

* fix(client): reduce set state calls
2021-07-25 14:41:22 +02:00
Victor Duarte
10511a7402 refactor(client): document and test create types utilities (#42960)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-07-24 23:24:08 +07:00
Shaun Hamilton
06b1e584f9 feat(client): add new coder survey link to learn (#42955)
* feat(client): add new coder survey link

* add translation key to all locales

* close i18n tags

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2021-07-23 08:03:25 +02:00
awu43
d98857069b feat(client): ESLint Fragments rule (#42963)
* add eslint rule

* Remove unused Fragment imports
2021-07-21 22:07:46 +01:00
Anirudh Modi
ef3b7ec955 chore(eslint): enables recommended eslint rules for testing-library and jest-dom (#42817) 2021-07-20 21:21:16 +07:00
Oliver Eyton-Williams
a368e7f277 fix: prevent early redirection from email-signup (#42944)
Co-authored-by: Victor Duarte <victor-duarte@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Victor Duarte <victor-duarte@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-07-20 09:19:11 -05:00
awu43
e33b977f04 update show-project-links (#42940) 2021-07-20 08:05:17 -05:00
Oliver Eyton-Williams
90d5783870 chore: update Header test to handle more languages (#42894) 2021-07-19 12:39:51 -07:00
Shaun Hamilton
31486b368b fix(client): refactor to use correct i18n t type (#42865)
* fix(client): refactor to use correct i18n t type

* appease Oliver by importing directly from react-i18n

* fix: use default TFunction type variable

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-07-19 09:48:02 -07:00
Ikko Ashimine
48257c80b5 fix(curriculum): typo in comment (#42914)
preceed -> precede
2021-07-17 12:34:31 +05:30
Oliver Eyton-Williams
1ba9d03cb5 feat: remove csrf from the client (#42242) 2021-07-16 10:49:47 -05:00