Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate YoutubeAtom to DCR #8836

Merged
merged 9 commits into from
Sep 28, 2023
Merged

Migrate YoutubeAtom to DCR #8836

merged 9 commits into from
Sep 28, 2023

Conversation

AshCorr
Copy link
Member

@AshCorr AshCorr commented Sep 14, 2023

What does this change?

Migrates all of the youtube atom code from CSNX to DCR.

I've tried to keep changes fairly minimal but needed to change a few things to get this to work correctly in DCR / comply with DCR linting.

  • Removes reliance on articlePillar colours, this was deprecated a while back. We use decidePalette in DCR to do this now.
  • Use DCRs ImageSource instead of atom-renderings one. Our one has weighting which is completely ignored by YoutubeAtom
  • Treat window.YT as undefined in DCR. I'm not sure how this isn't a problem in atoms-rendering, but for some reason Typescript thinks window.YT will never be undefined, which is completely untrue.

Why?

This allows us to better support the YoutubeAtom and use eventually our image optimiser to improve user experience

Screenshots

Before After
before after

@github-actions
Copy link

github-actions bot commented Sep 21, 2023

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

@AshCorr AshCorr linked an issue Sep 21, 2023 that may be closed by this pull request
@AshCorr AshCorr marked this pull request as ready for review September 21, 2023 14:28
@AshCorr AshCorr requested a review from a team as a code owner September 21, 2023 14:28
@arelra arelra added the run_chromatic Runs chromatic when label is applied label Sep 25, 2023
Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

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

Nice work @AshCorr ! 🎬

@AshCorr AshCorr merged commit ba40e6b into main Sep 28, 2023
@AshCorr AshCorr deleted the ash/YoutubeAtom branch September 28, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotcom-rendering run_chromatic Runs chromatic when label is applied
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate youtube atom to DCR
2 participants