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

feat: Add option to use HTML comments instead of details/summary #3

Merged
merged 1 commit into from
May 11, 2022

Conversation

heiskr
Copy link
Contributor

@heiskr heiskr commented May 4, 2022

Why:

Towards https://github.com/github/skills/issues/40

What's being changed:

Currently step authoring looks like this:

<details id=0 open>
  <summary>Start</summary>
</details>

<details id=1>
  <summary>Step 1</summary>
</details>

<details id=2>
  <summary>Step 2</summary>
</details>

<details id=X>
  <summary>Finish</summary>
</details>

This would create the option to also author steps like:

<!--step0-->
Start
<!--endstep0-->

<!--step1
Step 1
endstep1-->

<!--step2
Step 2
endstep2-->

<!--stepX
Finish
endstepX-->

The purpose of this change would be to hide the step content when starting a course. I tried to think of the easiest way to do this without confusing course authors or creating a big change to how the actions workflows work. For learners this means they would only see the current step they are on. For authors, this means you'd need to play with the HTML comments a bit to see what you are currently working on.

@emilyistoofunky
Copy link

Thanks @heiskr! I like this option. I think we should choose one or the other as our default.

Could you explain this a bit more?

For authors, this means you'd need to play with the HTML comments a bit to see what you are currently working on.

@heiskr
Copy link
Contributor Author

heiskr commented May 5, 2022

So if the markdown file looks like this:

<!--step0-->
Start
<!--endstep0-->

<!--step1
Step 1
endstep1-->

<!--step2
Step 2
endstep2-->

<!--stepX
Finish
endstepX-->

Then only the "start" would be viewable, so you'd need to close up the HTML comment to see the section you are working on...

<!--step1-->
Step 1
<!--endstep1-->

...and then change it back before committing...

<!--step1
Step 1
endstep1-->

@heiskr heiskr changed the title Add option to use HTML comments instead of details/summary feat: Add option to use HTML comments instead of details/summary May 11, 2022
@heiskr
Copy link
Contributor Author

heiskr commented May 11, 2022

Merging, leaving the "default" decision up to @dihydroJenoxide

@heiskr heiskr merged commit 6444e3c into main May 11, 2022
@heiskr heiskr deleted the html-comment-steps branch May 11, 2022 22:14
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants