freeCodeCamp: Next Curriculum editor bugs

figured we need to track known bugs with the new editor. A few are listed below:

  1. If there is not enough code below an editable region, the editable region (upper and lower jaw) does not shift up toward the top of the editor. I believe it was discussed in a Front 3 meeting that there is a config setting that allows scrolling up when there are not extra lines at the bottom.

image

  1. Sometimes when clicking the Reset All Tests button, the application crashes. So far, it has been difficult to duplicate the issue consistently.

  2. When the --fcc-editable-region-- is on the first line and the seed is empty it produces the following error:

Error in function toStartOfLine in ./src/templates/Challenges/classic/Editor.js:123
Cannot read property 'setStartPosition' of null TypeError:
Cannot read property 'setStartPosition' of null at toStartOfLine (webpack-internal:///./src/templates/Challenges/classic/Editor.js:170:16) at preventOverlap
  1. To reproduce this issue:

This issue might appear when the editor’s decoration (the upper jaw) goes below the first line.

Suggestion:

  1. Add the “download your code” feature?
  2. removing normalize.css https://github.com/freeCodeCamp/freeCodeCamp/issues/39348#issuecomment-876464606

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

I think, tentatively, that these are all fixed now, at least in the latest PRs.

Once https://github.com/freeCodeCamp/freeCodeCamp/pull/43777 and https://github.com/freeCodeCamp/freeCodeCamp/pull/43728 are in, I think this can be closed. Then we can just open single issues as and when new bugs are discovered/created.

@Sembauke no need, Tom’s right that the migration caused the bug. I’ve been looking into it and should have a fix before too long.

Update: This was fixed

Different with jumpy cursor:

  • Make both html and css visible
  • After each character written in the left frame, cursor jumps to the right frame.
  • It happens regardless where is the editable region. editor2

Yes that’s what I meant.

Maybe the issue description could hold the list of issues that are put here in the form of checkboxes so its easier for any of us to know which of these issues are solved or not. Here’s another thought, maybe each of these issues could be put up as their own issue and a new label named “Next curriculum bugs” could be assigned to them. Basically what I’m saying is it feels cluttered to put all the issues in one place and it becomes harder to track or ask questions about the issues.

One more thing:

Whilst testing #41797, I decided to see what it would be like to copy-paste the code, as some Campers develop locally to use their own editor. Instead of copying, I cut the code, and Gatsby errored out.

  • Go to a challenge with code (index.html)
  • Copy all of the code
  • Delete
  • Gatsby complains

With latest main:

Error in function toStartOfLine in ./src/templates/Challenges/classic/Editor.js:123
Cannot read property 'setStartPosition' of null TypeError:
Cannot read property 'setStartPosition' of null at toStartOfLine (webpack-internal:///./src/templates/Challenges/classic/Editor.js:170:16) at preventOverlap

Not major, but could lead to other bugs.

Steps:

  1. Have seed be (without space, incorrect editor is used sometimes):
# --seed--

## --seed-contents--

```html

--fcc-editable-region--

--fcc-editable-region--

```
  1. Get annoyed by the look of the Editor with space
  2. Remove space at opening --fcc-editable-region-- marker:
# --seed--

## --seed-contents--

```html
--fcc-editable-region--

--fcc-editable-region--

```
  1. Get annoyed at Gatsby complaining
  2. Complain to Oliver about Gatsby complaining

Note: Any change to the position of the --fcc-editable-region-- while app is running will cause the above error.

It is late…my humour is dry