Skip to content

Conversation

@thelovekesh
Copy link
Collaborator

@thelovekesh thelovekesh commented Jun 6, 2024

Summary

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).

@thelovekesh thelovekesh requested a review from westonruter June 12, 2024 16:32
@thelovekesh thelovekesh marked this pull request as ready for review June 12, 2024 16:32
@thelovekesh thelovekesh changed the title Update NPM deps; Fix errors due to updated deps Bump minimum require WP to 6.3 Jun 12, 2024
@thelovekesh thelovekesh changed the title Bump minimum require WP to 6.3 Bump minimum required WP to 6.3 Jun 12, 2024
@codecov
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 77.08%. Comparing base (22012c5) to head (a16b1dc).

Current head a16b1dc differs from pull request most recent head ac43705

Please upload reports for the commit ac43705 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #7816      +/-   ##
=============================================
- Coverage      77.21%   77.08%   -0.14%     
+ Complexity      6910     6777     -133     
=============================================
  Files            210      276      +66     
  Lines          21518    22303     +785     
=============================================
+ Hits           16616    17193     +577     
- Misses          4902     5110     +208     
Flag Coverage Δ
javascript 65.29% <89.28%> (?)
php 77.76% <75.00%> (+0.55%) ⬆️
unit 77.76% <75.00%> (+0.55%) ⬆️

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

Files Coverage Δ
amp.php 0.00% <ø> (ø)
...validation/components/amp-document-status/index.js 94.73% <ø> (ø)
...s/amp-validation-status/revalidate-notification.js 90.90% <ø> (ø)
...nents/amp-validation-status/status-notification.js 95.00% <ø> (ø)
...block-validation/components/error/error-content.js 100.00% <ø> (ø)
...ock-validation/components/error/error-type-icon.js 100.00% <ø> (ø)
...sets/src/block-validation/components/icon/index.js 100.00% <ø> (ø)
includes/admin/class-amp-post-meta-box.php 90.17% <ø> (-0.09%) ⬇️
includes/admin/class-amp-template-customizer.php 95.50% <ø> (-0.02%) ⬇️
includes/amp-post-template-functions.php 100.00% <100.00%> (+2.43%) ⬆️
... and 18 more

... and 61 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2024

Plugin builds for f508f83 are ready 🛎️!

Checksums
# Development build checksums
a9632cbfb85a7d813e0c783ba2af02586d7eb8937955a4604b71954bb3e91965 *amp.zip

# Production build checksums
fad6c24abb0990b4edd3b3b00655420501d35574b3ed1a4c26beb89f1936e9ab *amp.zip

Warning

These builds are for testing purposes only and should not be used in production.

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

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

So much goodness! Just a few areas where I have questions.

* @var string
*/
const WP_MIN_VERSION = '5.6';
const WP_MIN_VERSION = '6.3';
Copy link
Member

Choose a reason for hiding this comment

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

Since the plugin as a whole requires WP 6.3 now, should the DependencySupport class just be removed entirely now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've been thinking about it, and this class helps us manage service initialization effectively, especially if we need to support any dependencies in the future. I believe we should keep it to maintain standardization and be prepared for any future needs.

) {
$this->enable_css_transient_caching();
}
$this->enable_css_transient_caching();
Copy link
Member

Choose a reason for hiding this comment

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

Since previously this was only called when updating from 1.5.0 or 1.5.1 or ir the block_uniq_transformer is relevant, then I wonder if this call is even relevant anymore? Should the entire handle_plugin_update be removed instead?

Comment on lines 389 to 401
// Replace `data-wp-on--click` or `data-wp-on-async--click` with AMP state on submenu open button.
if ( false !== strpos( $new_block_content, 'wp-block-navigation__responsive-container-open' ) ) {
$new_block_content = preg_replace(
'/\sdata-wp-on--click="[^"]+"/',
'/\sdata-wp-on-(?:-click|async--click)="[^"]+"/',
sprintf( ' on="tap:AMP.setState({ %1$s: !%1$s })"', esc_attr( $modal_state_property ) ),
$new_block_content
);
}

// Replace `data-wp-on--click` with AMP state on submenu close button.
// Replace `data-wp-on--click` or `data-wp-on-async--click` with AMP state on submenu close button.
if ( false !== strpos( $new_block_content, 'wp-block-navigation__responsive-container-close' ) ) {
$new_block_content = preg_replace(
'/\sdata-wp-on--click="[^"]+"/',
'/\sdata-wp-on-(?:-click|async--click)="[^"]+"/',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New changes in navigation block with interactivity API enabled.

@westonruter westonruter added this to the v2.5.4 milestone Jun 24, 2024
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

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

Epic!

@thelovekesh
Copy link
Collaborator Author

@westonruter There is a flaky end-to-end test that we can ignore for now; I'll address it separately. Currently, there's an issue where the AMP preview button in the post editor is sometimes not visible when the editor is first opened. It becomes visible only when the editor is in an editable state, such as when someone clicks on it. I can replicate this on WordPress 6.5, but not on the trunk version.

return root.current
? createPortal(<AmpPreviewButton />, root.current)
: null;

@thelovekesh thelovekesh merged commit fa0a9f2 into develop Jun 24, 2024
@thelovekesh thelovekesh deleted the update/wp-deps branch June 24, 2024 17:25
@pavanpatil1
Copy link

Verified it with WordPress v6.3,v6.5,v6.6RC2 and it is working fine. Checked the settings and related options those are working fine ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants