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 #1241

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

Conversation

brandonpayton
Copy link

This PR adds a Blueprint file so that SiteOrigin's Page Builder plugin 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.

@brandonpayton
Copy link
Author

Note: This Blueprint installs the Vantage theme for use with the plugin. That can be removed or changed if desired.

@brandonpayton
Copy link
Author

brandonpayton commented Dec 12, 2024

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.

@AlexGStapleton
Copy link
Member

Hi Brandon! Thanks for submitting this. We had seen the previews and wondered how it worked but just didn't get a chance to look into it yet. So we really appreciate you setting this up.

Regarding where to put the blueprint.json file, I had a look at Simple Page Ordering (as that has the button) and it's present in the assets directory, not trunk. We may still end up merging this in a . dot directory (likely .assets) just so it's versioned still. We'll look more into the Blueprint options though before proceeding.

Thanks again for submitting this!

@brandonpayton
Copy link
Author

That's great! In case it helps, here is a reference for the Blueprint data format:
https://wordpress.github.io/wordpress-playground/blueprints/data-format

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

Successfully merging this pull request may close these issues.

2 participants