Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Removal of --before-user-code--, --after-user-code-- #57107

Copy link
Copy link
Open
@ojeytonwilliams

Description

@ojeytonwilliams
Issue body actions

Back when all lessons had to run in a single file, it made perfect sense to hide boilerplate code. Particularly given that we couldn't guide learners to the salient part of the code like we can now.

However, this comes with downsides. A curious learner cannot easily access this code to experiment with it and there's potential for weird bugs when they accidentally do. Also, as we expand the kinds of lessons we want to write, it's starting to feel more and more like tech debt.

I ran into this recently when trying to support multifile React lessons - the head (--before-user-code--), contents (user's code) and tail (--after-user-code--) ended up being compiled into the same module three times, each overwriting the one before. The end result being the user code was lost, replaced by the tail. I can work around this, but it illustrates the kind of problem they cause.

If there's a still a solid reason to keep the head and tail around, that's okay. If not, I think we can save ourselves some future pain by getting rid of them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.Lessons, Challenges, Projects and other Curricular Content in curriculum directory.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.