Giter Club home page Giter Club logo

curriculum's Introduction

curriculum's People

Contributors

abhisekp avatar alistermada avatar alvinkl avatar aryanj-nyc avatar benmcmahon100 avatar berkeleytrue avatar bkinahan avatar bouncey avatar bugron avatar darthmeme avatar dhcodes avatar dokkillo avatar erictleung avatar greenheart avatar jonathan-grah avatar josephlivengood avatar joshalling avatar justinian336 avatar ltegman avatar manish-giri avatar natac13 avatar nirajn2311 avatar no-stack-dub-sack avatar patsul12 avatar quincylarson avatar raisedadead avatar saintpeter avatar scissorsneedfoodtoo avatar systimotic avatar vtamara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curriculum's Issues

404 error, page not found on react challenge.

This bug was reported in the freecodecamp repo, below are the full details to it.
In the Front End Libraries Certification: React Challenge there is a challenge named

Introducing Inline Styles

in which there's a link to an article and when I click in the link it redirects me to a 404 page. That means the page does not exist anymore.

"Applied Accessibility - Make Elements Only Visible to a Screen Reader by Using Custom CSS" has invalid HTML in its instructions

@SuperGeniusZeb commented on Fri Jun 01 2018

https://learn.freecodecamp.org/responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css

The instructions of this lesson include invalid HTML: there are <hr>, <li>, and <ul> tags nested in <p> tags. Paragraph elements only allow phrasing content to be nested in them, but <hr>, <li>, and <ul> tags are all flow content.

<div class="challenge-instructions col-xs-12">
    <p class="wrappable">Have you noticed that all of the applied accessibility challenges so far haven't used any CSS? This is to show the importance of a logical document outline, and using semantically meaningful tags around your content before introducing the visual design aspect.</p>
    <p class="wrappable">However, CSS's magic can also improve accessibility on your page when you want to visually hide content meant only for screen readers. This happens when information is in a visual format (like a chart), but screen reader users need an alternative presentation (like a table) to access the data. CSS is used to position the screen reader-only elements off the visual area of the browser window.</p>
    <p class="wrappable">Here's an example of the CSS rules that accomplish this:</p>
    <div>
        <blockquote>.sr-only {<br> position: absolute;<br> left: -10000px;<br> width: 1px;<br> height: 1px;<br> top: auto;<br> overflow: hidden;<br>}</blockquote>
    </div>
    <p class="wrappable"><strong>Note</strong><br>The following CSS approaches will NOT do the same thing:</p>
    <p class="wrappable">
        <ul></ul>
    </p>
    <p class="wrappable">
        <li><code>display: none;</code> or <code>visibility: hidden;</code> hides content for everyone, including screen reader users</li>
    </p>
    <p class="wrappable">
        <li>Zero values for pixel sizes, such as <code>width: 0px; height: 0px;</code> removes that element from the flow of your document, meaning screen readers will ignore it</li>
    </p>
    <p class="wrappable"></p>
    <p class="wrappable">
        <hr>
    </p>
    <p class="wrappable">Camper Cat created a really cool stacked bar chart for his training page, and put the data into a table for his visually impaired users. The table already has an <code>sr-only</code> class, but the CSS rules aren't filled in yet. Give the <code>position</code> an absolute value, the <code>left</code> a -10000px value, and the <code>width</code> and <code>height</code> both 1px values.</p>
</div>

Also notable is that the <blockquote> element contains code which should be wrapped in a <code> element for semantic purposes.

HTML 5.2 specifications and HTML 5.3 drafts for reference:

Wrong regex for test : ES6 - Difference between import and require

Describe the bug
This test requires to use only " around the path_to_file for the solution but I think that ' should work too.

Screenshots
If applicable, add screenshots to help explain your problem.
screenshot-2018-7-4 es6 understand the differences between import and require learn freecodecamp

Desktop (please complete the following information):

  • OS: Ubuntu 18.04
  • Browser: Firefox
  • Version: 60

Additional context

Indent sample code in lesson description

@thefifthisa commented on Wed Jun 13 2018

Describe your problem and - if possible - how to reproduce it

Minor thing, but I think it would improve readability if the sample code below was properly indented like in other lesson descriptions.

Add a Link to the page with the problem

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/prevent-object-mutation

If possible, add a screenshot here

es6_prevent object mutation


@Nirajn2311 commented on Wed Jun 13 2018

I’ll see what I can do about it.


@Nirajn2311 commented on Fri Jun 15 2018

There is a mistake in this challenge's code of FCC's curriculum node_module

Error causing test to fail - Create a Horizontal Line Using <hr> tag

Describe the bug

I've attempted solving this exercise several times. The solution to solving this exercise is relatively simple, it just requires an <hr> tag to be placed between the <h4> title tag and the first <p> tag that follows it.

However, when submitting this solution, once of the tests fail:

"The hr tag should come between the title and the paragraph."

I've also attempted to take the following exercises code and paste it into the IDE as well, but it didn't work either.

I've included screen shots below

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/create-a-horizontal-line-using-the-hr-element'
  2. Click on 'Run the tests'
  3. See error

Expected behavior

Both tests should pass

Screenshots

screen shot 2018-07-29 at 1 36 32 pm

screen shot 2018-07-29 at 1 39 33 pm

screen shot 2018-07-29 at 1 41 11 pm

Desktop (please complete the following information):

  • OS: macOS High Sierra - 10.13.6
  • Browser: Chrome
  • Version: 67.0.3396.99

"Applied Visual Design - Create a More Complex Shape Using CSS and HTML" does not use CSS3 pseudo-element selector syntax

@SuperGeniusZeb commented on Thu May 31 2018

https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/create-a-more-complex-shape-using-css-and-html

This lesson currently uses the old CSS2 pseudo-element syntax: thing:pseudo-element. It should be updated to use the CSS3 syntax: thing::pseudo-element.

See also:
https://developer.mozilla.org/en-US/docs/Web/CSS/pseudo-elements
https://drafts.csswg.org/selectors-3/#pseudo-elements


@Bouncey commented on Fri Jun 15 2018

There is a difference between : and ::.

: is for pseudo classes like :hover and :focus

:: is for pseudo elements like ::before and ::after

In most cases it doesn't really matter

I would be happy to see the changes made in freeCodeCamp/curriculum though 👍

Improving the curriculum test bed

