Skip to content

Commit

Permalink
Merge pull request #2505 from codecrafters-io/stage-2-experiments
Browse files Browse the repository at this point in the history
Tweak the placement of shortInstructions
  • Loading branch information
andy1li authored Dec 27, 2024
2 parents 299487f + f252e76 commit d2f5b46
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<CoursePage::InstructionsCard @title="How to pass this stage" id="second-stage-tutorial-card" ...attributes>
<:content>
<div class="prose dark:prose-invert mb-5">
{{#if (or (not (eq @repository.course.slug "shell")) (not this.shouldShowShortInstructions))}}
{{#if (and this.shouldShowShortInstructions (eq @repository.course.slug "shell"))}}
<div class="mb-5 prose-compact">
{{markdown-to-html @courseStage.shortInstructionsMarkdown}}
</div>
{{else}}
<p>
In this stage, you'll implement your own solution. Unlike stage 1, your repository doesn't contain commented code to pass this stage.
</p>
Expand All @@ -20,7 +24,6 @@
@courseStage={{@courseStage}}
@isComplete={{this.implementSolutionStepIsComplete}}
@languageGuide={{@languageGuide}}
@shouldShowShortInstructions={{this.shouldShowShortInstructions}}
/>
{{else if (eq stepList.expandedStep.id "run-tests")}}
<CoursePage::CourseStageStep::SecondStageTutorialCard::RunTestsStep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
<div class="prose dark:prose-invert prose-compact mb-3">
{{#if (and @shouldShowShortInstructions (eq @repository.course.slug "shell"))}}
{{markdown-to-html @courseStage.shortInstructionsMarkdown}}
<p>
Head over to your editor / IDE and implement your solution.
</p>
{{else}}
<p>
Head over to your editor / IDE and implement your solution.
</p>

{{#unless this.solution}}
<p>
Head over to your editor / IDE and implement your solution.
If you want a quick look at what functions to use or how to structure your code, we recommend looking at
<LinkTo @route="course.stage.code-examples">Code Examples</LinkTo>.
</p>

{{#unless this.solution}}
<p>
If you want a quick look at what functions to use or how to structure your code, we recommend looking at
<LinkTo @route="course.stage.code-examples">Code Examples</LinkTo>.
</p>
{{/unless}}
{{/if}}
{{/unless}}
</div>

{{#if this.solution}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface Signature {
courseStage: CourseStageModel;
isComplete: boolean;
languageGuide?: CourseStageLanguageGuideModel;
shouldShowShortInstructions: boolean;
};
}

Expand Down

0 comments on commit d2f5b46

Please sign in to comment.