-
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
Improve handling of WordPress post embeds #6665
Conversation
What about the #3465? I used the The only issue I see now is that the Screen.recording.2021-10-29.at.14.39.57.mov |
Oh yeah. I forgot about #3465.
Oh, I didn't realize that the experiment was still required to be enabled. That means we'll need to wait on merging this.
This is expected, yes. It's to avoid layout shifting. You should see that it expands to its full height if it is below the initial viewport when the page loads. But if it is in the first viewport, then the Expand button is shown to have the user explicitly opt-in to a layout shift. Ideally we would set the height to be as close to what it will end up being, but this is very hard if not impossible to do. |
Great, I tested this and yes indeed the "expand" button is not shown if the I just added the tests for the AMP_WordPress_Embed_Handler class, so I believe this is ready for review. Also, tagging this PR as "blocked" due to |
Plugin builds for 73b4305 are ready 🛎️!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few suggestions.
Thanks @westonruter - changes applied 👍 |
…andle-wp-post-embeds * 'develop' of github.com:ampproject/amp-wp: (328 commits) Set npm to be less than v7 in engines Downgrade to lockfileVersion 1 Update Gutenberg package dependencies Revert package-lock.json lockfileVersion to 1 Update amphtml spec to 2110290545003 Update Gutenberg package dependencies Use method instead of closure Add assertions and skip others not supported in WP<5.2 Polyfill wp_body_open() Add test for wp_editor() and translations script attributions Remove obsolete Gutenberg test workaround Fix use of dependencies arg in find_done_dependent_handles Remove extraneous _WP_Editors checks Factor out some common logic Add indirect sources for inline scripts added by wp_editor() Add sourcing for inline scripts which are registered in core but enqueued by themes/plugins Add sourcing for script translation scripts Remove debug code WIP: Obtain sourcing for wp_editor() calls Remove obsolete constant check now that PHP 5.6 is minimum ...
… instead of embed_oembed_html filter
…to AMP_WordPress_Embed_Handler
…ix/809-handle-wp-post-embeds
Opened PR to remove experiment from |
…andle-wp-post-embeds * 'develop' of github.com:ampproject/amp-wp: (505 commits) Remove duplicated appending of button to body Reuse strings from twentytwentyone Recognize the default amp-dark-mode class name Add test for data-prefers-dark-mode-class Bump eslint-plugin-react from 7.28.0 to 7.29.2 Improve test coverage and account for fact that button is always initially omitted Limit selector replacement to when respect_user_color_preference enabled Bump eslint from 8.9.0 to 8.10.0 Utilize node-version-file Bump actions/setup-node from 2 to 3.0.0 Bump postcss from 8.4.6 to 8.4.7 Bump sirbrillig/phpcs-variable-analysis from 2.11.2 to 2.11.3 Bump php-stubs/wordpress-stubs from 5.9.0 to 5.9.1 Update Gutenberg package dependencies Update unit test case Remove replacing of .is-dark-theme.is-dark-theme with body.is-dark-theme selector Bump eslint-plugin-jsdoc from 37.9.1 to 37.9.4 Bump postcss-preset-env from 7.4.0 to 7.4.1 Bump @babel/core from 7.17.4 to 7.17.5 Bump postcss-preset-env from 7.3.3 to 7.4.0 ...
…andle-wp-post-embeds * 'develop' of github.com:ampproject/amp-wp: Prevent copying PHP files from `src/` into `assets/` Bump eslint-plugin-jsdoc from 37.9.4 to 37.9.5
@@ -832,6 +832,9 @@ public function test_process_archives_widgets() { | |||
public function test_process_text_widgets() { | |||
$instance_count = 2; | |||
|
|||
// Make sure the video shortcode is registered. | |||
add_shortcode( 'video', 'wp_video_shortcode' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this all of a sudden is needed for the tests to pass.
Co-authored-by: Bartosz Gadomski <kontakt@bartoszgadomski.pl>
Summary
Fixes #809
Checklist