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

Enable a plugin preview using playground #664

Merged

Conversation

carstingaxion
Copy link
Collaborator

@carstingaxion carstingaxion commented May 31, 2024

Description of the Change

Enabling Plugin Previews

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

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

Closes #

How to test the Change

  1. Get the content of the blueprint.json file
  2. Paste it into the Playground builder (and replace everything else)
  3. Get a working GatherPress ~~ latest~~ version 0.28.0 installed
  4. Your landing-page should be /events/ with an image showing the Events List block in the block-inserter and a heading:

    Show all your events using the Events List block provided by GatherPress

  5. You won't find any imported events, since Export & Import #655

Changelog Entry

Added - Enable plugin preview for wordpress.org using WordPress Playground.

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@carstingaxion carstingaxion linked an issue May 31, 2024 that may be closed by this pull request
1 task
@carstingaxion
Copy link
Collaborator Author

We & I should probably first finish & merge #655 , otherwise we would not be able to pre-fill a playground with data. Because of #650

@carstingaxion
Copy link
Collaborator Author

You must commit your blueprint.json file to your plugin’s assets folder, named like this:

/assets/blueprints/blueprint.json

https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/#committing-a-blueprint-to-subversion

Am I right that the existing /.wordpress-org folder works the same like the mentioned /assets folder?

@carstingaxion carstingaxion mentioned this pull request May 31, 2024
1 task
@carstingaxion
Copy link
Collaborator Author

carstingaxion commented Jun 3, 2024

Try to remove the need for the action, by using github-proxy.com seems to be not straight forward.


Internally github-proxy.com uses:

$url = "https://github.com/$repo/releases/download/$release/$asset";

which works fine with numbered, but not the latest release.

grafik

Acording to download - Is there a link to GitHub for downloading a file in the latest release of a repository? - Stack Overflow the url template needs some change.

$url = "https://github.com/$repo/releases/download/$release/$asset";

@carstingaxion
Copy link
Collaborator Author

carstingaxion commented Jun 3, 2024

Hello @mauteri ,

I would call this almost ready ... except some questions. I would like to read your opinions on one or the other. Or all ;)

@carstingaxion
Copy link
Collaborator Author

carstingaxion commented Jun 10, 2024

Because this blueprint.json will be used (most) exclusively by wp.org itself, I think its suitable to already set the used source for the plugin to the repo and remove the call via github-proxy.com.

That's what I did in my last commit and mentioned first time in #663 (comment).

@mauteri
Copy link
Contributor

mauteri commented Jun 14, 2024

NOTE: Can be merged after Export & Import PR is merged.

@carstingaxion carstingaxion mentioned this pull request Jul 12, 2024
8 tasks
@mauteri
Copy link
Contributor

mauteri commented Jul 14, 2024

@carstingaxion now that Export/Import PR has been merged are we now able to merge this PR?

@carstingaxion
Copy link
Collaborator Author

I think so, yes @mauteri .

I had a look at the blueprint.json again, which looks good to me.

But there is no risk, with that, because the plugin preview on w.org is hidden behind a feature flag, that only you (as plugin author) can enable. So you (and others, if you share the link) can test that, before going live.

@mauteri mauteri merged commit 7d2f462 into GatherPress:main Jul 15, 2024
11 checks passed
@carstingaxion carstingaxion deleted the feature/plugin-preview-playground branch August 13, 2024 20:12
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.

playground(s)
2 participants