Skip to content

Commit afe5857

Browse files
committed
refactor(tutorial-card): remove read-instructions step and simplify completion logic
Eliminate the read-instructions step component and associated markup to streamline the second stage tutorial card. Update completion logic to only track the implement-solution step, removing redundant state and analytics tracking for read-instructions. This reduces complexity and improves UI clarity by focusing on the most important step users need to complete.
1 parent dcc890a commit afe5857

File tree

4 files changed

+6
-51
lines changed

4 files changed

+6
-51
lines changed

app/components/course-page/course-stage-step/second-stage-tutorial-card/implement-solution-step.hbs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<div class="prose dark:prose-invert prose-compact mb-3">
2+
<p>
3+
The
4+
<a href="#your-task-card">Your Task</a>
5+
card below contains a description of what you need to implement to pass tests.
6+
</p>
7+
28
<p>
39
Head over to your editor / IDE and implement your solution.
410
</p>

app/components/course-page/course-stage-step/second-stage-tutorial-card/index.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ export default class SecondStageTutorialCard extends Component<Signature> {
6666
return this.coursePageState.manuallyCompletedStepIdsInSecondStageInstructions.includes('implement-solution');
6767
}
6868

69-
get readInstructionsStepIsComplete() {
70-
return this.implementSolutionStepIsComplete || this.readInstructionsStepWasMarkedAsComplete;
71-
}
72-
73-
get readInstructionsStepWasMarkedAsComplete() {
74-
return this.coursePageState.manuallyCompletedStepIdsInSecondStageInstructions.includes('read-instructions');
75-
}
76-
7769
get runTestsStepIsComplete() {
7870
return (
7971
this.args.repository.stageIsComplete(this.args.courseStage) ||
@@ -92,18 +84,7 @@ export default class SecondStageTutorialCard extends Component<Signature> {
9284

9385
@action
9486
handleStepCompletedManually(step: StepDefinition) {
95-
if (step.id === 'read-instructions') {
96-
this.coursePageState.recordManuallyCompletedStepInSecondStageInstructions('read-instructions');
97-
98-
this.analyticsEventTracker.track('completed_second_stage_tutorial_step', {
99-
step_number: 1,
100-
step_id: 'read-instructions',
101-
repository_id: this.args.repository.id,
102-
});
103-
}
104-
10587
if (step.id === 'implement-solution') {
106-
this.coursePageState.recordManuallyCompletedStepInSecondStageInstructions('read-instructions');
10788
this.coursePageState.recordManuallyCompletedStepInSecondStageInstructions('implement-solution');
10889

10990
this.analyticsEventTracker.track('completed_second_stage_tutorial_step', {

app/components/course-page/course-stage-step/second-stage-tutorial-card/read-instructions-step.hbs

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/components/course-page/course-stage-step/second-stage-tutorial-card/read-instructions-step.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)