Skip to content

Fix polyfill dependency issues on WP 4.9#6119

Merged
westonruter merged 3 commits into
developfrom
fix/6100-missing-polyfills
Apr 27, 2021
Merged

Fix polyfill dependency issues on WP 4.9#6119
westonruter merged 3 commits into
developfrom
fix/6100-missing-polyfills

Conversation

@pierlon
Copy link
Copy Markdown
Contributor

@pierlon pierlon commented Apr 26, 2021

Summary

Fixes #6100

The wp-i18n script now depends on wp-hooks (see WordPress/gutenberg#27966), so that dependency is now polyfilled. Also, this PR ensures dependencies for the wp-api-fetch script are being registered, which they previously were not.

This PR also enqueues the polyfills before loading any assets for the amp-validation-counts handle.

Demo

20210426201040.mp4

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@pierlon pierlon marked this pull request as draft April 26, 2021 23:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2021

Codecov Report

Merging #6119 (e35a71b) into develop (f7ad0a8) will decrease coverage by 0.00%.
The diff coverage is 25.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #6119      +/-   ##
=============================================
- Coverage      75.03%   75.02%   -0.01%     
  Complexity      5829     5829              
=============================================
  Files            232      232              
  Lines          17618    17619       +1     
=============================================
  Hits           13219    13219              
- Misses          4399     4400       +1     
Flag Coverage Δ Complexity Δ
javascript 79.84% <ø> (ø) 0.00 <ø> (ø)
php 74.81% <25.00%> (-0.01%) 5829.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
src/Admin/ValidationCounts.php 33.33% <0.00%> (-1.67%) 4.00 <0.00> (ø)
src/Admin/Polyfills.php 23.72% <33.33%> (ø) 12.00 <0.00> (ø)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2021

Plugin builds for e35a71b are ready 🛎️!

@pierlon pierlon marked this pull request as ready for review April 27, 2021 00:06
@pierlon pierlon self-assigned this Apr 27, 2021
@pierlon pierlon added the WS:Core Work stream for Plugin core label Apr 27, 2021
@pierlon pierlon added this to the v2.1 milestone Apr 27, 2021
@pierlon pierlon requested review from delawski and westonruter April 27, 2021 00:07
Copy link
Copy Markdown
Collaborator

@delawski delawski left a comment

Choose a reason for hiding this comment

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

@pierlon Thank you for fixing this bug. Everything is working well for me both on 4.9.8 and on 5.7.1

WP 4.9.8 WP 5.7.1
Screenshot 2021-04-27 at 10 35 28 Screenshot 2021-04-27 at 10 37 57

Also, the Validated URL and Error Index counts show values on version 4.9.8 (which wasn't the case before).

@westonruter westonruter merged commit 501577d into develop Apr 27, 2021
@westonruter westonruter deleted the fix/6100-missing-polyfills branch April 27, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WS:Core Work stream for Plugin core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WP 4.9 Pollyfill JS Compatablity.

3 participants