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

[2.1] Set amp-wp-unknown-size class and object-fit=contain for videos with unknown dimensions #6578

Merged
merged 5 commits into from
Aug 30, 2021

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Aug 30, 2021

Cherry-picks #6576 (for #6571) into the 2.1 branch, with the one addition of 41f6fbe which came originally from #6518.

@westonruter westonruter added this to the v2.1.4 milestone Aug 30, 2021
@westonruter westonruter marked this pull request as ready for review August 30, 2021 06:28
@westonruter westonruter requested a review from pierlon August 30, 2021 06:28
Copy link
Contributor

@pierlon pierlon left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:.

@@ -4,7 +4,8 @@
* width such as in the post content so that the contents do not get stretched or cropped.
* See <https://github.com/ampproject/amphtml/issues/21371#issuecomment-475443219>.
*/
.amp-wp-enforced-sizes {
.amp-wp-enforced-sizes,
.amp-wp-unknown-size {
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch.

@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #6578 (807cf9b) into 2.1 (6f10e8a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##                2.1    #6578   +/-   ##
=========================================
  Coverage     75.70%   75.70%           
- Complexity     5918     5921    +3     
=========================================
  Files           237      237           
  Lines         17928    17931    +3     
=========================================
+ Hits          13572    13575    +3     
  Misses         4356     4356           
Flag Coverage Δ
javascript 79.17% <ø> (ø)
php 75.54% <100.00%> (+<0.01%) ⬆️
unit 75.54% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
includes/sanitizers/class-amp-img-sanitizer.php 97.63% <ø> (-0.02%) ⬇️
includes/sanitizers/class-amp-video-sanitizer.php 99.18% <100.00%> (+0.02%) ⬆️

@westonruter westonruter enabled auto-merge August 30, 2021 06:30
@westonruter westonruter merged commit 5c635f4 into 2.1 Aug 30, 2021
@westonruter westonruter deleted the fix/6571-video-with-unknown-dimension-2.1 branch August 30, 2021 06:33
@github-actions
Copy link
Contributor

Plugin builds for 807cf9b are ready 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants