Skip to content

Conversation

@VasylMarchuk
Copy link
Collaborator

Closes #3318

Brief

This fixes the video on the Print a prompt Shell course stage reloading every time ActionCable receives some data.

Details

Fixed by moving the video embed HTML code from the component getter into the template.

After

Знімок екрана 2025-12-06 о 13 21 36

Before

2025-12-06.12.42.18.mov

Checklist

  • I've thoroughly self-reviewed my changes
  • I've added tests for my changes, unless they affect admin-only areas (or are otherwise not worth testing)
  • I've verified any visual changes using Percy (add a commit with [percy] in the message to trigger)

@VasylMarchuk VasylMarchuk self-assigned this Dec 6, 2025
@VasylMarchuk VasylMarchuk added the bug Something isn't working label Dec 6, 2025
@github-actions
Copy link

github-actions bot commented Dec 6, 2025

Test Results

  1 files  ±0    1 suites  ±0   9m 57s ⏱️ - 5m 12s
681 tests ±0  630 ✅ +2  51 💤 ±0  0 ❌ ±0 
681 runs  ±0  630 ✅ +4  51 💤 ±0  0 ❌  - 2 

Results for commit f9afcca. ± Comparison against base commit 1dac855.

@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

);
}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video loads/unloads on focus toggle

3 participants