Commit Graph

59 Commits

Author SHA1 Message Date
2846df2b66 fix: fix util import statement (#45104)
Co-authored-by: IsmailTlemcani <ismail.tlemcani@gmail.com>
2022-02-24 08:16:47 -08:00
cacc4eacd7 fix: handle the sorting of transformed files (#44724)
* fix: handle the sorting of transformed files

We can't use the ext property, since that is transformed, but the
history is maintained.

* test: make solutions polyVinyls for sorting

* refactor: inline prepareChallenge

* refactor: make solutions polys in getChallenges

* fix: convert each solution to a poly

* fix: skip empty solutions

* fix: get challenge file history in client

* refactor: stop calling isPoly from the client

* fix: remove debug console.log

* refactor: remove unnecessary sorting step
2022-01-24 10:42:27 -08:00
8614db7a32 feat: enable new curriculum (#44183)
* feat: use legacy flag

chore: reorder challenges

fix: linter

revert: server change

feat: unblock new editor

fix: proper order

fix: 0-based order

fix: broke the order

feat: move tribute certification to its own block

feat: split the old projects block into 4

fix: put all blocks in order

chore: add intro text

refactor: use block, not blockName in query

fix: project progress indicator

* fix: reorder new challenges/certs

* fix: reorder legacy challenges

* fix: reintroduce legacy certs

* feat: add showNewCurriculum flag to env

* chore: forgot sample.env

* feat: use feature flag for display

* fix: rename meta + dirs to match new blocks

* fix: add new blocks to help-category-map

* fix: update completion-modal for new GQL schema

* test: duplicate title/id errors ->  warnings

* fix: update completion-modal to new GQL schema Mk2

* chore: re-order metas (again)

* fix: revert super-block-intro changes

The intro needs to show both legacy and new content.  We need to decide
which pages are created, rather than than what a page shows when
rendered.

* feat: move upcoming curriculum into own superblock

* fix: handle one certification with two superBlocks

* fix: remove duplicated intros

* fix: remove duplicate projects from /settings

* fix: drop 'two' from Responsive Web Design Two

* chore: rename slug suffix from two to v2

* feat: control display of new curriculum

* feat: control project paths shown on /settings

* fix: use new project order for /settings

This does mean that /settings will change before the release, but I
don't think it's serious.  All the projects are there, just not in the
legacy order.

* fix: claim/show cert button

* chore: remove isLegacy

Since we have legacy superblocks, we don't currently need individual
blocks to be legacy

* test: fix utils.test

* fix: verifyCanClaim needs certification

If Shaun removes the cert claim cards, maybe we can remove this entirely

* fix: add hasEditableBoundaries flags where needed

* chore: remove isUpcomingChange

* chore: v2 -> 22

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-12-20 12:36:31 -06:00
Tom
580a51f7a7 fix: simplify mobile layout tabs (#44431)
* fix: simplify mobile layout tabs

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


Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-12-15 13:52:44 +00:00
3b560deab6 refactor: stop spreading challenge over the node (#44499)
* refactor: stop spreading challenge over the node

Instead of creating a Gatsby node with id of challenge.id, we create a
single node field that has all the challenge data.

While this makes the GraphQL queries more verbose, it means we're free
to create multiple nodes with the same challenge.id.

* test: update time-line test for new GQL schema

* test: update mocks with new GQL schema
2021-12-14 12:11:20 -06:00
Tom
1c5d136add feat(client): add notes tab to project based curriculum (#44247)
* feat: add notes tab to project based curriculum

* feat: add console key to i18n

* feat: add reset to i18n

* fix: use translations in action-row

* fix: use hasEditableBoundaries as check for when to display instructions/editor-tabs

* fix: clean up notes components and use prism formatting

* feat: add notes to docs/how-to-work-on-challenges

* revert: unused code

* fix: lint errors?

* fix: lint errors

* fix: add notes to graphql schema

* fix: add notes to challenge schema

* fix: only display notes on project based

* fix: add env data back to mobile layout

* fix: prettify

* revert: notes

* fix: hide notes on mobile for non project based

* rename: switchDisplayTab -> togglePane

* revert: hasEditableBoundaries check back to projectBasedChallenge check
2021-12-09 18:42:03 +00:00
bb7893db8e feat: show project preview (#43967)
* feat: add data for preview to challengeMeta

* feat: allow creation of project preview frames

* feat: make project preview data available for frame

* refactor: simplify reducer

* feat: show project preview for first challenge

* feat: show project preview on MultiFile challenges

* test: check for presence/absence of preview modal

* fix: simplify previewProject saga

* test: uncomment project preview test

* fix: increase modal size + change modal title

* modal-footer

* feat: adjust preview size

* fix: remove margin, padding, and line-height for preview of finished projects

* Revert "fix: remove margin, padding, and line-height for preview of finished projects"

This reverts commit 0db11a0819.

* fix: remove margin on all previews

* refactor: use closeModal('projectPreview') for clarity

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

* fix: get started -> start coding!

* fix: update closeModal type

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-11-29 18:30:28 +00:00
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
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
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
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
3ed1f73221 fix(client): remove unnecessary return values (#42927)
* remove returns

* change .some() to .includes()
2021-07-19 13:18:17 +01:00
Tom
067761f2f6 feat(curriculum): add relational databases cert as upcoming change (#41658) 2021-06-15 16:37:13 +01:00
3875c6e619 fix: use env.json in both client and server (#42359) 2021-06-08 13:12:44 +01:00
7a8d6b2504 feat(client): add hashes to monaco workers (#42097) 2021-05-11 18:26:06 +05:30
27c8d564e4 fix(client): replace Stripe with PayPal (#41924)
* feat: remove stripe payment option from client

* feat: remove stripe completely

* fix: remove last Stripe remnants

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-05-03 11:45:23 +03:00
9be2fb9a10 fix: use lodash-es in the client (#41931) 2021-04-28 16:11:20 -05:00
d3f59e6d5d fix(dev): rename superBlock with v7 to certSlug (#41738)
* fix(dev): rename superBlock with v7 to slug

* improve name slug -> certSlug

* superBlockTitle -> superBlock

* correct teeny, tiny mistake

* fix: correct slug to certSlug in certLocation

* refactor currentCerts

* rename showCert cert -> certSlug and various
2021-04-23 22:29:17 +03:00
e91793b934 fix(client): polyfill path with path-browserify (#41615)
path is being used by webpack to transform imports into requires. Since
some challenges rely on this transformation, path has to exist in the
browser.
2021-03-27 19:19:30 +05:30
ad9b1f89d8 fix(api, client): update Gatsby, webpack & related things (#41452)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-03-25 12:13:43 -07:00
f8699a8d55 refactor: simplify challenge.block usage (#41185) 2021-02-23 09:52:48 +05:30
97fcaa693f refactor: only use dasherized superBlock (#41067) 2021-02-13 10:36:04 +05:30
bfc4c33b0c fix: remove unused PAYPAL_SUPPORTERS var (#40361) 2020-12-01 14:51:24 +01:00
ed2840cb1c refactor: use dashedName over dasherize(title) 2020-10-06 23:10:08 +05:30
c16785f74e fix(client): do not build Intro for missing blocks
This creates an empty page, but ideally it should be a 404
2020-09-16 11:54:14 +05:30
07cf7e3e72 fix(client): set custom schema
Necessary for the time being, as all the multi-file challenges are
upcoming (and thus hidden)
2020-09-16 11:54:14 +05:30
bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00
c772382d59 fix: remove remnants of servicebot
None of the code was still in use.
2020-09-04 00:14:24 +05:30
4a45b5ac1c fix: redirect /challenges/* to /learn/* 2020-09-01 11:35:44 +05:30
7155c87e8b fix: prevent dev tools from accessing state in prod (#38669)
* Fixed Redux dev tool plugin in production problem

* Update client/src/redux/createStore.js

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* Update client/src/redux/createStore.js

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* Update client/src/redux/createStore.js

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* Update client/src/redux/createStore.js

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* Fixed ESLint error

* Second try to fix linting issue

* Third try to fix lint issues

* Update client/src/redux/createStore.js

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

* Update client/src/redux/createStore.js

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

* fix: use env.json for ENVIRONMENT

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2020-08-20 01:22:59 +05:30
8350c517cc fix: revert explicit Gatsby schema (#39426)
The Gatsby schema was breaking the React challenges (for some reason)
this is a quick hotfix while I figure out what's going on.
2020-08-17 18:09:19 -07:00
64c969a908 fix: add explicit schema for hidden challenges 2020-08-16 04:45:19 +05:30
b4926052f4 chore: refactor and simplify testing (#39050) 2020-06-13 14:57:15 +05:30
fcef62d5de refactor(learn): use graphQL filter for Map (#38913) 2020-05-28 20:56:19 +05:30
48532d6ccb fix: hide isHidden challenges from hotkey nav 2020-05-25 16:25:19 +05:30
68aef571ee feat: hide isHidden challenges 2020-05-25 16:25:19 +05:30
35751bacf0 chore: remove rollbar from client and .env 2020-03-26 16:51:17 +05:30
c76978bdfe fix: prevent duplication of Monaco webpack plugin (#38131)
It seems that adding it during the 'build-html' stage meant it was
creating new, unminified, versions of the scripts and overwriting the
existing, minified, ones.
2020-02-06 14:24:00 +03:00
c660b389a8 fix(donate): handle missing stripe keys (#37847)
* fix: gracefully handle missing stripe keys

* fix: remove state updates from render (donate)
2019-11-30 01:41:31 +05:30
3c50f7651c fix: add rollbar keys 2019-10-16 13:07:57 +05:30
3cd0bf0106 fix: temporarily remove rollbar (#37333)
* fix: Temporarily remove rollbar

* Reverting changes to api-server
2019-10-16 12:20:56 +05:30
e72855dad3 fix: handle invalid Algolia keys gracefully in dev (#37088)
Invalid keys throw an error in production, but just cause invalid
PropTypes and build warnings in development.
2019-10-08 01:19:43 -07:00
9c2f1ffd82 refactor: combine slug utils into one module 2019-09-26 22:15:27 +05:30
7d52d9a3bb feat(client): lazy load Monaco editor 2019-09-04 18:56:06 +05:30
ac50216949 fix: NODE_ENV conflicts on pipelines 2019-08-19 01:37:32 +05:30
052769e69f chore(client): update gatsby 2019-08-17 18:35:21 +05:30
ae80f96ec3 fix(client): remove service workers 2019-08-14 19:23:27 +05:30
0124e7556d fix: removed all guide bits from gatsby 2019-07-26 19:40:46 +05:30
ebe420c099 feat(guide): add footer link to article source on GitHub
fix/suggested-changes
2019-05-02 15:30:39 -07:00
fc8c71ad16 feat: use eslint with prettier to format code 2019-02-19 14:30:27 +05:30