-
Notifications
You must be signed in to change notification settings - Fork 383
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 debugging query arguments #3448
Commits on Oct 4, 2019
-
- disable_post_processing - disable_response_cache - prevent_redirect - reject_all_errors @todo: add a query arg to exclude sanitizers.
Configuration menu - View commit details
-
Copy full SHA for 37de1c3 - Browse repository at this point
Copy the full SHA 37de1c3View commit details -
Use the filter 'amp_validation_error_sanitized' instead of another co…
…nditional As Weston mentioned, this can simply use the filter that exists,
Configuration menu - View commit details
-
Copy full SHA for e738bcf - Browse repository at this point
Copy the full SHA e738bcfView commit details -
Add a separate filter for 'amp_validation_error_sanitized', add top-l…
…evel var The filter in accept_validation_errors() might not actually run, if get_acceptable_errors() doesn't return anything.
Configuration menu - View commit details
-
Copy full SHA for 19363fc - Browse repository at this point
Copy the full SHA 19363fcView commit details
Commits on Oct 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for aeeda26 - Browse repository at this point
Copy the full SHA aeeda26View commit details
Commits on Oct 10, 2019
-
Add a query var to accept 'excessive_css' errors
This adds a callback for 'amp_validation_error_sanitized', and also checks for the presence of the 'reject_all_errors' query var in that callback. The query var is accessed like: ?amp_flags[accept_excessive_css]
Configuration menu - View commit details
-
Copy full SHA for 388de8e - Browse repository at this point
Copy the full SHA 388de8eView commit details
Commits on Oct 12, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 17747a4 - Browse repository at this point
Copy the full SHA 17747a4View commit details
Commits on Oct 13, 2019
-
Add a query var to skip tree shaking
This prevents raising an 'excessive_css' error, and simply prints all of the styling in the <style amp-custom>
Configuration menu - View commit details
-
Copy full SHA for 2c0b1d0 - Browse repository at this point
Copy the full SHA 2c0b1d0View commit details -
Add a debug query var to disable AMP
This is mainly intended for Standard mode, as it would be strange to have an ?amp query var, then one after it to disable AMP. Still, there's an issue where on redirecting in Transitional mode, the query var is still present in the URL, like: https://example.com/new-post-2/?amp_flags%5Bdisable_amp%5D
Configuration menu - View commit details
-
Copy full SHA for e41505d - Browse repository at this point
Copy the full SHA e41505dView commit details -
In the case of redirecting to the non-AMP URL, remove the flags query…
… arg It's possible, though probably not common, that a request would have ?amp and the query arg to disable AMP. When in Transitional mode, this will cause a redirect to the non-AMP endpoint. This ensures that the amp_flags query var is stripped from the redirect URL.
Configuration menu - View commit details
-
Copy full SHA for ac1311e - Browse repository at this point
Copy the full SHA ac1311eView commit details
Commits on Oct 14, 2019
-
Begin to add the submenu in the admin bar for AMP debugging options
This uses React on the front-end, as it will use toggles, and may need to de-select some toggles when certain toggles are selected. It might be a little too much to enqueue React (wp-element) just for this, so I'll have to revisit whether it's necessary.
Configuration menu - View commit details
-
Copy full SHA for fffbbbd - Browse repository at this point
Copy the full SHA fffbbbdView commit details -
Address failed PHPUnit test in Travis
Remove a test that looks to have caused and undefined index error.
Configuration menu - View commit details
-
Copy full SHA for fe602ac - Browse repository at this point
Copy the full SHA fe602acView commit details -
Attempt to address failed PHPUnit test by removing a filter
It looks like another function was running on the same filter, and had an error. So remove_remove_all_filters() for that filter.
Configuration menu - View commit details
-
Copy full SHA for 405d30d - Browse repository at this point
Copy the full SHA 405d30dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39b0e2f - Browse repository at this point
Copy the full SHA 39b0e2fView commit details -
Delete the remove_all_filters() calls, instead register 'wp-element'
It looks like these didn't fix the failing Travis builds. So instead, register the 'wp-element' script.
Configuration menu - View commit details
-
Copy full SHA for e4be908 - Browse repository at this point
Copy the full SHA e4be908View commit details -
Add the remaining query vars to the submenu
There is still much remaining, including adding the toggles and styling.
Configuration menu - View commit details
-
Copy full SHA for 81be395 - Browse repository at this point
Copy the full SHA 81be395View commit details -
Change skip_tree_shaking to disable_tree_shaking
Both in the name of the function and the query var. This is to stay consistent with other query vars that have 'disable' in them, like 'disable_amp'
Configuration menu - View commit details
-
Copy full SHA for 114e5d8 - Browse repository at this point
Copy the full SHA 114e5d8View commit details
Commits on Oct 15, 2019
-
Add the toggles for the query vars
Use the <ToggleControl> from Gutenberg, though this still needs a lot of styling.
Configuration menu - View commit details
-
Copy full SHA for 2bd69c3 - Browse repository at this point
Copy the full SHA 2bd69c3View commit details -
Add the debug options to the admin bar even on non-AMP endpoints
There's a 'View AMP version' link, so it probably makes sense to have these query vars available.
Configuration menu - View commit details
-
Copy full SHA for 5f186af - Browse repository at this point
Copy the full SHA 5f186afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b0c96f - Browse repository at this point
Copy the full SHA 8b0c96fView commit details
Commits on Oct 18, 2019
-
Remove the JS to add the admin bar debug options
As discussed in the PR, these will be rendered with PHP.
Configuration menu - View commit details
-
Copy full SHA for 7b41a0b - Browse repository at this point
Copy the full SHA 7b41a0bView commit details -
Add a submenu to the admin bar for the debug options
As Weston mentioned, an option has a 'check mark' emoji next to it if its query var is in the current URL. This still might need more thought, like whether these should always be present in the admin bar, even on a non-AMP URL where the AMP URL is blocked due to validation errors.
Configuration menu - View commit details
-
Copy full SHA for c5b0d3b - Browse repository at this point
Copy the full SHA c5b0d3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00358e4 - Browse repository at this point
Copy the full SHA 00358e4View commit details -
Remove the entry in webpack.config.js for the previous JS file
There used to be a JS file for the WP Admin Bar, but this is now handled in PHP.
Configuration menu - View commit details
-
Copy full SHA for 7a3733a - Browse repository at this point
Copy the full SHA 7a3733aView commit details -
Fix failing unit test for AMP_Validation_Error_Taxonomy
test_is_validation_error_sanitized_and_get_validation_error_sanitization() failed in the build, so change the expected term_status.
Configuration menu - View commit details
-
Copy full SHA for 687cf47 - Browse repository at this point
Copy the full SHA 687cf47View commit details -
Use different emojis for the checkboxes
Also, use different emojis for the checked and unchecked states.
Configuration menu - View commit details
-
Copy full SHA for ef0720c - Browse repository at this point
Copy the full SHA ef0720cView commit details -
Fix unit test of dependent function
add_debugging_option_nodes() depends on get_debugging_option_title(), and that function recently changed. So the test for add_debugging_option_nodes() needs to be updated.
Configuration menu - View commit details
-
Copy full SHA for 675f875 - Browse repository at this point
Copy the full SHA 675f875View commit details
Commits on Oct 24, 2019
-
Thanks to Alain's suggestion, add AMP_Debug class
Mainly based on Alain's code example. Change the individual checks for the query var to a call to AMP_Debug::has_flag().
Configuration menu - View commit details
-
Copy full SHA for 996157a - Browse repository at this point
Copy the full SHA 996157aView commit details -
Remove 2 constants that were moved to AMP_Debug
These aren't needed anymore in AMP_Validation_Error_Taxonomy.
Configuration menu - View commit details
-
Copy full SHA for e3bad9e - Browse repository at this point
Copy the full SHA e3bad9eView commit details -
Simplify tests and improve DocBlocks
Minor edits, like changing: assertEquals( false to: assertFalse( Also, improve some DocBlocks.
Configuration menu - View commit details
-
Copy full SHA for 4b6a48f - Browse repository at this point
Copy the full SHA 4b6a48fView commit details -
Add a test for passing a random string as a query var
To test the behavior with: &_flags[disable_post_processing]=random-string
Configuration menu - View commit details
-
Copy full SHA for d5e2b2d - Browse repository at this point
Copy the full SHA d5e2b2dView commit details -
Add another assertion for a numeric string returning false
For example, &_flags[disable_post_processing]=5555
Configuration menu - View commit details
-
Copy full SHA for 1d40623 - Browse repository at this point
Copy the full SHA 1d40623View commit details -
Add a little documentation for AMP_Debug::has_flag()
This should help to see how to use this.
Configuration menu - View commit details
-
Copy full SHA for 42a29d0 - Browse repository at this point
Copy the full SHA 42a29d0View commit details -
Change the behavior for the query var being present but empty
Now, something like: &_flags[disable_amp] will be true.
Configuration menu - View commit details
-
Copy full SHA for a1929ab - Browse repository at this point
Copy the full SHA a1929abView commit details
Commits on Oct 25, 2019
-
Merge branch 'develop' of github.com:ampproject/amp-wp into add/query…
…-args-debugging * 'develop' of github.com:ampproject/amp-wp: (163 commits) Remove entries array test after completed. Update dependency core-js to v3.3.4 (#3624) Quick UX fixes (#3611) Fix most pressing RTL issues (#3558) Add test case for broken parent relationship Adapt broken test Throw a _doing_it_wrong() when an expected parent is not found Change template hierarchy query arguments to public Reuse data-set-focus to reliably match twentytwenty keyboard focus management Add tabindex attribute to modals Guess the role of a modal based on its classes Disable Code Editor (#3608) Update dependency postcss to v7.0.20 (#3613) Update dependency autoprefixer to v9.7.0 (#3614) Update dependency browserslist to v4.7.2 (#3612) Add rel=preconnect link for AMP CDN Fix block nav padding and margin (#3610) Adjust Gutenberg / WordPress requirement (#3609) Don't allow multiple CTA / attachment block to be pasted. (#3601) Fix page crashing when duplicating immovable blocks (#3593) ...
Configuration menu - View commit details
-
Copy full SHA for 03a2395 - Browse repository at this point
Copy the full SHA 03a2395View commit details