Commit Graph

30375 Commits

Author SHA1 Message Date
Oliver Eyton-Williams cf4b9a1557 feat: client overhaul proof of concept (#45844)
* chore: initial setup of web package

This is *not* a workspace, yet, because it would be nice to use the
latest React, but /client can't migrate (yet).

Having two React versions creates issues in workspaces since /.bin/next
gets hoisted to root... and finds the root React version :(

* feat: add config for next

* fix: use jsx-runtime for web linting

* chore: init curriculum-server with json-server

* chore: integrate curriculum-server with TS/eslint

* feat: add patch script

json-server doesn't like keys with '/'s in so, for now I'm just patching
them out.

This lets us keep a strong separation between this WIP and the rest of
the code.

* fix: use port 8000 to avoid conflicts

* feat: crude ISR demo using challenge pages

* feat: extend ISR demo to use params

* feat: return props for specific superblocks

* chore: re-organise folders

* refactor: put data fetching in a single module

* refactor: challenge page slightly

* feat: add link to test ISR

You can see that, if you run next dev, the linked page gets regenerated
whenever you navigate to it.  However, if you run next build that is no
longer the case and the page has to be reloaded for the user to see the
latest version.

The implication is that we'll need another method (Web worker, probably)
to detect if the page needs to be updated.

* feat: render static paths for rwd

* feat: add monaco Editor

* feat: send less data via props

Rather than sending superblocks, this now sends blocks. Next step, just
the challenge!

* fix: only send individual challenge's data

* feat: send /learn/stuff/<id> to the challenge page

* fix: redirect to path with trailing id

* fix: handle all possible path prefixes

* feat: add superblocks with trailing ids

* chore: rename block -> blockOrId

* chore: remove logs

* fix: return notFound if page id is missing

* chore: add a note about increasing TS strictness

* feat: serverside redirects

This should be a touch more performant, but mostly it separates the
concerns.

Since the server already has the responsibility of choosing what pages
to render, redirects fit naturally with its concerns.

* refactor: clean up param validation

* feat: create list of blocks in superblock

* feat: add challenge links to map

* feat: link to full path, not just id

* refactor: ensure props match getStaticProps

By specifying the props for GetStaticProps we ensure that it returns the
expected data and use InferGetStaticPropsType to get the type out again
for use in the component

* feat: improve and document dev experience

* refactor: separate routing from rendering

* refactor: extract routing logic into functions

* refactor: naming consistency

* refactor: move data wrangling into get-curriculum

* refactor: align blockOrId and id

* chore: remove the server from workspaces

* chore: remove the lock

* docs: paths

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

* chore: install before linting

* fix: create env.json before installing new client

* chore: ignore generated json file

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2022-05-09 11:30:15 -05:00
Huyen Nguyen fa59d4a107 chore(ui-components): simplify color tokens (#45848)
* chore: rename color tokens

* chore: clean up hover tokens

* docs: add a note on colors usage
2022-05-09 16:28:25 +03: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
Naveen f2580f58a6 chore: set permissions for GitHub actions (#45876)
* chore: Set permissions for GitHub actions

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>

* Update .github/workflows/codeql-analysis.yml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/labeler.yaml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/node.js-tests-upcoming.yml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/node.js-tests.yml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/codeql-analysis.yml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/labeler.yaml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

* Update .github/workflows/labeler.yaml

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>

Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
2022-05-08 15:17:44 +05:30
Renovate Bot 9586372bd8 fix(deps): update dependency @actions/core to v1.8.0 2022-05-08 06:00:10 +00:00
Renovate Bot 77dea01d90 chore(deps): update dependency rollup to v2.72.1 2022-05-08 03:17:10 +00:00
Renovate Bot cdc5d16139 chore(deps): update dependency @types/jest to v27.5.0 2022-05-08 00:33:24 +00:00
Renovate Bot e2e723dcca chore(deps): update dependency @rollup/plugin-node-resolve to v13.3.0 2022-05-07 22:55:32 +00:00
Renovate Bot 80fd6d8c7e chore(deps): update codesee to v0.253.0 2022-05-07 20:32:40 +00:00
Renovate Bot 8f35a6bc10 fix(deps): update dependency react-instantsearch-dom to v6.24.2 2022-05-07 18:06:21 +00:00
Renovate Bot d6191a5aee fix(deps): update dependency react-i18next to v11.16.9 2022-05-07 15:29:19 +00:00
Renovate Bot eeb93e85cc fix(deps): update dependency nanoid to v3.3.4 2022-05-07 12:11:17 +00:00
Ahmad Abdolsaheb e3bc038457 feat(donation): set donor cookie (#45808) 2022-05-07 14:53:01 +09:00
Renovate Bot 9a0b00090a chore(deps): update dependency autoprefixer to v10.4.7 2022-05-07 04:55:23 +00:00
Renovate Bot c131c4597c chore(deps): update dependency @types/react to v17.0.45 2022-05-07 02:13:37 +00:00
camperbot 965a902a2b chore(i18n,learn): processed translations (#45864) 2022-05-06 14:19:43 -03:00
camperbot 707f1a753c chore(i18n,docs): processed translations (#45863) 2022-05-06 07:42:25 -07:00
Ahmad Abdolsaheb 0ef633c373 feat: a/b test lock icon button (#45868) 2022-05-06 15:06:48 +02:00
Oliver Eyton-Williams 08b60ffb25 fix: hot reload (#45871) 2022-05-06 12:44:14 +01:00
Rafael D. Hernandez 5908f2c74c feat(i18n,esp):SciCompPy and DataAnalysisPy certs fully translated and proofread (#45870)
Co-authored-by: Rafael Hernandez <rafaeldavish@Rafaels-MacBook-Pro.local>
2022-05-06 13:40:22 +05:30
Tom f87608b8cc fix: update rwd example urls (#45869)
* fix: update rwd example urls

* fix: target=_blank not working

* Update curriculum/challenges/english/01-responsive-web-design/responsive-web-design-projects/build-a-tribute-page.md

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
2022-05-05 13:56:41 -07:00
Luke Harrison e4c6883a20 fix(curriculum): updated wording on understanding uninitialized variables (#45860)
* updated wording on understanding uninitialized variables

* updated wording for case b to match case a

* updated case c to match the wording of both case a and b
2022-05-05 19:05:30 +02:00
Karen Lowe ccce74ed6a fix(curriculum): typo lets -> let's (#45867)
Co-authored-by: Karen Lowe <klowe@ancestry.com>
2022-05-05 11:42:28 +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
Naomi Carrigan bc9634a799 feat: migrate to issue forms (#45858)
* feat: migrate to issue forms

* fix: validation errors

* feat: add description field
2022-05-04 12:25:39 -05:00
Renovate Bot d19a943c28 fix(deps): update dependency react-router-dom to v6.3.0 2022-05-03 21:58:27 +00: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
Ilenia 2a9b2b02fa fix(curriculum): fix tag and element usage in magazine project step 1 (#45856) 2022-05-03 11:23:13 -07:00
Huyen Nguyen ebf7186b44 chore: correct comments in github workflows files (#45855) 2022-05-03 11:23:02 -07:00
ozayman 1525963577 fix: grammar on doc theme documentation (#45854) 2022-05-04 00:58:38 +07:00
camperbot 548ba35699 chore(i18n,client): processed translations (#45839) 2022-05-03 18:07:07 +02:00
camperbot 763275e4f1 chore(i18n,learn): processed translations (#45851) 2022-05-03 18:06:49 +02:00
camperbot 8dc59005a2 chore(i18n,docs): processed translations (#45850) 2022-05-03 18:06:24 +02:00
Huyen Nguyen cf68bd0efd chore(ui-components): rename HelpBlock files to kebab-case (#45849) 2022-05-03 07:07:08 -07:00
Sem Bauke 0895925520 chore: certification test to TypeScript (#45847)
* chore: cerfication test to TypeScript

* fix: add types
2022-05-03 15:51:04 +02:00
Renovate Bot 54e0d121ac fix(deps): update dependency react-instantsearch-dom to v6.24.0 2022-05-03 05:00:39 +00:00
Renovate Bot 9b34571f79 fix(deps): update dependency @actions/core to v1.7.0 2022-05-03 02:17:55 +00:00
Renovate Bot 296b9b9dda chore(deps): update dependency rollup to v2.71.1 2022-05-02 22:13:03 +00:00
Oliver Eyton-Williams 534cc151d1 fix: resolve conflict between clients (#45837)
npm was confusing the two due to the name clash
2022-05-02 19:39:38 +01:00
TrshDesigns 1ec38d51ce fix(curriculum): incorrect hint (#45843)
The hint didn't match the requested value
2022-05-02 19:31:41 +02:00
camperbot 7011cfdd59 chore(i18n,learn): processed translations (#45840) 2022-05-02 08:54:57 -07:00
Sem Bauke c3be968092 feat: migrate locale test to ts v2 (#45793)
* feat: migrate locale test to ts v2

* fix: langCodes

* fix: locale test

* fix: nav dropdown

* fix: header test

* fix: use type predicates

* refactor: DRY up all-langs

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2022-05-02 17:53:30 +02:00
camperbot e4bdc3eacd chore(i18n,docs): processed translations (#45838) 2022-05-02 08:26:38 -07:00
Sem Bauke c41687fa7e chore: convert error test to TypeScript (#45841) 2022-05-02 08:19:55 -07:00
Kas 2462feb4c0 fix(curriculum): change example to valid HTML (#45783)
* Updated HTML tag for English version issue #45765

* Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/define-the-head-and-body-of-an-html-document.md

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>

Co-authored-by: Krzysztof G. <60067306+gikf@users.noreply.github.com>
2022-05-02 14:51:47 +02:00
Renovate Bot 3f9f9d4c3a fix(deps): update dependency express to v4.18.1 2022-05-02 11:22:06 +00:00
Renovate Bot 2bbf0de925 chore(deps): update dependency eslint-plugin-react-hooks to v4.5.0 2022-05-02 04:55:24 +00:00
Renovate Bot 69762e5208 chore(deps): update dependency @types/node to v16.11.33 2022-05-02 01:27:50 +00:00