Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[Elm] Add concept introductions #2983

Merged
merged 2 commits into from
Jan 8, 2021
Merged

Conversation

ErikSchierboom
Copy link
Member

We've recently specified that each concept should have its own introduction.md file: https://github.com/exercism/v3-docs/blob/master/anatomy/tracks/concepts.md#file-introductionmd.

This PR tries to automatically add these introduction.md files for each of the concept of your track. It does that as follows:

  • If there is an exercise that teaches that concept:
    • If the exercise has a level 2 heading that matches the concept slug: create the introduction.md file with the contents directly following the level 2 header
    • Else: create the introduction.md file with its contents being the exercise's entire introduction.md file, but with a TODO added to the top
  • Else: create the introduction.md file containing a TODO placeholder

See #2975

@ErikSchierboom ErikSchierboom requested a review from a team as a code owner January 8, 2021 09:38
@ErikSchierboom
Copy link
Member Author

/format

@mpizenberg
Copy link
Member

So if I summarize things to make sure I understand correctly, we have:

  • concepts/basics/introduction.md: Initial description of the concept that students will see before starting it. Should be concise.
  • exercises/concept/lucians-luscious-lasagna/.docs/introduction.md: The intro description that the student is presented when starting the concept exercise. Should contain more details than concepts/basics/introduction.md.
  • concepts/basics/about.md: Summary of concept that students see after completing the exercise. Should at least contain the info in exercises/concept/lucians-luscious-lasagne/.docs/introduction.md.

Is that correct? It's a little weird to me that there is all this juggling between the concepts/ and exercises/ directories.

@ErikSchierboom
Copy link
Member Author

ErikSchierboom commented Jan 8, 2021

concepts/basics/introduction.md: Initial description of the concept that students will see before starting it. Should be concise.

Correct.

exercises/concept/lucians-luscious-lasagna/.docs/introduction.md: The intro description that the student is presented when starting the concept exercise. Should contain more details than concepts/basics/introduction.md.

This is not necessarily true. The exercise's introduction could have different information than the concept's introduction, but in the majority of the cases they will be identical. One reason for why they could be different is when you want to rewrite things a bit to better fit the exercise. As the two files will often have the same contents, we will be supporting a template for the exercise's introduction.md file that can refer to the concept's introduction: https://github.com/exercism/v3-docs/blob/master/anatomy/tracks/configlet/generating-documents.md#document-concept-exercises-introductionmd-file

concepts/basics/about.md: Summary of concept that students see after completing the exercise. Should at least contain the info in exercises/concept/lucians-luscious-lasagne/.docs/introduction.md.

This is correct. The about.md file contains a full exploration of the concept.

Is that correct? It's a little weird to me that there is all this juggling between the concepts/ and exercises/ directories.

Well, it might seem weird from the viewpoint of Exercism v2, but in v3 concepts are separate, stand-alone entities that are viewable outside the context of an exercise. You could consider concepts to be more important than the actual concept exercises, as the latter serve just as the vehicle to teach concepts. Each concept will have its own, dedicated page, and its contents will depend on whether the student has completed the exercise teaching that concept. If so, the about.md contents are shown, if not, the introduction.md is shown. There will also be an option to add notes to documents.

We'll also allow linking to concepts, which could e.g. be very convenient for mentors.

@ErikSchierboom ErikSchierboom merged commit efa318d into master Jan 8, 2021
@ErikSchierboom
Copy link
Member Author

Thanks!

@ErikSchierboom ErikSchierboom deleted the elm-concept-introductions branch January 8, 2021 11:06
@mpizenberg
Copy link
Member

Alright, in practice, for our basics concept we end up with 3 identical files but I guess that's mainly because it's the basics one. We might better differentiate those for subsequent concepts.

@ErikSchierboom
Copy link
Member Author

That's indeed quite likely. One way in which the about.md of the basics concept will be different from the introduction.md is that the former can have links. It can also go in a more detail of the concepts, if that makes sense there.

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

Successfully merging this pull request may close these issues.

None yet

3 participants