I have noticed that a number of the challenges do not have any solutions that are being tested, namely the Responsive Web Design challenges. This became apparent to me recently when I had submitted a pull request that passed all the tests, but had a typo in it that would have broken the updated challenge. Luckily @scissorsneedfoodtoo caught it and the bug was avoided. (#167)

I understand that in many cases it is not possible to test solutions because the assertions rely on elements in the DOM, but there are some tests that only match your code to a regex expression, and these could be tested as in the example below

Test:
"assert(code.match(/background:\\s*?linear-gradient\\(35deg,\\s*?(#CCFFFF|#CFF),\\s*?(#FFCCCC|#FCC)\\);/gi), 'The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.');"

Solution:
"var code = \"<style> div{border-radius: 20px; width: 70%; height: 400px; margin: 50px auto; background: linear-gradient(35deg, #cff, #fcc);}</style><div></div>\""

I would love to work on adding these solutions that are possible, and I will get started on it. Are there any plans to make the assertions that rely on the DOM testable? Because it would be ideal to have every challenge tested to minimize the chances for human error.

ES6 getter/setter challenge console.logs should show results in comments

Describe the bug
The instructional text in the "ES6: Use getters and setters to Control Access to an Object" challenge includes console.log(lol.writer); twice but lacks comments to indicate the different results.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object'
  2. Scroll down to 'the code block in the instructions'

Expected behavior
The first console.log(lol.writer); should have a comment that reads // anonymous
The second console.log(lol.writer); should have a comment that reads // wut

Screenshots
screenshot from 2018-06-30 06-13-02

Desktop (please complete the following information):

  • OS: Debian buster/sid
  • Browser Firefox
  • Version 61.0

Additional context

Typo : MongoDB and Mongoose - Updates on a Document Using model.findOneAndUpdate()

Describe the bug
Current incorrect sentence

We want you to return the updated document. o do that you need to pass the options document { new: true } as the 3rd argument to findOneAndUpdate().

Expected sentence

We want you to return the updated document. To do that you need to pass the options document { new: true } as the 3rd argument to findOneAndUpdate().

Screenshots

image

Applied Visual Design: Background image regex needs to be fixed

The regex lets you pass in a double quote to start the url and a single quote to finish it. It also doesn't let you pass in the url without quotes even though that is also valid css.

The challenge in question is here.
Type in your background as background: url('https://i.imgur.com/MJAkxbh.png") and the test passes.

I am going to take care of this one.

Redundant/Repetitive text in guide from previous challenge

Describe the bug
A clear and concise description of what the bug is.

The guide in the first challenge contains the same redundant text from the second challenge.

  1. https://learn.freecodecamp.org/front-end-libraries/bootstrap/create-a-custom-heading
  2. https://learn.freecodecamp.org/front-end-libraries/bootstrap/use-the-bootstrap-grid-to-put-elements-side-by-side

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

This is the redundant text.
Take for example Bootstrap's........................wide the element should be.

Create Grids within Grids can be passed without doing anything

Describe the bug

This challenge can be passed without doing any work.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://learn.freecodecamp.org/responsive-web-design/css-grid/create-grids-within-grids/'
  2. Click on 'Run the Tests'
  3. See error (You just passed without doing anything)

Expected behavior

This challenge will need to be completed before it can be passed.

Desktop (please complete the following information):

  • OS: [OSX 10.13.6 High Sierra]
  • Browser [Chrome]
  • Version [Version 67.0.3396.99]

Additional context

This was submitted a while ago on forum too: https://forum.freecodecamp.org/t/create-grids-within-grids/198349

Use of <code> tag inappropriately

Describe the bug
Using <code> tags to show new terminology (rather than to refer to code) has caused confusion to campers, as filed in freeCodeCamp/freeCodeCamp#17655. These tags do cause confusion. <code> tags, semantically, are meant to refer to code.

However, these are used in almost every challenge. For example, the terminology "getter" and "setter" is not code (there is no keyword called getter, nor setter), and yet it is used in a challenge.

More evidence:

ChallengeBad words in code tags
Make Dead Links using the Hash SymbolJavaScript
Global Scope and Functionsglobal
Reuse Patterns using Capture Groupscapture groups

There are many more examples, and I will edit the above table when I get the time to search for more. What we need to do is:

  • Decide whether we want this style of writing
  • Decide what we want to change this to? e.g., we could bold the terms, or create a special new style where it gets an icon placed next to it.
  • If we do want to swap this all out, we will need to search through and change everything by hand (we can't tell what's code and what isn't automatically).

Thoughts?

Update text in Applied Visual Design challenge

Describe your problem and - if possible - how to reproduce it

In the challenge, "Applied Visual Design: Use the u Tag to Underline Text", there is text that should be changed to make more sense.

It says:

Wrap the u tag around the text "Ph.D. students". It should not include the parent div that has the class of cardText.

I think the second sentence should be removed. It is confusing and adds nothing to the challenge.

Add a Link to the page with the problem

https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/use-the-u-tag-to-underline-text

Typo: Basic CSS: Use CSS Variables to change several elements at once

The test case on this challenge does not make sense since it repeated --penguin-skin three times when it is supposed to be --penguin-skin, --penguin-belly, --penguin-beak

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://learn.freecodecamp.org/responsive-web-design/basic-css/use-css-variables-to-change-several-elements-at-once
  2. Try to complete the challenge
  3. See error

Expected behavior
The test case on this challenge does not make sense since it repeated --penguin-skin three times when it is supposed to be --penguin-skin, --penguin-belly, --penguin-beak.

Screenshots
penguin-problem

Desktop (please complete the following information):

  • I don't think this matters here

Additional context
Up to date source code seems wrong too: https://github.com/freeCodeCamp/curriculum/blob/dev/challenges/01-responsive-web-design/basic-css.json#L4564-L4570

Advanced Node and Express - Hashing Your Passwords - needs refactoring

Describe the bug

https://learn.freecodecamp.org/information-security-and-quality-assurance/advanced-node-and-express/hashing-your-passwords

Challenge suggest the following code to hash a password:

var hash = bcrypt.hash(req.body.password, 12);

... and than saving the hash variable to the database, but this code returns a promise and therefore cannot be saved as password. So we need to handle the promise and then save the response as password, or the second solution would be to change the code and use hashSync method.

To Reproduce

Steps to reproduce the behavior:

var bcrypt = require('bcrypt');

var hash = bcrypt.hash('some_password', 12);

console.log(hash) // returns a Promise instead of a hash

Expected behavior

The code should return a hashed password

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • Browser: Google Chrome
  • Version: 67.0.3396.87 (Official Build) (64-bit)

Additional context

I can work on this and will make a PR if you agree this challenge needs to refactor...

missing introduction to Socket.io challenges

Describe the bug
Socket.io challenges in Advanced Node and Express are missing an intro, and description about what the challenge is doing. It looks almost as if there is a challenge missing in between "Social Auth III" and "setting up the environment". I say this because the part in which you set up the http variable is missing as well, which makes the first instructions confusing, as you don't have the http variable in the code yet.

from challenge:

Add Socket.IO as a dependency and require/instantiate it in your server defined as 'io' with the http server as an argument. const io = require('socket.io')(http);

To Reproduce
Link to first challenge in Socket.io series:
https://learn.freecodecamp.org/information-security-and-quality-assurance/advanced-node-and-express/set-up-the-environment

Desktop (please complete the following information):

  • OS: [ iOS]
  • Browser [chrome]
  • Version [67]

Duplicated CSS top property in the last challenge in Applied Visual Design

Description

I just found a duplicated CSS top property in Applied Visual Design: Make Motion More Natural Using a Bezier Curve, is this intended?

.balls {
    border-radius: 50%;
    top: 249px;
    position: fixed;  
    width: 50px;
    height: 50px;
    top: 60%;
    animation-name: jump;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

Link

https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/make-motion-more-natural-using-a-bezier-curve

Updated scripts are blocking tests on main repo

At the minute we aren't able to use the curriculum from v3.1.2 onwards. This is because of a breaking change that has broken the tests on the main repo.

We need to evaluate the changes introduced in #127 and consolidate the schema for the changes both curriculum and main repo side.

Todo:

  • Is releasedOn necessary? This is one of the keys breaking tests.
  • Make it obvious that any change to schema is a MAJOR change.
  • The schema should probably be only on the curriculum side as a single source of truth.
  • ...

/cc @Bouncey @scissorsneedfoodtoo can we get on a call to discuss further?

Confusing instructions for "ES6: Understand the Differences Between import and require" path

Describe the bug
A challenge "Note" indicates that "In most cases, the file path requires a ./ before it; otherwise, node will look in the node_modules directory first trying to load it as a dependency."

Furthermore, the challenge instructions state that "The file where this function lives is called "string_functions", and it is in the same directory as the current file."

Therefore, users should expect the/a correct answer involves "./string_functions".

However, including ./ before the file name causes the challenge to fail.

To Reproduce

  1. Go to 'https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/understand-the-differences-between-import-and-require'
  2. Enter import { capitalizeString } from "./string_functions"; below "use strict";
  3. The challenge fails with a Cannot read property 'capitalizeString' of undefined error.
  4. Replace the previous entry with import { capitalizeString } from "string_functions";
  5. The challenge passes.

Expected behavior
The challenge should pass when the user includes ./ in front of the imported filename. Or, the challenge should specify that the "string_functions" file lives in the node_modules directory or that no ./ is needed in this challenge.

Screenshots
screenshot from 2018-06-30 08-10-41

Desktop (please complete the following information):

  • OS: Debian buster/sid
  • Browser Brave
  • Version 0.23.19-1

Additional context
Subsequent ES6 challenges share this problem, but I will hold on filing issues for them until this one is resolved.

Running unpack and then repack removes translations from challenge json files

Describe the bug
When running npm run unpack, then npm run repack, translations gets deleted from challenge json file

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run unpack
  2. Make changes in unpacked HTML files
  3. Run npm run repack
  4. Go to any challenge json file, see that translations are not there

Expected behavior
Translations should not get deleted from json files

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context

Authentication with Socket.IO - assertions are broken

Describe the bug
2 incorrect assertions on the following challenge make it impossible to pass (at least without cheating).

To Reproduce
Just follow the instructions for this set of challenges, there is no way to miss it.

Expected behavior
Test should perform correct assertion.

Screenshots
Here are some screens with dev tools:
image

image

Desktop (please complete the following information):
Irrelevant

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

clickjacking exercise description displays iframe

Describe the bug

clickjacking exercise shows an iframe and some of the description is missing as there are html elements in the description.

To Reproduce

Steps to reproduce the behavior:

  1. Go to clickjacking exercise
  2. look at the screen

Expected behavior

I expect to see the full description without an iframe.

Screenshots

clickjacking

Desktop (please complete the following information):

  • OS: ubuntu xenial
  • Browser chromium
  • Version 62.0.3202.94 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)
  • Browser firefox
  • Version 61.0.1 (64-bit)

Bug: Multiple Issues with tests for ES6: Create Strings using Template Literals

Describe the bug
Text for first test should be amended to say array rather than list as this is both what we specify and test for.

Second test only passes if you use double quotes around class attribute

The test for use of template literals has an incorrect regex. The part of the regex testing for </li> has not been properly escaped so / is being treated as end of the regex, with l being treated as a regex flag.

There maybe additional issues with the regex, so I will try and identify all before submitting PR to fix.

To Reproduce
Steps to reproduce the behavior:

  1. Go to create-strings-using-template-literals
  2. Create correct solution
  3. Click Run the Tests
  4. Test fails
    image

Expected behavior
Test should pass

Desktop (please complete the following information):
Reported by multiple campers - not system specific

"Applied Visual Design - Use the del Tag to Strikethrough Text" is using the wrong element semantically

Regex to test for Template Literals is incorrect

Describe the bug
The regex string to test is the user has correctly used template literals is incorrect and the test fails when it should not.
Some of the escape characters in the string are not correctly entered, causing the error.

To Reproduce
Steps to reproduce the behavior:

  1. Go to ES6: Create Strings using Template Literals
  2. Complete the task
  3. Click on Run the Tests
  4. The test for "Template strings were used" will fail.

Expected behavior
The test should pass when template literals are correctly used.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser : Chrome
  • Version: 67.0.3396.99 (Official Build) (64-bit)

I'm happy to correct this issue.

Telephone Number Validator - Examples are not presented on separate lines as expected

Bug:
In the challenge description, the examples of valid phone number formats are not presented on separate lines as expected.

Link to the challenge: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator

Solution:
This is because HTML doesn't render \n to a new line, but a single space instead. We can fix it by replacing all the \n characters with <br> tags. Here is the line that needs to be edited:

"<blockquote>555-555-5555\n(555)555-5555\n(555) 555-5555\n555 555 5555\n5555555555\n1 555 555 5555</blockquote>",

Example link in lesson text opens to FCC website in same tab

@mstellaluna commented on Fri May 18 2018

Challenge Name
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph

Issue Description
In the lesson text opens to freecodecamp.org website in the same tab. My suggestion is to have it open to a new tab so the camper does not lose lesson they are on.

Browser Information
Browser Name, Version:
Firefox Quantum 60.0.1 (64-bit)
Chrome: Version 66.0.3359.117 (64-bit)
Operating System: Windows 10 Pro 64-bit
Mobile, Desktop, or Tablet: Dell Latitude Laptop (15")

image


@beaucarnes commented on Fri May 18 2018

Normally I agree that links should open in a different tab but in this case I don't think it should open to a new tab. This is an example of the type of link that does not open into a new tab. If it opened into a new tab, it would be using HTML that is different than the HTML that the lesson text says it is an example of.


@mstellaluna commented on Fri May 18 2018

@beaucarnes Agreed, although if a camper though decides to click on that link as it is an active link, it will bring them to the freecodecamp.org website in the same tab they are viewing the lesson.


@Bouncey commented on Fri Jun 15 2018

We could change the example to use a _blank. Ideally, we don't want to take users away from their lesson. I don't think there will be many queries over the target attribute.

Notes to contributors, this should be fixed in the freecodecamp/curriculum repository, the code is not held in learn.


@beaucarnes commented on Fri Jun 15 2018

I agree with both of you now. I noticed that target="_blank" is introduced in the previous lesson so hopefully people will understand when it is used in this lesson.

Basic JavaScript: Increment a Number with JavaScript - fails for pre-increment

The problem does not specify a pre-increment (++myVar) or post-increment (myVar++).

One test:

{
  "text": "Use the <code>++</code> operator",
  "testString":
    "assert(/[+]{2}\\s*myVar|myVar\\s*[+]{2}/.test(code), 'Use the <code>++</code> operator');"
},

allows either, but another test:

{
  "text": "<code>myVar = myVar + 1;</code> should be changed",
  "testString":
    "assert(/var\\s*myVar\\s*=\\s*87;\\s*\\/*.*\\s*myVar\\+\\+;/.test(code), '<code>myVar = myVar + 1;</code> should be changed');"
},

fails for pre-increment.

The problem description should either say specifically "post" or the tests should allow either.

A fair number of campers are getting tripped up on this.

Basic CSS: Understand Absolute versus Relative Units- red-box margin css doesn't match green-box

Describe the bug
.red-box margin does not match .green-box margin; and instead matrches .yellow-box margin.

  .yellow-box {
    background-color: yellow;
    padding: 20px 40px 20px 40px;
  }

  .red-box {
    background-color: red;
    margin: 20px 40px 20px 40px;

  }

  .green-box {
    background-color: green;
    margin: 40px 20px 20px 40px;
  }

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://learn.freecodecamp.org/responsive-web-design/basic-css/understand-absolute-versus-relative-units
  2. Look at css

Expected behavior
Make .red-box margin match .green-box margin

To my understanding, it should match .green-box for consistency to match its sibling and not it's parent .yellow-box.

Correct code on "Basic Node and Express - Use the .env file" does not work

Describe your problem and - if possible - how to reproduce it

The following fails:

app.get("/json", (req, res) => { let message = ""; (process.env.MESSAGE_STYLE == "uppercase") ? message=message.toUpperCase() : message="Hello json"; res.json({"message": message}); });

And this works:

app.get("/json", (req, res) => { let message = "Hello json"; (process.env.MESSAGE_STYLE == "uppercase") ? message=message.toUpperCase() : message=message; res.json({"message": message}); });

They are basically the same code. I'm not sure how the testing is done but the first code segment should work fine. It is not a big deal, although I am sure fixing this should save some people a little frustration.

Add a Link to the page with the problem

https://learn.freecodecamp.org/apis-and-microservices/basic-node-and-express/use-the--env-file

Update the Contributing documentation

Some potential contributors are having a problem with the Travis CI test which is checking for commit formats, but this is undocumented.

This repo should have a CONTRIBUTING.md file I guess containing this sort of information?

I am not really aware of the circumstances of moving from the old repo to this new repo- maybe it is appropriate to simply link to the CONTRIBUTING.md file from the old repo.

Incomplete Instructions for Basic JavaScript: Return a Value from a Function with Return

@Nirajn2311 commented on Thu Jun 28 2018

Describe your problem and - if possible - how to reproduce it

The instructions instruct us to create a function timesFive but it doesn't tell us to call the function after creating it. So when anyone does the challenge they will get an error.
I think that the instructions should be modified to include all steps.
@Bouncey @raisedadead can I make a PR on this in the curriculum repo?

Add a Link to the page with the problem

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return

Tell us about your browser and operating system

  • Browser Name: Google Chrome
  • Browser Version: 67.0.3396.99
  • Operating System: Windows 10 Home 1803

If possible, add a screenshot here

Provide better instructions for 'has' method in Create a Map Data Structure challenge

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

https://learn.freecodecamp.org/coding-interview-prep/data-structures/create-a-map-data-structure/.
Instructions for 'has' method in the challenge is pretty ambiguous unlike descriptions of other methods in the same challenge. It lacks proper explanation of what the method is expecting.

Describe the solution you'd like

A clear and concise description of what you want to happen.

Change the text from "has returns a boolean for the presence or absence of an item" to "has accepts a key and returns true or false based on the presence of a key"

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

None.

Additional context

Add any other context or screenshots about the feature request here.

Redux: Handle an Action in the Store: hidden requirement

Describe the bug
The challenge throws browser console errors if you manually define an explicit new state. It works if you just pass return {login: true};. It can be confusing to the user, since there was no mention of such restrictions, nor is the real error visible without opening the browser console ... which then looks like a pipeline issue. And for complexer states, typing out the whole structure just to change one property is an antipattern.

To Reproduce
https://learn.freecodecamp.org/front-end-libraries/redux/handle-an-action-in-the-store

let newState = { ...state };
newState.login = true;
return newState;

Expected behavior
I think it's enough to add another line to the challenge text telling the users to just return a new anonymous state object.

Desktop (please complete the following information):

  • OS: linux
  • Browser: firefox, chromium

Tests not properly detecting font-size in SASS @while challenge

Describe the bug
With my code, elements display correctly, and devtools shows that the font-sizes for all .text-#{$x} elements is correct. However, the tests do not pass.

To Reproduce

  1. Go to 'https://learn.freecodecamp.org/front-end-libraries/sass/apply-a-style-until-a-condition-is-met-with-while/'
  2. Between the style tags, add:
  $x: 1;
  @while $x <= 10 {
    .text-#{$x} { font-size: 5px * $x; }
    $x: $x+ 1;
  }
  1. The test won't pass even though the text displays correctly in the right pane, and devtools confirms the elements have the appropriate styling.

Expected behavior
Tests should pass.

Screenshots
screenshot from 2018-07-08 05-55-24

Desktop (please complete the following information):

  • OS: [e.g. iOS] Ubuntu 18.04 LTS
  • Browser [e.g. chrome, safari] Brave
  • Version [e.g. 22] 0.23.31
    Also tested in Firefox 61.0

Additional context
A similar issue is filed here: freeCodeCamp/freeCodeCamp#17838

I think this is now the preferred place to post it.

Note that if this was a browser-induced minimum font-size issue, it seems like the larger font tests would work, even if the 5px test did not.


Update:

Tests pass on this challenge when the spacing is tweaked. This spacing passed for me:

    $x: 1;
  @while $x <= 10 {
  .text-#{$x} { font-size: 5px * $x; 
}
    $x: $x+ 1;
  }

Synchronizing learn with curriculum during development

Is your feature request related to a problem? Please describe.
On my computer, compiling learn takes several minutes (usually 5-10) and waiting this long to view a change with curriculum is just impractical when making minor adjustments.

Describe the solution you'd like
I'd like to be able to run something similar to unpacked, but there is an editor, and the learning tests (i.e buffer should be 64 bytes) can be run. It should not affect learn progress. This can be done by, when unpacking (maybe a different kind of unpack?), parsing the tests section of the challenge, and converting it to the TAP test syntax. (I have no idea how that would be repacked, however. Probably some very structured comments, like the whole<!--description--> stuff.)

Describe alternatives you've considered
Testing it normally with learn, and using the unpacked version, but using the test suite to test pre-written code.

Additional context
My computer is rather old, so this is really just a convenience thing. Maybe I'm the only one who's developing with such a slow computer, and for everyone else, running learn takes a few seconds.

Many thanks.

Incorrect comment in ES6: Destructuring with rest operator

Describe the bug
Two lines that say change code below this line sandwich the line with the comment change this.
The bottom one should say change code above this line.

To Reproduce

  1. Go to 'https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements/'

Expected behavior
The bottom comment should say change code above this line: above, not below.

Screenshots
screenshot from 2018-06-29 13-12-48

Desktop (please complete the following information):

  • OS: Debian sid/buster
  • Browser Firefox
  • Version 61.0

Additional context

Regular Expression Error in Test for Debugging Challenge

Referencing Issue #17387 in freeCodeCamp/freeCodeCamp:
In the "Debugging: Understanding the Differences between the freeCodeCamp and Browser Console" challenge, a correct solution cannot pass because of a test failing due to the following:

// running test
invalid regexp group
// tests completed

It has been determined that this is likely because the negative look behind regular expression used is not fully implemented in Firefox yet.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the challenge.
  2. Solve the challenge per instructions.
  3. Run the Tests.

Expected behavior
The challenge should pass if the regular expression in the test is changed (this will be duplicating a PR that was closed under freeCodeCamp/freeCodeCamp so that it can be implemented here).

Desktop (please complete the following information):

  • OS: macOS High Sierra v10.13.5
  • Browser: Firefox
  • Version: 60.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.