Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surround html tags with lines to follow lint #28133

Closed
wants to merge 6 commits into from

Conversation

asdacosta
Copy link
Contributor

Because

Multiline HTML tags should be surrounded by blank lines or code block delimiters

This PR

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Jun 7, 2024
Copy link
Member

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this PR together!

Looks like there are another couple of lint errors being thrown, can you fix those? After that this should be good to go.

@asdacosta
Copy link
Contributor Author

Thanks for putting this PR together!

Looks like there are another couple of lint errors being thrown, can you fix those? After that this should be good to go.

I dont understand those two lint errors. Kindly fix those.

@Asartea
Copy link
Contributor

Asartea commented Jun 8, 2024

@wise-king-sullyman I think those are known lint errors, resulting from the unorthodox structure of the installation lessons, which don't neatly fit the normal structure of a lesson. I think there was discussion about changing them to the "proper" lesson style at some point, but I'm not sure where/what the conclusion ended up being

@asdacosta
Copy link
Contributor Author

@wise-king-sullyman I think those are known lint errors, resulting from the unorthodox structure of the installation lessons, which don't neatly fit the normal structure of a lesson. I think there was discussion about changing them to the "proper" lesson style at some point, but I'm not sure where/what the conclusion ended up being

Oh Ok. But I still don't get the defined structure it is supposed to follow. You're the boss, so please do what you think has to be done or you can proceed to merge if there is not a precise conclusion for that like you said.

Copy link
Contributor

@MaoShizhong MaoShizhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In regards to the "Required heading structure" error, that comes from most of the headings after the assignment being the wrong level. The top of the file has a markdownlint-disable comment, but it mistakenly disables MD043, which we don't actually use. Instead, it should disable TOP004.

As per #27960, this whole thing is something we need to revisit later on and restructure these installation steps, but that's currently low priority given other stuff we need to focus on. So for now, the beste would be to change the MD043 disabling to TOP004, then also add a TODO comment at the top. Let's use the ones that are in the existing PSQL installation lessons. @asdacosta please replace the markdownlint-disable comment and the top with the following:

<!-- TODO: Revisit lesson/heading structure to remove need to disable rules -->
<!-- markdownlint-disable MD024 TOP004 -->

As for the note box, we could probably remove the heading then return the note box to where it was in the introduction section (the level 4 heading is what's triggering the error). Technically we could just move it somewhere like just below the Assignment section (and leave the heading in), but I feel it's more visible at the top of the lesson.

@asdacosta
Copy link
Contributor Author

In regards to the "Required heading structure" error, that comes from most of the headings after the assignment being the wrong level. The top of the file has a markdownlint-disable comment, but it mistakenly disables MD043, which we don't actually use. Instead, it should disable TOP004.

As per #27960, this whole thing is something we need to revisit later on and restructure these installation steps, but that's currently low priority given other stuff we need to focus on. So for now, the beste would be to change the MD043 disabling to TOP004, then also add a TODO comment at the top. Let's use the ones that are in the existing PSQL installation lessons. @asdacosta please replace the markdownlint-disable comment and the top with the following:

<!-- TODO: Revisit lesson/heading structure to remove need to disable rules -->
<!-- markdownlint-disable MD024 TOP004 -->

As for the note box, we could probably remove the heading then return the note box to where it was in the introduction section (the level 4 heading is what's triggering the error). Technically we could just move it somewhere like just below the Assignment section (and leave the heading in), but I feel it's more visible at the top of the lesson.

I’m very confused. Can you please do it…

@MaoShizhong
Copy link
Contributor

@asdacosta You know how you moved the lesson-note box from the introduction section to the lesson overview section?
Move it back to where it was in the introduction section, then get rid of the level 4 heading inside the lesson-note.

@asdacosta
Copy link
Contributor Author

@asdacosta You know how you moved the lesson-note box from the introduction section to the lesson overview section?
Move it back to where it was in the introduction section, then get rid of the level 4 heading inside the lesson-note.

Alright. I think I did so in the last commit, so will deleting the last file revert the last commit changes or I need to manually change and commit?

@MaoShizhong
Copy link
Contributor

However you do it is up to you, whether that's a revert commit or just manually changing.

@asdacosta
Copy link
Contributor Author

However you do it is up to you, whether that's a revert commit or just manually changing.

I just wanted to be sure as I’ve not used the delete method before.

@MaoShizhong
Copy link
Contributor

@asdacosta I'm not sure why the lesson file was deleted? All that needed to be done was moving the lesson-note back to the introduction section and just removing its level 4 heading. We don't want to delete the entire lesson file.

@asdacosta
Copy link
Contributor Author

asdacosta commented Jun 17, 2024

@asdacosta I'm not sure why the lesson file was deleted? All that needed to be done was moving the lesson-note back to the introduction section and just removing its level 4 heading. We don't want to delete the entire lesson file.

This is why I wanted to confirm before deleting. I thought that’d revert the last commit changes. So will making changes on the last but one commit bring back the file?

@MaoShizhong
Copy link
Contributor

MaoShizhong commented Jun 17, 2024

I thought you were intending to just revert the previous commit, I didn't realise you thought you needed to actually delete the file to do so. Deleting the file won't "undo commits", it'll just do exactly that - delete the file. You don't delete anything, you'd just use git revert HEAD~1 to make a new revert commit that undoes the changes from the previous.

While we could try to walk through another revert, it would probably be easiest in your case to do a fresh PR. Up to you

@asdacosta
Copy link
Contributor Author

I thought you were intending to just revert the previous commit, I didn't realise you thought you needed to actually delete the file to do so. Deleting the file won't "undo commits", it'll just do exactly that - delete the file. You don't delete anything, you'd just use git revert HEAD~1 to make a new revert commit that undoes the changes from the previous.

While we could try to walk through another revert, it would probably be easiest in your case to do a fresh PR. Up to you

I prefer we do a revert instead of a new PR, so kindly show me how or if you could initiate the revert yourself that’d great as I’m new to this.

@MaoShizhong
Copy link
Contributor

@asdacosta Personally, I would just do a new PR. It looks like you've been making these changes all via the GitHub interface as opposed to on your local machine using the Git CLI?

@asdacosta
Copy link
Contributor Author

@asdacosta Personally, I would just do a new PR. It looks like you've been making these changes all via the GitHub interface as opposed to on your local machine using the Git CLI?

Yes

@MaoShizhong
Copy link
Contributor

@asdacosta Personally, I would just do a new PR. It looks like you've been making these changes all via the GitHub interface as opposed to on your local machine using the Git CLI?

Yes

It would be much easier to fix this by just opening a fresh PR, unless you're already comfortable with cloning this branch to your local machine and reverting last two commits locally before pushing back. A fresh PR would be by far the simplest otherwise.

@asdacosta asdacosta closed this Jul 10, 2024
@asdacosta
Copy link
Contributor Author

@asdacosta Personally, I would just do a new PR. It looks like you've been making these changes all via the GitHub interface as opposed to on your local machine using the Git CLI?

Yes

It would be much easier to fix this by just opening a fresh PR, unless you're already comfortable with cloning this branch to your local machine and reverting last two commits locally before pushing back. A fresh PR would be by far the simplest otherwise.

It already has conflicting files. I’m sure changes have been made to the original file so I might need to do a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Foundations Involves the Foundations content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants