Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@
{{markdown-to-html this.instructionsMarkdown}}
</div>

{{#if this.videoEmbedHtml}}
{{#if @currentStep.courseStage.course.isShell}}
<div class="mb-8 max-w-3xl rounded-xl overflow-hidden">
{{html-safe this.videoEmbedHtml}}

{{! template-lint-disable no-inline-styles }}
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;">
<iframe
src="https://www.loom.com/embed/63531adfeb6242eeaff9171bc1211947?hide_title=true&hideEmbedTopBar=true&hide_owner=true"
style="top: 0; left: 0; width: 100%; height: 100%; position: absolute; border: 0;"
allowfullscreen
scrolling="no"
allow="encrypted-media *;"
title="Instructions"
/>
</div>

</div>
{{/if}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,6 @@ export default class FirstStageYourTaskCard extends Component<Signature> {
);
}

get videoEmbedHtml() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VasylMarchuk how does this work? How come this approach triggers a re-render but the other doesn't? 🤔 I thought if property values don't change after one runloop ember doesn't trigger re-renders?

Copy link
Member

@rohitpaulk rohitpaulk Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty unintuitive fix, so want to see if we can either fix an underlying problem so that it's not needed, or come up with a rule of thumb around when to use template vs. properties.

Additionally, I don't think this change will work forever - today the embed html value is hardcoded in the frontend, but in the future it'll come from a property on the CourseStage model. We already have something like this for the CourseStageScreencast model.

if (this.args.currentStep.courseStage.course.isShell) {
return `
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe
src="https://www.loom.com/embed/63531adfeb6242eeaff9171bc1211947?hide_title=true&hideEmbedTopBar=true&hide_owner=true"
style="top: 0; left: 0; width: 100%; height: 100%; position: absolute; border: 0;"
allowfullscreen
scrolling="no"
allow="encrypted-media *;"
></iframe></div>`;
} else {
return null;
}
}

@action
handleViewLogsButtonClick() {
this.coursePageState.testResultsBarIsExpanded = true;
Expand Down