-
Notifications
You must be signed in to change notification settings - Fork 212
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
Closes #6638: Handle Properly picture tag #6659
Closes #6638: Handle Properly picture tag #6659
Conversation
2d0f5d6
to
3a16cb0
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more Footnotes
|
5efbb83
to
d80f88e
Compare
Need to lint the code a bit |
My bad, didn't see that failed CI. |
Test plan:
|
Good morning @Mai-Saad & @piotrbak , Latest commits are adding the following:
Also, e2e is passing on my side, everything ok. |
@Miraeld I see you moved this to Ready for Review. |
The codebase is ready for review, And it's just been updated with develop latest changes. |
@wordpressfan Thanks for sharing markups above.
Update: it's 2nd source missing and thus min-width is not correct thanks to @Miraeld it's missing to preload
|
E2E results: https://wp-media.slack.com/archives/CUT7FLHF1/p1717653110913929?thread_ts=1717624428.972699&cid=CUT7FLHF1 |
I was checking on <picture class="core-image">
<source type="image/webp" media='(max-width: 500px)' srcset="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-400x600.webp">
<source type="image/webp" media='(min-width: 501px) and (max-width: 768px)' srcset="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-768x513.webp">
<img class="skip-lazy" src="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-1348x900.webp" alt="Kwiatowy księżyc" title="Kwiatowy księżyc">
</picture> @piotrbak for everything related to the only markup @Mai-Saad mentioned was wrong, on develop we are getting the following preload tag: <link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-1348x900.webp" fetchpriority="high"> What we are getting on this PR: <link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-400x600.webp" media="(max-width: 500px)" fetchpriority="high">
<link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-1348x900.webp" media="(min-width: 500.1px)" fetchpriority="high"> Not sure if this is a regression or not what we are getting with this PR. <link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-400x600.webp" media="(max-width: 500px)" fetchpriority="high">
<link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-768x513.webp" media="(min-width: 501px) and (max-width: 768px)" fetchpriority="high">
<link rel="preload" as="image" href="https://variance.pl/wp-content/uploads/2024/05/Kwiatowy-Ksiezyc-1348x900.webp" alt="Kwiatowy księżyc" media="(min-width: 768.1px)" fetchpriority="high"> I was thinking to move this case out of this PR, so everything else can move forward while this one is being worked on. EDIT: |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
…o fix/picture-markup-type-bailout
…ure-src-regression
@MathieuLamiot , @Mai-Saad , |
@Miraeld Thanks for the update.
Possible breaking markups (not sure if it's common, needs further investigation and expected o/p from @wp-media/productrocket if we will handle any in new GH maybe):
will be preloaded as
2- using max-height instead of max-width https://new.rocketlabsqa.ovh/lcp_picture_template2_maxheight/
will be
|
Re-ran E2E to confirm: all good (details here). Only waiting for @piotrbak @DahmaniAdame confirmation on the 2 points from @Mai-Saad above. |
@MathieuLamiot @Mai-Saad We're good with those |
Description
Fixes #6638 #6660 #6669
Documentation
User documentation
First of all, this PR brings a fix for the LCP candidates when it's a
<picture>
tag detected. Before, we would also detect the sub-tag<img>
and both would compete each other leading to errors.Then, it also brings another way to process
<picture>
tag when there is atype
attribute in order to preload the first<source>
image.Technical documentation
Type of change
New dependencies
Risks
Checklists
Feature validation
Documentation
Code style
Observability
Risks