-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add support for podcast image i n Picture.tsx #12568
Conversation
Size Change: +21 B (0%) Total Size: 921 kB ℹ️ View Unchanged
|
# Conflicts: # dotcom-rendering/src/layouts/StandardLayout.tsx
# Conflicts: # dotcom-rendering/src/components/Picture.tsx # dotcom-rendering/src/layouts/StandardLayout.tsx
# Conflicts: # dotcom-rendering/src/components/ArticleMeta.web.tsx
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
isMainMedia, | ||
isLightbox, | ||
orientation, | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to add more customisation to the Picture
component, do we want to do it like this, where we add an override that says anything goes, or do we want to add a new flag for isPodcastCover
or something like that?
Reason I ask is because of the disclaimer at the top of decideImageWidths
:
All business logic for image sizing is contained in this one function. This is the source of truth.
With this change, this is no longer the case.
I'll admit it doesn't feel sustainable to have a function that receives a growing series of arguments to account for a possibly endless list of weird and wonderful new use cases. It also doesn't feel good for that function to canonise some widths as "source of truth" and for everything else, there's a custom role. And since this podcast cover image has been around for at least 8 years and is canonised in CAPI and tag manager, maybe dotcom-rendering needs to bite the bullet and accept it as a thing also.
PS I'm away until Thursday so please overrule me if, in general, there's disagreement on this point. I don't want my absence to be a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… the source of truth for image widths
… the source of truth for image widths
Seen on PROD (created by @oliverabrahams and merged by @sndrs 8 minutes and 24 seconds ago) Please check your changes! |
What does this change?
Adds support for the podcast cover image to the Picture component.
Why?
Migrating the audio page from FE to DCR.
This PR has a slight change in the Props for the
<Picture/>
component. It updates the argrole: PictureRoleType