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 AMP under "Preview" dropdown in WordPress #7896

Closed
simison opened this issue Oct 17, 2024 · 3 comments · Fixed by #7914
Closed

Add AMP under "Preview" dropdown in WordPress #7896

simison opened this issue Oct 17, 2024 · 3 comments · Fixed by #7914
Assignees
Labels
Enhancement New feature or improvement of an existing one
Milestone

Comments

@simison
Copy link

simison commented Oct 17, 2024

Hi! I wanted to let you know that it's now possible to add items under "Preview" menu in Gutenberg since:

More here: https://make.wordpress.org/core/2024/10/18/extending-the-preview-dropdown-menu-in-wordpress-6-7/

I recommend moving the AMP preview there from the plugin toolbar conditionally when PreviewDropdownMenuItem is available:

Screenshot 2024-10-17 at 20 22 59

The original issue at Gutenberg repo used AMP as an example of why the Preview dropdown had to be extendable:

I wrote more ideas here on how to improve preview extensibility. Feel free to share AMP perspective!

@kellychoffman
Copy link

Perhaps for another issue, but I noticed the 'Preview in new tab' line has more left/right padding than the rest of the items.

@westonruter westonruter added the Enhancement New feature or improvement of an existing one label Oct 18, 2024
@westonruter westonruter added this to the v2.5.5 milestone Oct 18, 2024
@westonruter
Copy link
Member

This is great as I understand it will eliminate some brittle code we've had to implement to work around this limitation:

https://github.com/ampproject/amp-wp/blob/60a655cdad9e3431b47b2dcc3b2e5ddb86ac5c5e/assets/src/block-editor/plugins/wrapped-amp-preview-button.js

@westonruter westonruter moved this to To Do in Ongoing Oct 18, 2024
@westonruter westonruter moved this from To Do to In Progress in Ongoing Nov 11, 2024
@westonruter westonruter moved this from Ready for Review to Ready for QA in Ongoing Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement of an existing one
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants
@simison @westonruter @kellychoffman @thelovekesh and others