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

Replace amp_experimental_sandboxing_enabled filter with Sandboxing experiment toggle #6757

Merged
merged 6 commits into from
Dec 6, 2021

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Dec 3, 2021

Summary

Previously in order to enable the Sandboxing experiment, a mini plugin would have to be added that does:

add_filter( 'amp_experimental_sandboxing_enabled', '__return_true' );

This added undue friction to test the feature. So the filter has been removed in favor of a checkbox:

image

When checked, the sandboxing level radio buttons appear:

image

The drawer has also been moved down to be right before Other instead of being the first among the Advanced Settings.

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 Dec 3, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

Plugin builds for 4d75dc2 are ready 🛎️!

@pradeep910
Copy link
Collaborator

I have tested this on the staging and it is working fine. 👍

theme_support: themeSupport,
} } = useContext( Options );

if ( STANDARD !== themeSupport ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is an experimental feature, should it be available to technical users only?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good question. I think that it should be available to non-technical users too, as this feature is intended to be the most benefit to users who are not technical in the first place, since it avoids the need to fix validation errors.

Co-authored-by: Piotr Delawski <delawski@users.noreply.github.com>
@westonruter

This comment has been minimized.

…ndboxing-filter-opt-in

* 'develop' of github.com:ampproject/amp-wp: (28 commits)
  Fix test after message update in 3a5f4aa
  Improve phpdoc comments and guard against JSON parse error for post_content
  Translate error message when failing to send to insights server
  Remove unused REST API endpoint
  Further reuse amp_validated_post variable
  Sanitize value of query param before using
  Apply suggestion from PR
  Prevent multiple support request in case of error
  Add test case for SupportScreen::get_amp_validated_post_counts()
  Update function docs. Use AMP_Validated_URL_Post_Type::get_invalid_url_post() instead of post_exists()
  Clear timeout correctly
  Simplify the E2E test
  Simplify logic for ensuring consistent units
  Propagate more styles AMP-valid dimensions to AMP element
  Add tests for deriving width/height from styles
  Propagate width/height styles as width/height attributes when setting layout
  Fix typo in Sandboxinf level drawer
  Use plural nouns in variable name
  Fetch only amp_validated_url post that have error on support page
  Update prop types
  ...
@westonruter westonruter requested a review from delawski December 5, 2021 19:41
Copy link
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.

LGTM!

@@ -289,7 +289,7 @@
"packages-dev": [
{
"name": "ampproject/php-css-parser-install-plugin",
"version": "dev-develop",
"version": "dev-remove/sandboxing-filter-opt-in",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line, changed by the ergebnis/composer-normalize, looked a bit suspicious to me. However, I did a fresh install of the plugin from the repo and everything seems to be working fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this seems to always happen whenever doing composer install from a different branch.

@westonruter westonruter merged commit bc08455 into develop Dec 6, 2021
@westonruter westonruter deleted the remove/sandboxing-filter-opt-in branch December 6, 2021 15:35
@fellyph fellyph self-assigned this Dec 9, 2021
@fellyph
Copy link
Collaborator

fellyph commented Dec 9, 2021

QA Passed

Screen Shot 2021-12-09 at 18 00 12

The sandbox functionality is 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.

5 participants