Skip to content

Commit 5c3e698

Browse files
committed
Merge branch 'trunk' of https://github.com/WordPress/performance into add/external-bg-preload
2 parents fbb6076 + 7e69f6b commit 5c3e698

File tree

14 files changed

+45
-35
lines changed

14 files changed

+45
-35
lines changed

.github/workflows/php-test-plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
coverage: [false]
4747
include:
4848
- php: '7.4'
49-
wp: '6.5'
49+
wp: '6.6'
5050
- php: '8.3'
5151
wp: 'trunk'
5252
- php: '8.2'

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
},
1313
"devDependencies": {
1414
"@octokit/rest": "^21.0.2",
15-
"@wordpress/env": "^10.12.0",
16-
"@wordpress/prettier-config": "^4.12.0",
17-
"@wordpress/scripts": "^30.5.1",
15+
"@wordpress/env": "^10.13.0",
16+
"@wordpress/prettier-config": "^4.13.0",
17+
"@wordpress/scripts": "^30.6.0",
1818
"commander": "12.1.0",
1919
"copy-webpack-plugin": "^12.0.2",
2020
"css-minimizer-webpack-plugin": "^7.0.0",

plugins/auto-sizes/auto-sizes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Enhanced Responsive Images
44
* Plugin URI: https://github.com/WordPress/performance/tree/trunk/plugins/auto-sizes
55
* Description: Improves responsive images with better sizes calculations and auto-sizes for lazy-loaded images.
6-
* Requires at least: 6.5
6+
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Version: 1.3.0
99
* Author: WordPress Performance Team

plugins/dominant-color-images/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Image Placeholders
44
* Plugin URI: https://github.com/WordPress/performance/tree/trunk/plugins/dominant-color-images
55
* Description: Displays placeholders based on an image's dominant color while the image is loading.
6-
* Requires at least: 6.5
6+
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Version: 1.1.2
99
* Author: WordPress Performance Team

plugins/embed-optimizer/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Embed Optimizer
44
* Plugin URI: https://github.com/WordPress/performance/tree/trunk/plugins/embed-optimizer
55
* Description: Optimizes the performance of embeds through lazy-loading, preconnecting, and reserving space to reduce layout shifts.
6-
* Requires at least: 6.5
6+
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Version: 0.3.0
99
* Author: WordPress Performance Team

plugins/image-prioritizer/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Image Prioritizer
44
* Plugin URI: https://github.com/WordPress/performance/tree/trunk/plugins/image-prioritizer
55
* Description: Prioritizes the loading of images and videos based on how visible they are to actual visitors; adds <code>fetchpriority</code> and applies lazy-loading.
6-
* Requires at least: 6.5
6+
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Requires Plugins: optimization-detective
99
* Version: 0.2.0

plugins/optimization-detective/detect.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,16 @@ export default async function detect( {
331331
return;
332332
}
333333

334+
// Keep track of whether the window resized. If it resized, we abort sending the URLMetric.
335+
let didWindowResize = false;
336+
window.addEventListener(
337+
'resize',
338+
() => {
339+
didWindowResize = true;
340+
},
341+
{ once: true }
342+
);
343+
334344
// TODO: Does this make sense here?
335345
// Prevent detection when page is not scrolled to the initial viewport.
336346
if ( doc.documentElement.scrollTop > 0 ) {
@@ -542,10 +552,7 @@ export default async function detect( {
542552

543553
// Only proceed with submitting the URL Metric if viewport stayed the same size. Changing the viewport size (e.g. due
544554
// to resizing a window or changing the orientation of a device) will result in unexpected metrics being collected.
545-
if (
546-
window.innerWidth !== urlMetric.viewport.width ||
547-
window.innerHeight !== urlMetric.viewport.height
548-
) {
555+
if ( didWindowResize ) {
549556
if ( isDebug ) {
550557
log(
551558
'Aborting URL Metric collection due to viewport size change.'

plugins/optimization-detective/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Optimization Detective
44
* Plugin URI: https://github.com/WordPress/performance/tree/trunk/plugins/optimization-detective
55
* Description: Provides an API for leveraging real user metrics to detect optimizations to apply on the frontend to improve page performance.
6-
* Requires at least: 6.5
6+
* Requires at least: 6.6
77
* Requires PHP: 7.2
88
* Version: 0.9.0-alpha
99
* Author: WordPress Performance Team

0 commit comments

Comments
 (0)