Skip to content

fix(curriculum): allow optional final css semi-colon - #43545

Merged
ShaunSHamilton merged 4 commits into
freeCodeCamp:mainfrom
jamesgeer:#43536
Sep 23, 2021
Merged

ShaunSHamilton merged 4 commits into
freeCodeCamp:mainfrom
jamesgeer:#43536

Conversation

@jamesgeer

@jamesgeer jamesgeer commented Sep 23, 2021 •

Copy link
Copy Markdown
Contributor

Checklist:

  • I have read freeCodeCamp's contribution guidelines.
  • My pull request has a descriptive title (not a vague title like Update index.md)
  • My pull request targets the main branch of freeCodeCamp.
  • I have tested these changes either locally on my machine, or GitPod.

Closes #43536

I've added a test case to make sure the css selector is still a div, and made the final semi-colon for "margin-auto" optional as long as there is a final curly brace.

You will not pass if you write "margin: auto" outside of the css selector.

I did try to combine the regex to check that it was a div selector AND contained the margin-auto, but I couldn't get a working solution so this is why I have two test cases.

And let me know if you have any tips or comments, I'm still new to commiting to open source so I'm very much a newbie!

With semi-colon:
Screenshot 2021-09-23 at 01 49 23

Without semi-colon:
Screenshot 2021-09-23 at 01 48 39

EDIT: I've replaced the regex with CSSHelp. Thank you @gikf

EDIT: I should be committing only 3bf99a5 and f99bbc5 from my #43536 branch, but I see "9" commits, please let me know if I've made a mistake (🤞hopefully I haven't!)

@gitpod-io

gitpod-io Bot commented Sep 23, 2021

Copy link
Copy Markdown

@github-actions github-actions Bot added the scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. label Sep 23, 2021

@gikf gikf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jamesgeer,

additional commits are due to basing new branch off modified main branch. That's why making changes on the main branch of fork can complicate things in future. Step 2 at https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally?id=making-changes-locally has some information how to get main branch of fork back in sync with the freecodecamp/main.
It'd be best to remove commits not belonging in this PR from it. Let us know if you'd need more detailed help with resolving this.

As for the change, @ShaunSHamilton suggested using the CSSHelp helper for it. That would allow getting rid of the regex check and wouldn't require adding additional test.

@jamesgeer

jamesgeer commented Sep 23, 2021 •

Copy link
Copy Markdown
Contributor Author

Hi @gikf,

It looks like my pr didn't go as I had planned. I've read the link and have now synced my main fork with freeCodeCamps, thank you for the information regarding this. My question is, how do I remove these extra commits from my pr? I tried performing a git rebase but only the two commits appear.

And I've looked into the CSSHelp and that looks much better than the Regex! Once I have this PR fixed (with your help!) I'd like to remove the Regex and use a CSSHelp solution.

@jamesgeer

jamesgeer commented Sep 23, 2021 •

Copy link
Copy Markdown
Contributor Author

I've replaced the regex with cssHelp. I don't know why I spent so long trying to get a regex solution working. 🤦

Also let me know if my commits/changes are ok. It should only be 3 commits with 1 file modified but I think the changes I made in my last pr are being committed too, even though this is a separate branch to those changes.

@ShaunSHamilton ShaunSHamilton changed the title Fix for issue: #43536 Final CSS propery semi-colon should be optional fix(curriculum): allow optional final css semi-colon Sep 23, 2021

@ShaunSHamilton ShaunSHamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the linter would catch this sort of thing 🧐


For future PRs, I recommend reading our Contributor's Docs - How to Open a PR for commit and PR naming convention, as well as how to rebase your branch to fix the issues with accidental commits/changes.

If you are still stuck, please reach out on the contributors Chat

@gikf

gikf commented Sep 23, 2021

Copy link
Copy Markdown
Member

@jamesgeer one way would be doing interactive rebasing to the one commit prior to the first unwanted commit, leaving just commits wanted for this PR. Looking at https://github.com/jamesgeer/freeCodeCamp/commits/#43536, that would be cf98d8b commit, so:
git rebase -i cf98d8b

In the opened editor drop all commits that you don't want to keep, leaving for picking:

replaced regex with CSSHelp
accidentally left a "y" at the end of the sentence
fix for issue: #43536, final css property optional semi-colon

After that only curriculum/challenges/english/01-responsive-web-design/applied-visual-design/center-an-element-horizontally-using-the-margin-property.md should be edited and you can push to the PR branch, to reflect that on page. Because it changes pushed history, you will need to use the --force option, but that's okay here.
git push --force origin <pr-branch>

@jamesgeer

jamesgeer commented Sep 23, 2021 •

Copy link
Copy Markdown
Contributor Author

Thank you @gikf for taking the time to help me out :) I've been stress reading git commands to try and fix this pr!

Would you be able to verify that my commits and changes are now in order? 🤞

@gikf

gikf commented Sep 23, 2021

Copy link
Copy Markdown
Member

Thank you @gikf for taking the time to help me out :) I've been stress reading git commands to try and fix this pr!

Would you be able to verify that my commits and changes are now in order?

Not yet, if you take a look at the https://github.com/freeCodeCamp/freeCodeCamp/pull/43545/files, there's still change in the other file, and https://github.com/freeCodeCamp/freeCodeCamp/pull/43545/commits show unwanted commits. Did you follow the instructions on your local branch?

@jamesgeer

Copy link
Copy Markdown
Contributor Author

Thank you @gikf for taking the time to help me out :) I've been stress reading git commands to try and fix this pr!
Would you be able to verify that my commits and changes are now in order?

Not yet, if you take a look at the https://github.com/freeCodeCamp/freeCodeCamp/pull/43545/files, there's still change in the other file, and https://github.com/freeCodeCamp/freeCodeCamp/pull/43545/commits show unwanted commits. Did you follow the instructions on your local branch?

Sorry about that, I misunderstood how the rebasing worked. I was writing "drop" next to the commits rather than deleting them. But I think I've finally cracked it now!

@gikf

gikf commented Sep 23, 2021

Copy link
Copy Markdown
Member

Sorry about that, I misunderstood how the rebasing worked. I was writing "drop" next to the commits rather than deleting them. But I think I've finally cracked it now!

Yeah, both replacing pick with drop, and removing the line with commit, should work. Either way - looks good now! 🚀

@gikf gikf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ShaunSHamilton ShaunSHamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM 👍

@ShaunSHamilton
ShaunSHamilton merged commit 77b8405 into freeCodeCamp:main Sep 23, 2021
@ShaunSHamilton

Copy link
Copy Markdown
Member

Thank you, for your contribution to the page! 👍
We are happy to accept these changes, and look forward to future contributions. 🎉

@jamesgeer
jamesgeer deleted the #43536 branch September 23, 2021 22:14
rawatrahul added a commit to rawatrahul/freeCodeCamp that referenced this pull request Oct 2, 2021
* chore(deps): update dependency eslint-plugin-react to v7.25.0

* chore(deps): update dependency tailwindcss to v2.2.9

* chore(deps): update dependency eslint-plugin-react to v7.25.1

* chore(deps): update typescript-eslint monorepo to v4.30.0

* chore(deps): update dependency mongodb to v3.6.12

* chore(deps): update codesee to v0.74.0

* chore(deps): update dependency markdownlint to v0.24.0 (freeCodeCamp#43271)

Co-authored-by: Renovate Bot <[email protected]>

* fix(deps): update dependency i18next to v20.5.0

* fix(i18n/curriculum): rename rdbms files across rest of languages (freeCodeCamp#43349)

* rename: i18n rdbms challenge files

* fix: adjust frontmatter to match

* fix(typo/docs): certficate to certificate (freeCodeCamp#43348)

* chore(deps): npm audit fix - api-server

* chore(deps): npm audit fix - client

* chore(deps): npm audit fix - root

* chore(deps): npm audit fix - tools

* chore(i18n,curriculum): update translations (freeCodeCamp#43332)

* fix(deps): update gatsby monorepo

* chore(deps): update dependency mongodb to v3.7.0

* fix(deps): update dependency i18next to v20.6.0

* chore(i18n,docs): processed translations (freeCodeCamp#43360)

chore(i18n,docs): processed translations

* chore(deps): update node.js to v14.17.6 (freeCodeCamp#43352)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update dependency gatsby-plugin-webpack-bundle-analyser-v2 to v1.1.25

* chore(deps): update codesee to v0.75.0

* feat(client):add july 2021 footer

* Update client/i18n/locales/english/trending.json

Co-authored-by: Shaun Hamilton <[email protected]>

* chore(deps): update dependency webpack to v5.51.2

* chore(deps): update codesee to v0.76.0

* chore(deps): update dependency start-server-and-test to v1.14.0

* chore(deps): update codesee to v0.77.0

* chore(deps): update babel monorepo to v7.15.4

* chore(deps): update dependency autoprefixer to v10.3.4

* chore(i18n,curriculum): processed translations (freeCodeCamp#43361)

* chore(client): meta and yml certificate -> certification (freeCodeCamp#43353)

* chore(client): meta and yml certificate -> certification

* make translators lives more difficult - rename everything

* chore(deps): update dependency webpack to v5.52.0

* chore(deps): update storybook monorepo to v6.3.8

* chore(deps): update codesee to v0.78.0

* chore(deps): update babel monorepo to v7.15.5

* chore(i18n,learn): update translations (freeCodeCamp#43386)

* chore(i18n,curriculum): update translations (freeCodeCamp#43375)

* chore(deps): update dependency eslint-plugin-testing-library to v4.12.1

* chore(deps): update dependency acorn to v8.5.0

* fix(deps): update dependency node-fetch to v2.6.2

* chore(deps): update typescript-eslint monorepo to v4.31.0

* chore(deps): update dependency tailwindcss to v2.2.10

* chore(deps): update dependency tailwindcss to v2.2.11

* chore(i18n,curriculum): processed translations (freeCodeCamp#43390)

* fix: button width and text not matching (freeCodeCamp#43380)

* fix: remove stray files (freeCodeCamp#43376)

* chore(i18n,docs): processed translations (freeCodeCamp#43374)

* fix(tools): correct files -> challengeFiles (freeCodeCamp#43385)

* feat(curriculum): css picasso painting (freeCodeCamp#42436)

* feat: generating steps

- Steps 1-32 done.
- Steps 33-80 done.
- Instructions 1-26 done.
- Instructions 27-61 done.
- More steps.
- Instructions 62-88 done.
- Clarify instructions for new concepts.
- build fixes
- Audit instructions on live site.

* fix: add helpCategory

* feat: write tests

* feat: add intro

* chore: use the right selectors

Co-authored-by: gikf <[email protected]>

* chore: cannot read property Shaun of undefined :)

Co-authored-by: Shaun Hamilton <[email protected]>

* feat: Shau-ptional chaining

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <[email protected]>

* fix: uncross my wires

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <[email protected]>

Co-authored-by: gikf <[email protected]>
Co-authored-by: Shaun Hamilton <[email protected]>

* chore(deps): update codesee to v0.79.0

* fix(client): avoid calling the api for signed out users (freeCodeCamp#42383)

* feat(client): call api for singed in paypal subs

* feat(client): update tests

* feat(client): add kebab case

* fix: clarify tests

* chore(deps): update dependency tailwindcss to v2.2.12

* chore(deps): update dependency jest to v27.1.1

* fix(deps): update dependency i18next to v20.6.1

* chore(i18n,client): processed translations (freeCodeCamp#43404)

* chore(deps): update dependency @testing-library/dom to v8.3.0 (freeCodeCamp#43399)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update dependency tailwindcss to v2.2.14

* chore(deps): update dependency remark-html to 13.0.2 [security] (freeCodeCamp#43400)

Co-authored-by: Renovate Bot <[email protected]>

* fix(deps): update dependency react-i18next to v11.12.0

* chore(deps): update codesee to v0.80.0

* fix(deps): update dependency sanitize-html to v2.5.0

* fix: typo in problem 260 (freeCodeCamp#43418)

* fix(curriculum): typo in parsing html and saving data challenge (freeCodeCamp#43416)

* chore(deps): update dependency eslint-plugin-testing-library to v4.12.2

* feat: enable translated certs (freeCodeCamp#43397)

* chore(deps): update dependency prettier to v2.4.0

* chore(i18n,learn): update translations (freeCodeCamp#43421)

* chore(deps): update dependency axios to v0.21.2 [security] (freeCodeCamp#43409)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update codesee to v0.81.0

* chore(deps): update dependency serve to v12.0.1

* chore(deps): update babel monorepo to v7.15.6 (freeCodeCamp#43424)

Co-authored-by: Renovate Bot <[email protected]>

* fix: conflicting info updated (freeCodeCamp#43394)

* chore(deps): npm audit fix - root

* chore(deps): npm audit fix - tools

* chore(deps): update dependency tailwindcss to v2.2.15

* chore(deps): update dependency webpack to v5.52.1

* feat(curriculum): CSS Box Model project (freeCodeCamp#42182)

* feat(curriculum): add initial steps

Add the initial step files for this project.

* feat(curriculum): write test texts

Add some test text (tests coming soon).

* feat: tests for HTML bits

Add tests for the HTML bits - CSS holding off until parser lands.

* feat: CSS tests

New CSS parser works great!

* fix: link href

Fix the href in the boilerplate.

* chore: apply suggestions from code review

Co-authored-by: gikf <[email protected]>

* fix: clarify link element

* fix: optional chaining

* fix: remove unused meta props

* fix: update helper and fix tests

* chore: apply tom's review suggestions

Co-authored-by: Tom <[email protected]>

* chore: no console logs

Co-authored-by: Shaun Hamilton <[email protected]>

* feat: intro

Add introductory text, tweak instructions a bit.

Co-authored-by: gikf <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: Shaun Hamilton <[email protected]>

* chore(deps): update dependency @testing-library/dom to v8.5.0

* chore(deps): update dependency @testing-library/react to v12.1.0

* chore(deps): update dependency eslint-plugin-jest-dom to v3.9.2

* chore(deps): update dependency @types/lodash-es to v4.17.5

* chore(deps): update dependency jest to v27.2.0

* chore(i18n,curriculum): processed translations (freeCodeCamp#43435)

* fix(curriculum): specify array is returned from the function  (freeCodeCamp#43425)

* (fix)Sort an array alphabetically using the sort Method - Array is returned from the function freeCodeCamp#43417

* (mod)Curriculum - Adding explicit instructions so that function will return a sorted array freeCodeCamp#43417

* (fix)Curriculum - Correcting grammetic error in instructions freeCodeCamp#43417

* mod: updated transaltion message freeCodeCamp#43417

* fix: Curriculum - Updated grammatical error in instructions freeCodeCamp#43417

Co-authored-by: Vama Mehta <[email protected]>

* feat(curriculum): add piano project (freeCodeCamp#43364)

* feat: i broke it horribly

* fix: background colour first

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <[email protected]>

* fix: missing asserts

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <[email protected]>

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <[email protected]>

* fix: remove extra background

* fix: meta order

* feat: clarify descriptions

Co-authored-by: Shaun Hamilton <[email protected]>

* chore(i18n,client): processed translations (freeCodeCamp#43442)

* chore(deps): update typescript-eslint monorepo to v4.31.1

* chore(deps): update codesee to v0.82.0

* chore(deps): update codesee to v0.83.0

* chore(i18n,learn): update translations (freeCodeCamp#43455)

* fix(deps): update dependency sanitize-html to v2.5.1

* chore(deps): update dependency mongodb to v3.7.1

* chore(deps): update codesee to v0.84.0

* chore(deps): update codesee to v0.85.0

* chore(deps): update codesee to v0.87.1

* chore(deps): update dependency prettier to v2.4.1

* chore(deps): update dependency prismjs to v1.25.0

* chore(deps): update dependency @types/react-transition-group to v4.4.3

* fix(deps): update dependency gatsby to v3.13.1

* chore(deps): update dependency webpack to v5.53.0

* chore(deps): update codesee to v0.89.0

* fix(deps): update dependency date-fns to v2.24.0

* chore(i18n,learn): update translations (freeCodeCamp#43476)

* feat(client): migrate to ts - (HelpModal, Preview, VideoModal, Side-Panel) (freeCodeCamp#42857)

* refactor: migrate HelpModal, Preview, VideoModal, Side-Panel

* refactor: import order

Co-authored-by: Oliver Eyton-Williams <[email protected]>

* feat: add Stripe card form (freeCodeCamp#43433)

* eat: add Stripe card form

* Apply suggestions from code review

Co-authored-by: Shaun Hamilton <[email protected]>

* feat: adjust payload and error handling

* feat:  readjust error handling

* Apply suggestions from code review

Co-authored-by: Oliver Eyton-Williams <[email protected]>
Co-authored-by: Shaun Hamilton <[email protected]>

* feat: refactors from comments

* feat: prevent submition during processing

* feat: redefine isSubmitting

Co-authored-by: Oliver Eyton-Williams <[email protected]>

* fix: show the proper paypal button on donate page

* fix: handle errors from stripe

Co-authored-by: Shaun Hamilton <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>
Co-authored-by: moT01 <[email protected]>

* fix(deps): update gatsby monorepo

* chore(deps): update dependency mock-fs to v5.1.0

* chore(deps): update babel monorepo to v7.15.7

* fix(curriculum): reworded grammar to do without hyphen (freeCodeCamp#43487)

Suggesting the removal of "-" on line 29 in the description, as the comma before "such" is sufficient to separate the examples from the rest of the sentence.

* chore(deps): update codesee to v0.90.0

* chore(i18n,curriculum): update translations (freeCodeCamp#43463)

* chore(i18n,learn): update translations (freeCodeCamp#43489)

* chore(i18n,learn): update translations (freeCodeCamp#43492)

* chore(i18n,docs): update translations (freeCodeCamp#43488)

* chore(i18n,curriculum): update translations (freeCodeCamp#43493)

* chore(deps): update dependency eslint-plugin-react to v7.25.3

* chore(deps): update dependency eslint-plugin-testing-library to v4.12.3

* fix: optionally add name to customer creation (freeCodeCamp#43486)

* fix: message removed when not logged in (freeCodeCamp#43411)

* fix: message removed when not logged in

* removed unnecessary code from DonateCompletion.tsx that was added

* now using isSignedIn in props and not donationFromState

* Add CodeSee architecture diagram workflow to repository (freeCodeCamp#43501)

Co-authored-by: codesee-architecture-diagrams[bot] <86324825+codesee-architecture-diagrams[bot]@users.noreply.github.com>

* chore(deps): update dependency jest to v27.2.1

* feat(Cypress): hotkey tests (freeCodeCamp#43434)

* feat(Cypress): hotkey tests

* fix: test previous next for projects

* fix: link time-out firefox

* feat: test the "r" hotkey

* fix: change select back to body for now

* fix: retain navigation mode for video challenges

* test: find focused elements

* fix: move focus from panel before pressing 'r'

Co-authored-by: gikf <[email protected]>

* test: add hotkey test for backend

* test: remove redundant {esc} presses

* refactor: naming change

* fix: refactor properly

* fix: actually refactor it properly

Co-authored-by: gikf <[email protected]>

Co-authored-by: Oliver Eyton-Williams <[email protected]>
Co-authored-by: gikf <[email protected]>

* chore(deps): update typescript-eslint monorepo to v4.31.2

* chore(deps): update codesee to v0.92.1

* fix(deps): update dependency node-fetch to v2.6.3

* chore(deps): update dependency eslint-plugin-react to v7.26.0

* feat(actions): remove codesee map from renovate prs (freeCodeCamp#43506)

* refactor(client): migrating ActionRow.js to TypeScript (freeCodeCamp#43490)

* fix: consistency of writing in readme.md (freeCodeCamp#43497)

Use standard and consistent letters
é to e
’ to '

* refactor: minor clean up of editor (freeCodeCamp#43513)

* test: ignore ChunkLoadError (freeCodeCamp#43512)

They only seem to occur during testing at the moment.  If we get a user
report, we can investigate, but until then they're a distraction.

* fix(deps): update dependency node-fetch to v2.6.4

* fix: replace responsive web dev bitly links (freeCodeCamp#41811)

* test: fix wait for hotkey navigation (freeCodeCamp#43514)

* Update create-an-es6-javascript-map.md (freeCodeCamp#43495)

* chore(i18n,curriculum): update translations (freeCodeCamp#43500)

* fix: replace JS algorithms and data structures bitly links (freeCodeCamp#41813)

* fix: replace frontend libraries bitly links (freeCodeCamp#41815)

* fix: replace frontend libraries bitly links

* fix: replace s3 bucket urls with cdn urls

* chore(deps): update dependency puppeteer to v10.4.0

* feat(docs): enable japanese docs (freeCodeCamp#43523)

* chore(deps): update codesee to v0.92.2

* refactor(client): use the view zones to place the widgets (freeCodeCamp#43519)

Rather than calculating the widget (i.e. the jaws) position ourselves,
we can use the fact that monaco knows where the view zones are.

* chore(deps): update dependency @rollup/plugin-node-resolve to v13.0.5

* chore(deps): update dependency autoprefixer to v10.3.5

* fix(curriculum): move word 'example' to correct position (freeCodeCamp#43528)

* fix(curriculum): Css fix for issue freeCodeCamp#43517: Example css code does not demonstrate hover animation (freeCodeCamp#43524)

* fix question example code for id: 587d78a7367417b2b2512ae0

* Revert "fix question example code for id: 587d78a7367417b2b2512ae0"

This reverts commit c99edf8.

* modifying only the english version of button hover example

* change to keep css looking consistent

* chore(i18n,docs): initialise japanese docs (freeCodeCamp#43527)

* chore(i18n,curriculum): update translations (freeCodeCamp#43534)

* chore(deps): update dependency postcss to v8.3.7

* fix(deps): update dependency node-fetch to v2.6.5

* chore(deps): update codesee to v0.93.0

* chore(deps): update dependency @testing-library/dom to v8.6.0

* chore(deps): update dependency rollup to v2.57.0

* fix(deps): update dependency @stripe/stripe-js to v1.18.0

* feat(client): ts-migrate (/client/src/components/layouts/Certification.js) (freeCodeCamp#42939)

* change name to certification.tsx

* migrate certification.js to ts

* update ceritification import in index and fix prettier errors

* Update client/src/components/layouts/certification.tsx

Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>

* Update client/src/components/layouts/certification.tsx

Co-authored-by: Oliver Eyton-Williams <[email protected]>

* Update client/src/components/layouts/certification.tsx

Co-authored-by: Oliver Eyton-Williams <[email protected]>

* Update client/src/components/layouts/certification.tsx

Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>

* fix: reorder imports

Co-authored-by: Raymen Deol <[email protected]>
Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>

* feat: add last chinese cert (freeCodeCamp#43539)

* feat: update editable region behaviour (freeCodeCamp#43537)

* refactor: remove ambiguity about editable region

Since the editable region is implemented via decorations and defined in
challenge object, getEditableRegionFromRedux, makes the source obvious

* fix: make jaws follow the highlighted region

* fix: update the jaws on all content changes

* feat: make editable region 'absorb' text

As the user types, the editable region can move, expand and contract.

With this PR then if the user, say, presses backspace on the line after
the editable region, causing that line to move up, then the new contents
will expand/contract as if they had always been part of the region.

* fix: redundant scrollbar on codeally Iframe (freeCodeCamp#43503)

* chore(i18n,curriculum): processed translations (freeCodeCamp#43546)

* fix(curriculum): adjust implementation-of-social-auth tests (freeCodeCamp#43162)

* fix(curriculum): adjust implementation-of-social-auth tests

* use deepInclude with much optional chaining

* chore: clean up comments (freeCodeCamp#43550)

* fix(curriculum): allow optional final css semi-colon (freeCodeCamp#43545)

* fix for issue: freeCodeCamp#43536, final css property optional semi-colon

* accidentally left a "y" at the end of the sentence

* replaced regex with CSSHelp

* removed trailing white-space

* chore(deps): update dependency eslint-plugin-testing-library to v4.12.4

* chore(deps): update dependency mock-fs to v5.1.1

* fix(deps): update dependency @stripe/react-stripe-js to v1.5.0

* chore(deps): update codesee to v0.94.4

* fix(curriculum): Fix a typo (freeCodeCamp#43554)

* chore(i18n,curriculum): update translations (freeCodeCamp#43556)

* chore(tools): ignore i18n branches (freeCodeCamp#43557)

* fix(client): errors with multiple editor tabs (freeCodeCamp#43549)

* fix: enforce multifile tab order

* fix: sort challengeFiles to prevent remounts

If the challengeFiles are used unsorted, this can unmount an editor.
The editors rely on the mount hook for initialization, so extra mounts
can cause unwanted behaviour.

* fix: make editor tabs and panes match

* fix(tools): different condition for codesee-maps (freeCodeCamp#43558)

* docs: document i18n videos (freeCodeCamp#43553)

* docs: document i18n videos

* chore: apply oliver's review suggestions

Co-authored-by: Oliver Eyton-Williams <[email protected]>

* docs: additional places to change

* feat: add yml highlighting

Co-authored-by: Shaun Hamilton <[email protected]>

Co-authored-by: Oliver Eyton-Williams <[email protected]>
Co-authored-by: Shaun Hamilton <[email protected]>

* chore(deps): update codesee to v0.95.0

* chore(deps): update dependency webpack to v5.54.0

* chore: remove coder survey text (freeCodeCamp#43559)

* chore(deps): update dependency postcss to v8.3.8

* fix: update rbdms urls to new repos (freeCodeCamp#43477)

* fix: update rbdms urls to new repos

* revert: github-tutorial-urls-to-moT01-repo

* chore(deps): update dependency mocha to v9.1.2

* chore(deps): update dependency jest to v27.2.2

* chore(i18n,curriculum): update translations (freeCodeCamp#43569)

* chore(i18n,learn): update translations (freeCodeCamp#43568)

* chore(deps): update dependency autoprefixer to v10.3.6

* fix(curriculum): typo in word-frequency.md (freeCodeCamp#43571)

occurences -> occurrences

* fix(deps): update dependency nanoid to v3.1.28

* chore(curriculum): changed external links to news articles in 4 challenges (freeCodeCamp#43373)

* changed 4 links

* fix wording

* change link as suggested by @gikf

* refactor(client): remove unused axios dependents (freeCodeCamp#43579)

* feat: localize videos (freeCodeCamp#42869)

* refactor: separate out VideoPlayer component

* feat: support bilibili videos

* feat(client): allow localized videos to be shown

* fix: remove add subtitles CTA

* feat: add locale ids for Why Program?

* fix: move ActionRow outside the ReflexContainer (freeCodeCamp#43532)

* fix: move ActionRow outside the ReflexContainer

It does not need to be resizable.

* fix: make DesktopLayout aware of ActionRow

The ReflexContainer seems to need to be inside a display: flex component
to correctly compute the sizes of it's children.

* refactor: remove unused props

* chore(deps): update dependency @testing-library/react to v12.1.1

* chore(deps): update dependency tailwindcss to v2.2.16 (freeCodeCamp#43575)

Co-authored-by: Renovate Bot <[email protected]>

* chore(i18n,curriculum): update translations (freeCodeCamp#43583)

* chore(i18n,docs): update translations (freeCodeCamp#43567)

* chore(deps): update dependency typescript to v4.4.3 (freeCodeCamp#43316)

* chore(deps): update dependency typescript to v4.4.3

* fix: use UserType correctly

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>

* chore(deps): update typescript-eslint monorepo to v4.32.0

* Added hyperlink on freeCodeCamp Social Banner (freeCodeCamp#43590)

* feat(typescript): Add typescript support for UI components library (freeCodeCamp#43541)

* Add TS configs and improve dir structure

* Add TS configs and improve dir structure

* Fix components exports from index

* chore: prettier

* Add tsconfig and then fix the linter warnings

* Add @babel/preset-typescript

* Fix eslint rule and update btn component to fix storybook

* Fix TS and Jest configs

Converted all remaining files to TS as well

* Remove TS ignored rules and fixed some TS & jest stuff

* Revert to old directory structure

* Use absolute versions in package.json

* enable ts strict to infer types

Co-authored-by: Hamza Waleed <[email protected]>

* chore(deps): update dependency jest to v27.2.3

* chore(i18n,curriculum): update translations (freeCodeCamp#43595)

* chore(i18n,docs): update translations (freeCodeCamp#43594)

* chore(deps): update codesee to v0.96.0

* feat(curriculum): add accessibility-quiz practice project (freeCodeCamp#43244)

* feat(curriculum): add accessibility-quiz practice project

* add parts 002-006

* add parts 7-8, tentative on logo aspect-ratio

* add parts 008-013

* add parts 013-016

* add parts 017-026

* add parts 026-027

* add parts 027-029

* add parts 029-044

* add parts 044-067 - all parts done

* add tests 001-009

* add tests 010 - 033

* add tests 034 - 039

* update tests 008~033, add tests 040-050

* add all tests

* fix some stuff, remove final.md

* take reasonable suggestions from Nich, ignore rest

Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>

* replace svg link with actual CDN

* remove getAttribute in potentially bad places

* add method to form

* fix silly querySelectors

* adjust selectors for 028

* fix selectors, and add color transformations

Co-authored-by: Nicholas Carrigan <[email protected]>

* fix: typos, and make one test lenient

Co-authored-by: gikf <[email protected]>

Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>
Co-authored-by: gikf <[email protected]>

* chore(deps): update dependency webpack to v5.55.0

* chore(deps): update codesee to v0.97.0

* fix(deps): update dependency @actions/core to v1.6.0

* fix: code block newline (freeCodeCamp#43600)

* chore(deps): update node.js to v14.18.0 (freeCodeCamp#43603)

Co-authored-by: Renovate Bot <[email protected]>

* fix(curriculum): strip comments from code when testing (freeCodeCamp#43597)

* fix: update ES6-Compare Scopes of var and let

Fixes Issue: Adding a comment causes a valid answer to be wrong in ES6 > Compare Scopes of the var and let keywords

Fixes: freeCodeCamp#43578

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md

Co-authored-by: Krzysztof <[email protected]>

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md

Co-authored-by: Krzysztof <[email protected]>

* Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md

Co-authored-by: Krzysztof <[email protected]>

Co-authored-by: Krzysztof <[email protected]>

* chore(deps): update dependency webpack to v5.55.1

* chore(deps): update dependency @testing-library/dom to v8.7.0

* chore(i18n,curriculum): update translations (freeCodeCamp#43615)

* chore(deps): update dependency jest to v27.2.4

* fix(deps): update dependency @types/react to v17.0.25

* feat(i18n): enable front-end dev cert in Espanol (freeCodeCamp#43619)

* fix(deps): update dependency react-final-form to v6.5.6

* fix(deps): update dependency final-form to v4.20.4

* fix(links): Fixed 4 files with broken links (freeCodeCamp#43618)

* chore(deps): update codesee to v0.100.0

* chore(deps): update codesee to v0.101.0

* chore(i18n,learn): update translations (freeCodeCamp#43613)

* fix(deps): update monaco editor (freeCodeCamp#43344)

* fix(deps): update monaco editor

* chore: rollback monaco, update react-monaco-editor

The latest version of react-monaco-editor is only compatible with monaco
v0.27

* fix: roll-back monaco-editor-webpack-plugin

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>

* fix(deps): pin dependencies

* fix(deps): pin dependency react-monaco-editor to 0.45.0

* chore(deps): update dependency @testing-library/dom to v8.7.1

* chore(deps): update dependency eslint-plugin-react to v7.26.1

* chore(i18n,curriculum): update translations (freeCodeCamp#43633)

* fix(curriculum): Remove videoUrl using old image srcs (freeCodeCamp#43631)

* fix: replace responsive web dev bitly links

* Revert "fix: replace responsive web dev bitly links"

This reverts commit 3d2bcbe.

* fix: remove video url from html challenges using old image srcs

* chore(i18n,docs): update translations (freeCodeCamp#43612)

* chore(deps): update dependency nth-check to 2.0.1 [security] (freeCodeCamp#43509)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update dependency ansi-regex to 5.0.1 [security] (freeCodeCamp#43542)

Co-authored-by: Renovate Bot <[email protected]>

* fix(deps): update dependency @types/react to v17.0.26

* fix(deps): update dependency gatsby to v3.14.1

* fix(deps): update dependency react-final-form to v6.5.7

* chore(deps): update codesee to v0.102.1

* feat(actions): autoclose workflow (freeCodeCamp#43644)

* docs: add hacktoberfest note (freeCodeCamp#43645)

* feat(i18n,curriculum): add Bilibili ids for Chinese (freeCodeCamp#43564)

Co-authored-by: Kristofer Koishigawa <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>

* fix(client): cert rendering temporarily (freeCodeCamp#43335)

* fix: require login as step

* fix: cert rendering temporary

* fix: remove keys from other translation files

* fix: cypress test

* chore: shauns suggestions

* fix: remove steps

* fix: use a seperate UseEffect function

* Suggestions from Shaun

Co-authored-by: Shaun Hamilton <[email protected]>

* fix: certification temp rendering

* fix: cert temp rendering hopefully

* fix: button visibility and cert test

* fix: condition

* test: improve claim cert tests

Without npm run seed, retries will be in a different state.

Check the scroll position to (hopefully) catch the weird cert claim bug.

Co-authored-by: Shaun Hamilton <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>

* fix(curriculum): Fix a typo in "Problem 141: Investigating progressive numbers, n, which are also square" (freeCodeCamp#43647)

* chore(deps): update actions/github-script action to v5 (freeCodeCamp#43648)

Co-authored-by: Renovate Bot <[email protected]>

* feat: make renovate group all monaco packages (freeCodeCamp#43652)

react-monaco-editor depends on specific monaco-editor versions, so this
makes sure they're all updated in the same renovate PR

* feat: enable reset in multifile editor (freeCodeCamp#43617)

* feat: dispatch resetChallenge action

* fix: copy challengeFiles instead of in-place sort

* fix: handle null updateFile payloads in redux

* refactor: reorganise region initialization

* refactor: pull code into editorDidMount

Then we can rely on the presence of the editor and monaco and don't have
litter the code with null checks.

* refactor: use better name for editable region init

* refactor: remove unused decoration

* refactor: rename forbidden region init functions

* fix: keep all challengeFiles when resetting

* refactor: remove unused decoration class

* fix: reinitialize editor on reset

* fix: stop adding multiple scroll listeners

Since the challengeFile update on each keystroke extra (unnecessary)
adding of listeners slowed the editor to a crawl.

* fix: only scroll to editor on mount

Rather than on any edit.

* refactor: remove logs and comments

* fix: rename toSortedArray and fix broken test

* fix: check for null not falsy in updateFile

* fix: only update project features when project

* fix: only reset if editor contents have changed

* feat: focus on editor after reset

* chore(deps): update dependency rollup to v2.58.0

* chore(deps): update dependency webpack to v5.56.0

* chore(i18n,learn): update translations (freeCodeCamp#43660)

* fix(tools): translation workflow (freeCodeCamp#43666)

* fix: wrong flash message when changing email (freeCodeCamp#43653)

* chore(deps): update storybook monorepo to v6.3.9

* chore(deps): update codesee to v0.102.2

* fix(deps): update dependency @stripe/stripe-js to v1.19.0

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tom <[email protected]>
Co-authored-by: Mrugesh Mohapatra <[email protected]>
Co-authored-by: camperbot <[email protected]>
Co-authored-by: Ahmad Abdolsaheb <[email protected]>
Co-authored-by: Shaun Hamilton <[email protected]>
Co-authored-by: EhEhRon91 <[email protected]>
Co-authored-by: Nicholas Carrigan (he/him) <[email protected]>
Co-authored-by: gikf <[email protected]>
Co-authored-by: Matt <[email protected]>
Co-authored-by: James Huang <[email protected]>
Co-authored-by: vama <[email protected]>
Co-authored-by: Vama Mehta <[email protected]>
Co-authored-by: Igor Cunha <[email protected]>
Co-authored-by: Oliver Eyton-Williams <[email protected]>
Co-authored-by: Aaron McCollum <[email protected]>
Co-authored-by: codesee-architecture-diagrams[bot] <86324825+codesee-architecture-diagrams[bot]@users.noreply.github.com>
Co-authored-by: Sem Bauke <[email protected]>
Co-authored-by: Nicole Aldurien <[email protected]>
Co-authored-by: Aditya Dharmawan Saputra <[email protected]>
Co-authored-by: Kristofer Koishigawa <[email protected]>
Co-authored-by: Mohanesh Babu <[email protected]>
Co-authored-by: Alan Luo <[email protected]>
Co-authored-by: James Geer <[email protected]>
Co-authored-by: Raymen Deol <[email protected]>
Co-authored-by: Raymen Deol <[email protected]>
Co-authored-by: Ilenia <[email protected]>
Co-authored-by: Ikko Ashimine <[email protected]>
Co-authored-by: Fayas Noushad <[email protected]>
Co-authored-by: Hamza Waleed <[email protected]>
Co-authored-by: Hamza Waleed <[email protected]>
Co-authored-by: prashantaghoshal <[email protected]>
Co-authored-by: Rafael D. Hernandez <[email protected]>
Co-authored-by: bkelley361 <[email protected]>
Co-authored-by: Dharmin K Shah <[email protected]>
Co-authored-by: miyaliu666 <[email protected]>
Co-authored-by: Hankai Xia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regex test on challenge doesn't allow no semi-colon

3 participants