jiebi/CodeConvo huggingface dataset:
Code change:
}; ``` <del> When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the `#types` element should contain two inner elements with the text values `GHOST` and `POISON`, respectively. Make sure the `#type` element content is cleared between searches. </del> <ins> When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the `#types` element should contain two inner elements with the text values `GHOST` and `POISON`, respectively. Make sure the `#types` element content is cleared between searches. </ins> ```js async () => {

Related discussion:
text: There's typo in two hints. Instead of element it mentions . - - This is something that can be fixed by "first time" code contributors to this repository. Here are the files that you should be looking at to work on a fix: List of files: Please make sure you read , we prioritize contributors following the instructions in our guides. Join us in or if you need help contributing, our moderators will guide you through this. Sometimes we may get more than one pull requests. We typically accept the most quality contribution followed by the one that is made first. Happy contributing.
I was making a PR for a different issue and saw this, so I the fix to the PR.
Code change:
challengeFile && ( <Editor containerRef={this.containerRef} <ins> ref={this.editorRef} </ins> {...challengeFile} fileKey={challengeFile.key} />

Related discussion:
text: Is your feature request related to a problem? Please describe. It currently can take a several key presses to navigate to the editor if it does not have focus. Describe the solution you'd like It should be possible to focus on the editor with a hotkey, for example 'e'. The issue where this was mostly discussed will be closed soon, but some thoughts about implementing this appeared there:
Code change:
on: workflow_dispatch: schedule: <del> # runs every weekday at 12:00 noon UTC - cron: '0 12 * * 1-5' </del> <ins> # runs Monday and Wednesday at 12:15 PM UTC - cron: '15 12 * * 1,3' </ins> env: GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}

Related discussion:
text: Uploads: Everyday Downloads: Twice a week This should suffice our deployment targets which are usually Tuesdays? and Thursdays (optional) at around UTC+3 We can shake it up so that PRs can be merged on Mondays and Wednesdays?
So downloads should be triggered on Mondays and Wednesdays?
Yes, or a day before, for all we care. As long as they are: a week only on Mondays and Wednesdays for deployments on Tuesdays and Thursdays
Code change:
export type Test = { pass?: boolean; err?: string; <ins> message?: string; </ins> } & (ChallengeTest | CertTest); export type ChallengeTest = {

Related discussion:
text: and are not being replaced by their values in hints: ! While in the console the actual and expected values are visible: ! To reproduce, go to any challenge that uses and/or :
Happening for me in hints for step 76:
Thank you for mentioning, but the fix has not been deployed yet.
Code change:
}; ``` <del> When the `#search-input` element contains the value `Pikachu` and the `#search-button` element is clicked, the `#types` element should contain a single inner element with the value `ELECTRIC`. Make sure the `#type` element content is cleared between searches. </del> <ins> When the `#search-input` element contains the value `Pikachu` and the `#search-button` element is clicked, the `#types` element should contain a single inner element with the value `ELECTRIC`. Make sure the `#types` element content is cleared between searches. </ins> ```js async () => {

Related discussion:
text: There's typo in two hints. Instead of element it mentions . - - This is something that can be fixed by "first time" code contributors to this repository. Here are the files that you should be looking at to work on a fix: List of files: Please make sure you read , we prioritize contributors following the instructions in our guides. Join us in or if you need help contributing, our moderators will guide you through this. Sometimes we may get more than one pull requests. We typically accept the most quality contribution followed by the one that is made first. Happy contributing.
I was making a PR for a different issue and saw this, so I the fix to the PR.
Code change:
.tool-panel-group-mobile button, .tool-panel-group-mobile a { <del> font-size: 16px; </del> <ins> font-size: 0.8rem; </ins> } .tool-panel-group-mobile {

Related discussion:
text: This wasn't always the case, but right now the formatting for smaller screens isn't great: ! Smaller screens used to have tabs letting you switch between the instructions, editor and so on. You can see them briefly (in the gif) at medium screen sizes, but not for mobile. If we still want to support this, I can look into restoring it.
Looks like they're just hidden behind the search bar.
Thanks for reporting this, we are still figuring out the final state for the nav. Once that is settled, this issue will be resolved automatically.
This wasn't entirely resolved by , as the challenge tabs are still displaying incorrectly: !
Code change:
Inside the callback function, create a new `const` variable called `collisionDetectionRules` and assign it an empty array. <del> Inside that array, add a conditional statement that checks if the player's `y` position plus the player's height is less than or equal to the platform's `y` position. </del> <ins> Inside that array, add a boolean expression that checks if the player's `y` position plus the player's height is less than or equal to the platform's `y` position. </ins> # --hints--

Related discussion:
text: The instructions are really confusing and could be rephrased. ! I don't think what is referred to as a conditional is a what people are going to think of as a conditional. It is just a Boolean expression that is being asked for. No action or assignment is being given depending on truthiness of the expression. It seems like it is looking for an if, switch, ternary or bare conditional, and I believe only ternary or a bare conditional can be placed inside of an array (Not being nested inside of IIFE) which is knowledge a novice probably won't have. The difference, although small, is that a condition takes an action based on the result of a Boolean expression. No conditional action is being taken, so it is just an expression. Might ask for the first element in the array to be a Boolean expression of the sum of the player's position, height and velocity greater than or equal to the platform's position. There are various steps that follow that refer to Boolean expressions as conditionals. The concern is people learning incorrect terminology and getting mixed up in the field.
Yes, you are correct we should update the terminology for steps 78-81 to say boolean expression instead of conditional statement. I have opened this up for contribution.
For each of the steps, make sure to make the change mentioned above in all of the descriptions. Also, go through and check all of the hint text to make sure the correct terminology is used as well
It is bigger than a few steps. I did not track all the steps but kept seeing it through to the end of the course. It happens everywhere that we later do conditional action based on the Booleans stored in arrays. For each array we made, (I think there were 3? player, platform and checkpoints), the instructions use the same wording.
Looks like we have a PR to address the few steps I mentioned earlier. We can review that and merge it in which will close this particular issue. But then I can audit the project to find the other steps and create a second PR to remove the rest
Did a search and replace for the english files and found five more files total where the change needed to be applied. Here is the PR to resolve that.
Code change:
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ <del> import { setupServer, superRequest } from '../../jest.utils'; </del> <ins> import { setupServer, superRequest, createSuperRequest } from '../../jest.utils'; </ins> import { AUTH0_DOMAIN } from '../utils/env'; <ins> const mockedFetch = jest.fn(); jest.spyOn(globalThis, 'fetch').mockImplementation(mockedFetch); const newUserEmail = 'a.n.random@user.com'; const mockAuth0NotOk = () => ({ ok: false }); const mockAuth0InvalidEmail = () => ({ ok: true, json: () => ({ email: 'invalid-email' }) }); const mockAuth0ValidEmail = () => ({ ok: true, json: () => ({ email: newUserEmail }) }); </ins> jest.mock('../utils/env', () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-return return {

Related discussion:
text: This endpoint needs to use jwtaccesstoken in the same way that web login does.
Code change:
export const handleRequest = (makeRequest: () => Promise<Response>) => () => { makeRequest() <del> .then(res => res.json() as Promise<{ stdout: string; stderr: string }>) .then(data => alert(JSON.stringify(data))) </del> <ins> .then( res => res.json() as Promise<{ stdout?: string; stderr?: string; message?: string; }> ) .then(data => { if (data.message) { alert(data.message); } else { alert(JSON.stringify(data)); } }) </ins> .catch(err => console.error(err)); };

Related discussion:
text: Looking forward for reporting a security issue: Please report security issues by following our security policy: Describe the bug When using the challenge editor, upon saving changes, the confirmation alert that pops up reads: . It should instead read simply: . Affected Pages Error will appear after saving on on any challenge editor challenge. For example: (http://localhost:3300/07-scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher). To Reproduce the challenge editor with to (http://localhost:3300) to any specific challenege. the save changes button will then produce the alert with the unformatted message. Expected behavior The alert should display: . Screenshots Currently, the alert displays like this: <img width="448" alt="broken" src=""When instead it should look like: <img width="452" alt="fixed" src=""System Device: Macbook Pro OS: Ventura 13.1 Browser: Chrome Version: 123.0.6312.59 (Official Build) (x86_64) Recommended fix or suggestions The code that handles requests for the challenge editor does not correctly handle saveRoute requests because it expects the incoming object to have the fields and . I propose a fix where we edit the route handler to check if the incoming objeect posses a field, and if so, the message directly instead of using . Additional context I will be monitoring this issue closely for the next few hours and I am ready and willing to fix this issue.
Sounds good I think we would accept this change. Feel free to make a PR.
Code change:
], "tests": [ [ <del> "Algorithms expressed exponentially like O(N^2) can work well in certain situations, so you shouldn't avoid them completely.", </del> <ins> "Algorithms expressed exponentially like O(C^N), where C is a constant can work well in certain situations, so you shouldn't avoid them completely.", </ins> false, "While they can work in certain small scale situations, they aren't good practice because they will not work larger scale." ],

Related discussion:
text: <!-- FreeCodeCamp Issue Template --<!-- NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at --<!-- Please provide as much detail as possible for us to fix your issue --<!-- Remove any heading sections you did not fill out --<!-- Insert link to challenge below -- <!-- Describe below when the issue happens and how to reproduce it --In the discussion and questions concerning big-o notation, O(N^2) is referred to as "exponential time", which is wrong. O(N^C), where C is any constant greater than 1 (e.g. 2) is called "polynomial time". Exponential time looks like O(C^N), where the input variable (N) is in the exponent. Roughly speaking, the complexity class P (polynomial time solvable) is what we (or complexity theorists) consider "easy" - or at least solvable. Exponential time algorithms typically have no hope of being solved on large inputs (and therefore are good candidates for heuristics, or approximations). For a bit more intuition, an algorithm with O(N^2) complexity may not be a good candidate for real-time processing in your web app - but it may be perfectly suitable for less time critical tasks. With an algorithm like this, you might decide to pre-compute some solutions as a workaround. With an exponential time algorithm O(C^N), on the other hand, the sun may burn out before your computation ends. Concerning O(infinity) - notice the lack of an input variable (N), and that infinity isn't a number. It's probably best to replace that idea with a statement about non-terminating routines. This might lead into a discussion about the halting problem, for example.
To contributors, needs to be changed to
Hi, I would like to work on this issue.
I wonder if this lesson might need more done to it than just a simple one sentence fix. The lesson text and quiz questions map directly to the video lesson, so correcting them while the video is saying something different would probably be confusing. This text fix might need to wait until there's a video fix. Or maybe we could add an errata at the top or bottom of the lesson text until the video is corrected?
I can work on creating a new video tomorrow afternoon.
Code change:
</div> <div class="spacer" <del> style="padding: 15px 0px; height: 1px;" </del> <ins> style="padding: 15px 0px;" </ins> /> <div class="text-center row"

Related discussion:
text: We have instances which is used to provide spacing for both side of the component to wrap it up in specific space Example: We can make the Spacer component smarter, and allow it to accept children, so the code be like. But in doing so, we need to: change the current values and how the padding is calculated, the old layout shouldn't change with the new spacers. change which padding has the new value, I think paddingBlock, which is paddingTop and paddingBottom, is the new padding property . I am requesting this because this will make live simpler, and we have to worry about less elements while controling the layout, and if we have specific cases, we can still use
There is an abstraction with , we need address, it's better if we can specify the direction of the padding. but this can be sorted in another issue, for now to solve this issue please allow to have children prop inside of it, but the current styles of the curriculum shouldn't change. If you would like to fix this issue, please make sure you read , we prioritize contributors following the instructions in our guides. Join us in or if you need help contributing, our prolific contributors will guide you through this.
Hey I have few questions while looking into this issue are few files where we have used Spacer, so may I just change wrap the content where ever needed or it would be handled in new issue? (I guess it must be done in other issue, as it would be easy to maintain) have implemented the children props, so may I raise a PR? Will break this issue in 2 other issues as well. 1 for wrapping the places it has been used, and 2nd for specifying the direction. I was wrapping and trying it out, I found out that Spacer has been used at every 2nd-3rd line of code, so do we need such a wrapper which would give spacing to all components present inside it or only to the parent component? EG: If we have 2 divs wrapped inside Spacer, then does both div have the spacing around them or only the outmost div.
Code change:
</div> <div class="spacer" <del> style="padding: 15px 0px; height: 1px;" </del> <ins> style="padding: 15px 0px;" </ins> /> <div class="text-center row"

Related discussion:
text: sorry for the delay, it was difficult to understand what you mean without looking at an example of code, so to answer you: yes the direction will be in a second issue, but the spacing and values should still be in this issue, so the pages won't look different Of course, please raise a PR after reading the guideline, nicely done . The Spacer shouldn't affect the children inside of it, think of it as creating a container with margin-block to space the area of the children inside of it from other areas
I guess we could close this issue
will be closed when the height is removed in the other PR
Code change:
}; this.containerRef = React.createRef(); <ins> this.editorRef = React.createRef(); </ins> } onResize() { this.setState({ resizing: true });

Related discussion:
text: Is your feature request related to a problem? Please describe. It currently can take a several key presses to navigate to the editor if it does not have focus. Describe the solution you'd like It should be possible to focus on the editor with a hotkey, for example 'e'. The issue where this was mostly discussed will be closed soon, but some thoughts about implementing this appeared there:
Code change:
<del> import React, { Fragment } from 'react'; </del> <ins> import React, { Fragment, Component } from 'react'; import Prism from 'prismjs'; </ins> import PropTypes from 'prop-types'; import './challenge-description.css';

Related discussion:
text: Related to . Once that's done, the code blocks will be written in blocks of  into ! while the same code on the guide looks like ! I think this change would make the code blocks easier to read, make the guide and challenges feel more like parts of a unified whole and fit better with the code editor aesthetic discussed in the . I'd be happy to work on this, if this is useful feature What do you think?
You should look into for this sort of thing. Goodluck. this is something we would probably be needing and using across Guide and Learn. So, I'll let you chime in and guide on this.
Code change:
} const onChange = (editorValue: string) => { <del> const { updateFile, fileKey } = props; </del> <ins> const { updateFile, fileKey, isResetting } = props; if (isResetting) return; </ins> // TODO: now that we have getCurrentEditableRegion, should the overlays // follow that directly? We could subscribe to changes to that and redraw if // those imply that the positions have changed (i.e. if the content height

Related discussion:
text: Originally reported by the editor region doesn't render when camper submits a challenge. https://user- This hide the instruction and lowerJaw, whenever this bug occurs
What browser/OS were you using to trigger this? I'm not able to replicate with either FF or Chrome on Windows/Linux. Or perhaps there is some trick to this that I'm not seeing in the video?
To be honest, I don't think this is a browser specific. she mentioned that chrome was used, my guess is that somewhere in the JavaScript files, it has if statement that stop editor region from rendering, because old PRs do account for this failing. The true solution is to findout, what changed and what isn't pleased. Otherwise, we can add , that fallback to a basic component with instruction and submit button. Or we can add another tab in the upperJaw, for instruction if editor region is It won't have editor region, but it's better than the current nothing. Sorry, I can't include all of it, but here is the discord discussion.
my user agent info (on Windows 11) User Agent is: <codeMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36</code
Here's a report on the forum with a similar issue (but on a different project) and the user had to move to their cell phone to complete the step and a recent one with the same issue but again, different project and step:
This should hopefully be fixed when gets in.
Here is a brand new report of someone having the same issue on the forum
Another report of this issue:
Usually, people can fix it by clearing the cache and closing and reopening the browser. Switching browsers also helps (likely for the same reason, fresh code). I get the feeling that this bug might not be reproducible in dev mode. It also seems like skipping steps and returning to them later is somehow involved. But I'm not sure what the exact steps are. Is there any information we can gather from people having this issue that can help debug it? Should we try sending people to this issue so we can collect information?
not reproducible. Feel free to open this issue again if it occurs.
Code change:
} const onChange = (editorValue: string) => { <del> const { updateFile, fileKey } = props; </del> <ins> const { updateFile, fileKey, isResetting } = props; if (isResetting) return; </ins> // TODO: now that we have getCurrentEditableRegion, should the overlays // follow that directly? We could subscribe to changes to that and redraw if // those imply that the positions have changed (i.e. if the content height

Related discussion:
text: I don't think this is completed just because we can't reliably reproduce it. It still happens, I have had it happen recently in one of the Python curriculum steps. I still have the step in the bugged state. 'm not sure it is reproducible in dev mode. 'm almost positive skipping steps, going back using the browser history (back button), and other such actions are involved. only affects a single step at a time. It is not like it happens and all your steps are broken. The one before and the next are fine. the cache is not enough you have to clear the cookies and other site data (Chrome wording). The storage (, etc.) is cleared when doing so. localStorage: Chrome bugged - and are empty Chrome working - and have content. Is there anything else I should look at? I'm almost positive if I clear the localStorage the bug will go away. But before I confirm that I will keep it as is in case someone has a suggestion for anything I should post that might help debug this. Fairly sure, the order of the event was I skipped a step forward and used the back button. But I can't really remember and I don't know if I did anything else. I suggest we keep this open to acknowledge the issue. As I suggested, it might be helpful if we gather information from people to help debug it.
Weird, I just randomly reproduced it in my test browser. Clearing the fixed it. I can do it reliably. With the dev tools open, completed the challenge, reset it, and resized the window by dragging the border. Edit: it is on this step It looks like the same bug but it is triggered by the layout change which I hadn't seen before. I'm guessing the reload when going back to the previous challenge can trigger it as well.
without your reliable way to reproduce, none of this would be possible. My findings doesn't show that submitting is necessary for the problem to appear. It's all in resetting challenge, with a twist. It's possible this is still not the original problem, but looking the same and caused by something different. Reproducing: anything in the initial contents. challenge. and are empty - invalid. This is the point when error can appear. everything still looks okay.
Code change:
} const onChange = (editorValue: string) => { <del> const { updateFile, fileKey } = props; </del> <ins> const { updateFile, fileKey, isResetting } = props; if (isResetting) return; </ins> // TODO: now that we have getCurrentEditableRegion, should the overlays // follow that directly? We could subscribe to changes to that and redraw if // those imply that the positions have changed (i.e. if the content height

Related discussion:
text: At this point: If anything is modified in editor contents - and are going back to normal. Crisis averted! Any action that makes editor reload (if that's right word here) results in missing editable region. This includes layout change as shown above. More code involved rundown: is reset. action is performed - and boundaries are filled from seed. prop is set to . of triggers effect is called. It changes the value (contents) of the editor , to the initial text contents. triggers of the Monaco editor. updates props of the challenge. Because the function uses the current state of the , which just had contents changed. There's no editable regions (decoration ranges) that are relevant for that at this time. Therefore is empty array. is performed, writing empty and to props for the challenge. 'm not entirely sure how's the timing for the other calls from the change effect. That effect triggers the change of . My tests suggests that is still when executes. is laying in wait.