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

Improve Sandboxing #6715

Merged
merged 5 commits into from
Nov 16, 2021
Merged

Improve Sandboxing #6715

merged 5 commits into from
Nov 16, 2021

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Nov 11, 2021

Summary

This is a follow-up to #6546. Namely, it seeks to address key Future Todos.

Changes

  • Move "Sandboxing Level" setting from being inside Standard mode drawer to being its own drawer among the Advanced Settings. The drawer is only displayed if the experiment is enabled and if Standard mode is selected.
  • Prevent calling Sandboxing::finalize_document() if the experiment is not enabled. See Experimental: Add sandboxing levels #6546 (comment).
  • Omit AMP runtime script (v0.js and v0.mjs), AMP runtime style, and AMP CDN preconnect link if they are not needed due to no other AMP scripts being on the page and valid AMP is not the target (level 3).
  • Refactor threaded comment handling to remove an erroneously-enqueued comment-reply script when there isn't a comment form on the page. (Hestia is enqueueing this script whenever is_singular() and isn't checking if comments_open() && get_option( 'thread_comments' ).)
Before After
before after

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 Nov 11, 2021
@westonruter westonruter self-assigned this Nov 11, 2021
@westonruter westonruter marked this pull request as ready for review November 12, 2021 05:30
@github-actions
Copy link
Contributor

Plugin builds for 61ec39d are ready 🛎️!

@dhaval-parekh
Copy link
Collaborator

Changes look good to me. 👍

Copy link
Collaborator

@milindmore22 milindmore22 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

@westonruter westonruter merged commit 5f08c01 into develop Nov 16, 2021
@westonruter westonruter deleted the improve/sandboxing branch November 16, 2021 18:46
@westonruter westonruter removed their assignment Nov 16, 2021
@milindmore22
Copy link
Collaborator

QA Passed

Sanboxing settings are moved to the new drawer, AMP sandboxing levels are working as expected.

@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
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