chore: updating world map workshop prototype#1136
chore: updating world map workshop prototype#1136danielfreire-dev wants to merge 8 commits intofreeCodeCamp:mainfrom
Conversation
|
what issue is this change related to? |
|
Are you part of Naomi's sprints? If so, please provide details on what this PR is in relation to so we better understand the context for these changes. Are you working on a lab or workshop? |
|
Yes, I am part of Naomi's Sprints.
EDIT: added one more item |
majestic-owl448
left a comment
There was a problem hiding this comment.
please mention the issue when you create a PR
please update the title so that it follows the docs https://contribute.freecodecamp.org/#/how-to-open-a-pull-request?id=prepare-a-good-pr-title
the csv data needs to go on the CDN repo (https://github.com/freeCodeCamp/cdn) and should be fetched (with d3 that is d3.json(url)
we are not able to have d3 as a minified version, this is the html for an other d3 project, you need to import `d3 in a similar way in your project
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Build a Scatterplot Graph</title>
<link rel="stylesheet" href="styles.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.9.0/d3.min.js"></script>
</head>
<body>
<script src="script.js"></script>
</body>
</html>because of how the editor works in the freeCodeCamp environment, the JS file name should be script.js and the CSS file name should be styles.css
…re and requests an online version of the csv file
jdwilkin4
left a comment
There was a problem hiding this comment.
Can you move this project over to the full stack folder? it will be easier to find all of these projects in one place later on.
https://github.com/freeCodeCamp/CurriculumExpansion/tree/main/fullstack-cert/d3-projects
…nt-end-libs' -> 'full-stack-certs'
…nt-end-libs' -> 'full-stack-certs'
jdwilkin4
left a comment
There was a problem hiding this comment.
It looks like you have a lot of extra files that don't need to be there.
You should only have three files.
An HTML file, CSS file and js file.
Once you resolve that, then we can review your project 👍🏾
|
Did you need help resolve the extra files listed here? |
|
I created a new PR to add these files to the CDN. I am waiting for its approval. EDIT: grammar |
|
@jdwilkin4 most of those where already existing files that got moved when the project folder was moved. Do you think they should be deleted? or the |
|
Yeah, lets delete all of those extra files. Like the lessons files and folder and extra stuff like that. This PR should only contain the html, css and JS files. |
|
You should only have 3 files (index.html, styles.css. and script.js) in this PR because that is what will be used on learn. |
so there should be an other PR deleting the Lessons folder? if deleted in this PR they will appear in this PR |
|
I pushed up some commit to reduce the file size from 143 to 10. This will make it easier to review 👍🏾 Please pull down those latest changes. Once the CDN PR is resolved and merged in, then you will need to update your script.js to use the cdn link. |
majestic-owl448
left a comment
There was a problem hiding this comment.
Thanks for the updates! A few things to address:
test.html should be removed, it looks like a leftover file.
script.js has a bug with D3 v7: d3.event was removed in v7, so the zoom won't work. The zoomed function needs to accept the event as a parameter:
function zoomed(event) {
g.attr("transform", event.transform);
}And the .on("zoom", zoomed) call is fine as-is.
A few cleanup items in script.js:
- The
// TODO: replace with freeCodeCamp CDN linkcomment at the top is stale, the path already uses the CDN - Remove the
console.logstatements for min/max population - Remove the commented-out
// const lowand// const highlines

Checklist:
Update index.md)relates to #64629