Closed jonkafton closed 1 week ago
@steven-hatch fyi ☝️
What was your expectation for media cards and course/program cards being mixed on the same carousel?
Jon's solution—make the square aspect ratio opt in, and only use it where we know all cards are media—seems reasonable.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/4523
Description (What does it do?)
Displays media resource (podcast episodes, videos) images tn the homepage Media section carousel with square aspect ratios.
Screenshots (if appropriate):
How can this be tested?
Navigate to homepage. Check resource cards in the Media section have images with aspect ratio 1 and that their loading state reflects loaded proportions. Check that other resource cards are not affected.
Additional Context
isMedia
prop to theLearningResourceCard
.Opted to do this by configuration because although we can detect that a resource is media by its resource type (
podcast
,podcast_episode
,video
), if we do that at the card level we end up with these: