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 a Blueprint for WP.org Live Preview #463

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

brandonpayton
Copy link

@brandonpayton brandonpayton commented Dec 11, 2024

Summary

This PR adds a Blueprint file so that WP Maintenance Mode can have a Live Preview button in the WP.org plugin repo. The Live Preview will load your plugin in the WordPress Playground web app using the provided Blueprint.

According to the WP.org docs:

There are two things required for a plugin preview button to appear to all users:

  1. A valid blueprint.json file must be provided in a blueprints sub-directory of the plugin’s assets folder.
  2. The plugin preview must be set to “public” from the plugin’s Advanced view by a committer.

Once those conditions are met, a Live Preview button should appear next to the Download button in the WordPress.org plugin repo, like:

image

Try this link for an example of the preview.

I work on the WordPress Playground project and have started creating some PRs to propose Live Preview for various plugins. If you have any feedback related to Playground or Live Previews, I would love to hear it.

Will affect visual aspect of the product

NO

Screenshots

A screenshot of the Live Preview blueprint running in WordPress Playground:
Screenshot 2024-12-11 at 5 20 31 PM

Test instructions

This is not a functional change, but you can try this link for an example of the preview.

Check before Pull Request is ready:

@HardeepAsrani HardeepAsrani changed the base branch from master to development December 12, 2024 01:47
@brandonpayton
Copy link
Author

brandonpayton commented Dec 12, 2024

@HardeepAsrani, it looks like I was mistaken about where to place the blueprint.json file. I believe it belongs under the top-level assets directory for the plugin, under assets/blueprints and not under trunk/assets/blueprints.

Perhaps this should have been an issue with an example blueprint.json instead of a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant