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

Add Bento opt-in #6353

Merged
merged 12 commits into from
Aug 12, 2021
Merged

Add Bento opt-in #6353

merged 12 commits into from
Aug 12, 2021

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Jun 4, 2021

Summary

To opt-in to serving the Bento versions of AMP components (where available), do:

add_filter( 'amp_bento_enabled', '__return_true' );

Note that this includes the Bento AMP experiment opt-in script, so it will force dev mode as well.

See #6443.

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

@westonruter westonruter added this to the v2.2 milestone Jun 4, 2021
@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #6353 (f36363d) into develop (44c641e) will increase coverage by 0.12%.
The diff coverage is 47.50%.

❗ Current head f36363d differs from pull request most recent head 53aac04. Consider uploading reports for the commit 53aac04 to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #6353      +/-   ##
=============================================
+ Coverage      75.12%   75.24%   +0.12%     
+ Complexity      5912     5902      -10     
=============================================
  Files            190      235      +45     
  Lines          17864    17847      -17     
=============================================
+ Hits           13420    13429       +9     
+ Misses          4444     4418      -26     
Flag Coverage Δ
javascript 79.84% <ø> (?)
php 75.04% <47.50%> (-0.09%) ⬇️
unit 75.04% <47.50%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
...ncludes/embeds/class-amp-gallery-embed-handler.php 87.83% <0.00%> (-0.33%) ⬇️
...cludes/embeds/class-amp-playlist-embed-handler.php 95.45% <ø> (-0.20%) ⬇️
...es/sanitizers/class-amp-allowed-tags-generated.php 46.42% <ø> (ø)
...udes/sanitizers/class-amp-core-theme-sanitizer.php 36.27% <12.50%> (-0.87%) ⬇️
includes/class-amp-theme-support.php 84.78% <25.00%> (-1.38%) ⬇️
includes/amp-helper-functions.php 80.41% <54.16%> (-1.14%) ⬇️
includes/sanitizers/class-amp-img-sanitizer.php 92.51% <60.00%> (-5.19%) ⬇️
...s/sanitizers/class-amp-gallery-block-sanitizer.php 100.00% <100.00%> (ø)
includes/sanitizers/class-amp-style-sanitizer.php 86.57% <100.00%> (-0.03%) ⬇️
...nitizers/class-amp-tag-and-attribute-sanitizer.php 97.69% <100.00%> (-0.02%) ⬇️
... and 203 more

@westonruter westonruter force-pushed the update/amphtml-2105072136000 branch from dc24210 to cac1371 Compare June 10, 2021 05:58
Base automatically changed from update/amphtml-2105072136000 to develop June 10, 2021 16:32
@westonruter westonruter force-pushed the add/bento branch 3 times, most recently from 53aac04 to 5ae3ed2 Compare August 5, 2021 21:31
@westonruter westonruter changed the base branch from develop to add/native-img-opt-in August 9, 2021 21:55
@westonruter westonruter force-pushed the add/bento branch 4 times, most recently from 8c103b4 to bce8868 Compare August 9, 2021 23:03
Base automatically changed from add/native-img-opt-in to develop August 11, 2021 02:33
@westonruter westonruter requested a review from pierlon August 11, 2021 04:08
@westonruter westonruter marked this pull request as ready for review August 11, 2021 04:08
@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2021

Plugin builds for 76e9c71 are ready 🛎️!

@westonruter
Copy link
Member Author

Note to self: after #6530 is merged, rebase into develop and cherry-pick add/bento-with-amphtml-spec-20210811-spec-update.

@westonruter westonruter marked this pull request as draft August 12, 2021 05:37
@westonruter westonruter marked this pull request as ready for review August 12, 2021 05:59
Co-authored-by: Pierre Gordon <[email protected]>
@westonruter westonruter enabled auto-merge August 12, 2021 06:11
@pierlon
Copy link
Contributor

pierlon commented Aug 12, 2021

Would you update the prefer_bento arg for AMP_Tag_And_Attribute_Sanitizer to use amp_is_bento_enabled() as well?

@westonruter westonruter merged commit d79ee07 into develop Aug 12, 2021
@westonruter westonruter deleted the add/bento branch August 12, 2021 06:17
@westonruter
Copy link
Member Author

Would you update the prefer_bento arg for AMP_Tag_And_Attribute_Sanitizer to use amp_is_bento_enabled() as well?

Oh yes, indeed.

@milindmore22
Copy link
Collaborator

QA Passed

✅ Add filter to opt-in to Bento mode.

✅ Enable bento experiment.

✅ Bento versions of scripts are used instead of the latest. bento scripts are converted to amp scripts 1.0 version

⚠️ Disable Optimizer SSR?

@westonruter
Copy link
Member Author

⚠️ Disable Optimizer SSR?

This one is obsolete. Bento is compatible with Optimized AMP now.

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bento Changelogged Whether the issue/PR has been added to release notes. Sandboxing Experiment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants