Commit Graph

390 Commits (4e59659a00d640c3439d7a83e7605595b9344fe3)

Author SHA1 Message Date
Tom b061a760c1
feat: add framework for rwd cert projects (#44505)
* feat: add rwd cert projects

feat: save projects with flag

revert: not needed things

revert: empty line

revert: empty line

fix: it

fix: remove log

* fix: snapshot tests

* fix: show bread crumbs by default

* revert: snapshot fix

* Update curriculum/challenges/_meta/responsive-web-design-projects/meta.json

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

* fix: manuallyApproved -> isManuallyApproved

* fix: add review suggestions

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-01-06 13:26:54 +00:00
Oliver Eyton-Williams a726dd381f
fix(client): prevent data url render (#44658)
* fix: only render profile urls

* feat: warn user when submitting data url

* fix: prevent dataurls being saved to db

* fix: tests and imports

Not sure why jest didn't like the es imports, but they aren't necessary
so I dropped them.

* fix: check for url protocol
2022-01-04 11:05:40 +05:30
Nicholas Carrigan (he/him) 42acc542b7
fix: handle uppercase and missing user verification (#44444)
* fix: hotfix for isHonest null

* fix: early return if no user?

* fix: handle invalid input on api

Also lowerCases the username it receives since the client could send any
case.

* fix: report errors to user when verification fails

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-12-10 11:23:26 +00:00
Nicholas Carrigan (he/him) 8372623f69
chore(curriculum): fix + test curriculum order (#44366)
* chore(tools): test curriculum order

* chore: update orders

* fix(tests): temporarily ignore cert super

The Relational Databases cert being 'upcomingChanges' is breaking
the tests.

* fix: graphql query here

* fix: use only one meta

* chore: remove unnecessary superOrders

* chore: zero-based indexing

* fix: update mock

* refactor: remove unused fixture

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-12-06 16:55:13 +00:00
Oliver Eyton-Williams 03309bea9e chore: remove old package-locks 2021-12-02 19:57:47 +05:30
AndreiD049 67d0061aa1
fix: getting of fallback issued date for fullstack certificate (#43977) 2021-11-25 06:37:34 +00:00
Tom f0698aa517
feat(client,api): add user tokens and route for submitting coderoad tutorials (#43304)
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-11-17 19:49:24 +05:30
Valeria 753ea937ea
feat: Allow display username with uppercase characters (#43667)
* feat: Allow display username with uppercase characters

* fix: ensure user can change username to uppercased version

* fix: ensure that same username in a different case does not require validation
2021-11-04 11:18:40 +01:00
Ahmad Abdolsaheb 9179b2fc55
feat: add stripe authentication support (#44060)
* feat: add stripe authentication support

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-11-03 10:32:03 -07:00
Mrugesh Mohapatra 0b79725a9e
chore(deps): apply npm audit fix on all packages (#44108)
chore(deps): apply npm audit fix on all packages
2021-11-03 16:26:50 +05:30
Mrugesh Mohapatra 466f39794b chore: update all lockfiles to v2 2021-11-03 15:06:19 +05:30
Mrugesh Mohapatra 6fef483946 chore: update all packages to node v16 & npm v8 2021-11-03 15:06:19 +05:30
Micah Silverman 2b5c1ed712
chore(deps): updated versions to address vulnerabilities (#44075) 2021-11-02 15:55:05 +05:30
Nicholas Carrigan (he/him) 07bfe87419
feat: add campfire mode (#42663)
* feat: add campfire mode

fix: resolve lint issues

feat: add sound to editor

fix: restore flash messages

fix: linter issues

fix: obey sound setting

Update the editor to obey the camper's sound setting.

chore: apply suggestions from code review

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

fix: use @types/store

fix: linter issues

feat: simplify sound saga

Update client/src/redux/sound-mode-saga.js

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

fix: missing bracket

chore: use new s3 bucket

fix: lint

fix: import only needed bits

fix: remove from navbar

(was intermittently broken here anyway)

fix: dynamic imports?

fix: more dynamic imports

fix: tweak theme logic

chore: boolean | undefined

fix: dns

fix: no hammer local storage

* chore: apply oliver's review suggestions

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

* fix: lost an import

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-10-27 17:50:29 -05:00
AndreiD049 a07a16b38b
fix: added possibility to revert back to default profile picture (#43962)
* added possibility to revert to default profile picture

* removed required from picture input

* remove addPlaceholderImage and replaced with empty string

* added test for empty string to avatar-renderer
2021-10-25 21:06:32 +02:00
Mrugesh Mohapatra 0a3ce84e5a chore(api): update non-semver axios 2021-10-25 22:49:46 +05:30
Mrugesh Mohapatra 9780533fa4 chore(api,deps): housekeeping for patch updates 2021-10-25 22:49:46 +05:30
RobertoMSousa cb0a502d82
chore: tree shaking - unused / redundant code (#43867) 2021-10-15 13:13:43 +05:30
Oliver Eyton-Williams c8d7f0a782
feat(tools): remove eslint-plugin-prettier for prettier (#42438)
* 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
2021-10-06 21:02:21 +05:30
Eric Cheng 2ba536d559
refactor: enforce consistent camelCase in const names, add comments, condense multiple single-line comments into one multi-line comment (#43699) 2021-10-04 19:15:44 +05:30
Sem Bauke cd8a71c56d
fix: wrong flash message when changing email (#43653) 2021-10-01 23:04:54 +05:30
Ahmad Abdolsaheb cf309b5349
fix: optionally add name to customer creation (#43486) 2021-09-20 09:56:42 +02:00
Ahmad Abdolsaheb e5523bf16e
feat: add Stripe card form (#43433)
* eat: add Stripe card form

* Apply suggestions from code review

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

* feat: adjust payload and error handling

* feat:  readjust error handling

* Apply suggestions from code review

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

* feat: refactors from comments

* feat: prevent submition during processing

* feat: redefine isSubmitting

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

* fix: show the proper paypal button on donate page

* fix: handle errors from stripe

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
2021-09-17 22:15:56 +03:00
Mrugesh Mohapatra 4dba98eca9 chore(deps): npm audit fix - api-server 2021-08-31 21:38:48 +05:30
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
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
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
Tom fcadd534e7
fix: stripe issues (#43152) 2021-08-09 11:02:58 +03:00
Tom 8dec120c19
fix(api-server): server not responding for stripe call (#43149) 2021-08-08 19:47:33 -05: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
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
Oliver Eyton-Williams 1ba9d03cb5
feat: remove csrf from the client (#42242) 2021-07-16 10:49:47 -05:00
Shaun Hamilton 6ca6d9950c
feat(client): improve SuperBlock cert claiming UX (#41147)
* feat(client): improve SuperBlock cert claiming UX

* broken: add certCard foundation

* broken: add TODO comments for scatter-brain

* restructure stepsToClaimSelector

* add api-server verifyCanClaimCert logic

* temp: correct verifyCanClaim URL

* move GET logic to CertificationCard, remove console.logs

* add error handling, and navigation logic

* correct verification logical flow

* fix completion-epic updates, fix cert verify

* update widget to button, disable button unless verified

* working: refactor CertChallenge with hook state

* add StepsType

* update Honesty snapshot

* add DonationModal to SuperBlockIntro

* disable Claim Cert button unless also isHonest

* prevent warning when viewing cert

* test: use navigate in Modal to return to hash

* test: replace gatsby.navigate with reach/router.navigate

* add propTypes

* fix: rename propTypes -> prop-types

* use react-scrollable-anchor to squash modal bug

* update location parser type

* open-source Oliver's suggestion

* fix superblock title

* add claim-cert-from-learn tests

* use larger tests

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

* fix some cypress stuff

* fix ShowCertification cypress test

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-07-15 23:51:27 +09:00
Oliver Eyton-Williams 92d7ae1725
fix(client): remove extra slash when redirecting to client (#42588)
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2021-07-12 13:54:54 +05:30
Renovate Bot 7c2a4aff6e
chore(deps): update dependency jest to v27 2021-07-06 19:01:17 +05:30
Mrugesh Mohapatra adc09ec180 chore: apply npm audit fix to all packages 2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra 9015ad3151 chore(api): update deps - major - @sentry/node 2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra faa9996681 chore(api): update deps - minor 2021-06-28 19:00:55 +05:30
Mrugesh Mohapatra ba3a3f60e1 chore(api): update deps - patch 2021-06-28 19:00:55 +05:30
Ahmad Abdolsaheb b3f2c64de8
fix(client): remove algolia and hot keys modules from landing pages (#42394)
* fix(client): remove algolia and hot keys from landing pages

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-06-24 12:50:36 +03:00
Huyen Nguyen 2c16234853
chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00
Nicholas Carrigan (he/him) 7857c3932b
fix: signout redirect (#42538)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-06-17 23:54:18 +05:30
Oliver Eyton-Williams a555e013a0
refactor: remove unused env vars (#42500) 2021-06-15 09:57:10 -07:00
gikf bc9e8a69de
fix(client): display legacy certs like current ones (#42038)
* fix: display legacy certs like the current ones

* fix: link projects in legacy certs to project pages

* fix: update tests to changed legacy cert display

* fix: update tests for removed legacy certs forms

* fix: display legacy certs like the current ones

* fix: submit projects for cert on projects pages

* fix: remove legacy certs form submitting handling

* fix: move claiming cert setup before both tests

* fix: remove legacy cert update props and actions

* fix: remove legacy cert updates from api

* fix: correct merge conflict
2021-06-11 17:06:46 +01:00
Mrugesh Mohapatra 2db594d318 chore: apply npm audit:fix 2021-06-08 21:16:56 +05:30
Oliver Eyton-Williams 3875c6e619
fix: use env.json in both client and server (#42359) 2021-06-08 13:12:44 +01:00
Oliver Eyton-Williams 7b65909522
feat: make api only return json (#42320)
* fix(api): return json for delete + reset-progress

* refactor(api): make .json calls explicit

These .send() calls had objects as arguments. Using .json() makes it
explicit without changing behaviour.

* fix: return json or redirectWithFlash

We should never be getting requests for plain text, but if we do they
should be redirected back to the client.

* fix: prioritize JSON responses

If accepted, respond with JSON.  If not, it's probably a bad request.
2021-06-05 13:20:40 +01:00
Oliver Eyton-Williams 802273cf8a
refactor: remove sinon (#42337) 2021-06-02 21:03:05 +05:30
Oliver Eyton-Williams 2648f75df6
fix: remove redundant babel plugin (#42234)
@babel/plugin-proposal-class-properties is now included in preset-env
2021-05-24 13:30:09 -07:00
Mrugesh Mohapatra 6d8baddec0
chore: update api deps, apply npm audit fix (#42179)
* chore(api): bump minor and patch

* chore: apply npm audit fix across deps
2021-05-18 22:39:26 +05:30