Closed Asartea closed 6 months ago
I think a mention in the webpack section makes a lot of sense - so much so I thought there already was one before checking
I think I agree with this, but I lack some familiarity around the organization of this content to make a determination around where it should be introduced.
Going to ping the @TheOdinProject/javascript team and get someone else's opinion.
I'd be hesitant to add something to the Webpack lesson since there's already so much going on there, but wouldn't be opposed depending on the resource (Atlassian's git ignore article as a whole may be a lot, but if we told users to just read the introduction and the patterns section, not too bad).
We could just add a section before the project assignment that covers briefly what a gitignore file is/does and how to use it for the project.
I'm not sure about putting it in the webpack section in its current form, though while Advait is working on more significant changes to the ESM + Webpack lessons, perhaps in the new form it could be integrated a little better.
Someone this morning in the discord general chat did bring this up and I was thinking perhaps if in the Restaurant Page project, the note that mentions .gitignore
could be reworded as such:
Quick tip: the
node_modules
folder can get really big. It is customary to add a.gitignore
file to your project so that you don’t have to sync the contents ofnode_modules
to github. The dependencies that are stored there can be installed from yourpackage.json
by runningnpm install
, so you don’t need to sync them.
to
Quick tip: the
node_modules
folder can get really big. It is customary to add a file called.gitignore
to the root of your project, withnode_modules
written inside. This means you will not be able togit add
thenode_modules
directory unless you force-added it. The dependencies that are stored there can be installed from yourpackage.json
by runningnpm install
, so you don’t need to sync them.
The person did express an interest in making this change in a PR for that project. But as there's currently changes being made to that project in an open PR and both of those people are first-time contributors, I'd rather not risk getting even more merge conflicts to complicate things and so they said they were happy to wait until this was all sorted first, then I'd let them know if they can make the change.
But since there's a conversation here already, what do people think about this proposed change instead?
The current tip about adding the node_modules folder to .gitignore
seems to be frequently ignored, and that's probably due to a lack of clarity. So I think it's a good change; from a beginner's point of view, it should be much clearer.
@MaoShizhong @cakegod maybe we just yank that tip out of the assignment and make it a note box before the assignment? The styling may help bring attention to it. That or just adding a "Set up a git ignore file" section before the assignment.
I can definitely see how the sub-bullet may get skipped over/missed, and short of adding more in-depth content on git ignore files, a quick blurb that has more attention brought to it may be a happy middle ground for now.
@thatblindgeye In my experience and honest opinion, it's still very common for stuff in a big yellow/blue lesson-note box to go ignored/missed.
I agree though that it being a sub-bullet of an already sub-step can make it easy to miss.
What do you think about making it an actual assignment step?
e.g. after step 1.3.3, before it gets to 2. Set up an HTML skeleton...
we have a new step 2 that instructs them to create a .gitignore
file with node_modules
as its contents? Then it's less of an aside (even a coloured one) and an actual part of the raw instructions?
(Also in the interest of reducing the possibility of potential further merge conflict issues with an ongoing PR I'm awaiting changes on from a first-time contributor, I'd like to request that if any changes are to be made to this lesson, then they're done after the PR I'm awaiting changes on is complete. Which hopefully with the last simple changes requested, should be fairly swift.)
What about being part of an assignment step and be included in a note box? Separately, of course.
Might be a little unnecessary? But really not a strong opinion on that. I do think that it should be mentioned in the actual instructions in some capacity, hence the suggestion to make it a top-level step as opposed to an unordered bullet of a sub-step
It could be part of a tip box mentioning that large files / production files should be included in gitignore, and then we also include it as a step, following the tip we previously provided.
A notebox that goes into a little more detail about what a git ignore is before the assignment (or an actual section) + assignment item, "Add XYZ to your gitignore file"? May not be too bad if there's no repeated content between the two.
If we do both it may make the assignment step regarding it less verbose. So instead of "1. Add a gitignore file. This is what it is/does...." we just simply tell users to add one and what files to add to it, then the notebox/section before the assignment goes into the what it is/does.
At a certain point users skipping over content falls on the user rather than on TOP to ensure things are clearly stated is something we should also keep in mind, though. Whether it's a notebox/lesson section in this project or some other lesson, users that want to skip over content will do so regardless of how many bolded, italicized, highighted, font-size 28px, arrow images pointing to content we do 😆
A general lesson-note on .gitignore
and its purpose, with a specific "add a .gitignore
containing node_modules
" in the instructions themselves seems like a good idea to me.
Agree, although not sure where you'd place it
@cakegod @Asartea @damon314159 Any of you want to PR this?
I'll do it if Asarta doesn't want it, since they were here first
I'm a bit busy, so feel free to take it
Checks
Describe your suggestion
The Restaurant page project makes mention of using a
.gitignore
file to untracknode_modules
, but it does not explain how to do this or what a gitignore file even is, and as far as I'm aware this is the first time it gets mentioned in the curriculum. It should probably contain some form of explanation on how this works.(but equally this would become a sub sub sub note in an assignment section: It might be better to introduce this in the Webpack lesson?)
Path
Node / JS
Lesson Url
https://www.theodinproject.com/lessons/node-path-javascript-restaurant-page
(Optional) Discord Name
asarta
(Optional) Additional Comments
No response