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

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

Conversation

brandonpayton
Copy link

Hi there, this PR proposes to add a Blueprint file so that Better Search Replace 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. Note: This link's hash component is just the Base64-encoded JSON of the Blueprint, and you can decode in your browser's dev tools console with JSON.parse(atob(<hash-value>)).

Would this PR be useful to you?

@brandonpayton brandonpayton requested a review from a team as a code owner December 11, 2024 00:10
@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.

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