Open peterschewe opened 2 years ago
For the TBD
Caption: Where do we like to use a caption? c-responsive-media vs. m-media
In my opinion it should be placed inside the c-responsive-media since the caption barely changes. So if you use the component somewhere else, would there be another caption?
And another suggestion is that we might need a desktop and a mobile caption since it is possible to maintain two different things now.
For the TBD
Caption: Where do we like to use a caption? c-responsive-media vs. m-media
In my opinion it should be placed inside the c-responsive-media since the caption barely changes. So if you use the component somewhere else, would there be another caption?
Yes, that is a good point. I can only see a disadvantage if the caption is not directly aligned with the media. For example, the media could be fullscreen and the caption could remain in the content grid. This is also possible in the component. But maybe it's more difficult if it's already in a grid (of the module). The case can probably be ignored...
And another suggestion is that we might need a desktop and a mobile caption since it is possible to maintain two different things now.
I would consider the responsive media as a unit. It is meant to be displayed differently, but the purpose of the content is the same. We also use only one alt text for both media.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
10.8% Duplication
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
10.8% Duplication
This PR merges all media components (
c-image
,c-video
,c-media
) into a new componentc-responsive-media
.Todos
c-image
and add as recipe insteadc-video
and add as recipe instead (new name:c-video-player
)<source>
instead of at<img>
. This change is important if different ratios are defined via sources. The img itself must not have a default size.c-responsive-media
TBD
c-responsive-media
vs.m-media
playsinline
attribute in the video util yet. I'm not sure if it would cause problems on iOS.New component: Responsive media
The component simplifies the handling of images and short loop videos, which can be used in the hero or media module, for example.
The name (
c-responsive-media
instead ofc-media
) is also a clearer distinction from the modulem-media
.Features
Contentful
Markup (simplified)