web-stories-wp icon indicating copy to clipboard operation
web-stories-wp copied to clipboard

Set up WordPress.org Preview

Open swissspidy opened this issue 1 year ago • 1 comments

Task Description

See https://make.wordpress.org/meta/2023/11/22/plugin-directory-preview-button-revisited/ for context.

Need a custom blueprint including kitchen-sink to configure the demo.

A starting point:

{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "landingPage": "\/wp-admin\/edit.php?post_type=web-story&page=stories-dashboard",
  "phpExtensionBundles": [
    "kitchen-sink"
  ],
  "steps": [
    {
      "step": "login",
      "username": "admin",
      "password": "password"
    },
    {
      "step": "installPlugin",
      "pluginZipFile": {
        "resource": "wordpress.org\/plugins",
        "slug": "web-stories"
      },
    },
    {
      "step": "setSiteOptions",
      "options": {
          "permalink_structure": "/%postname%/"
      }
    },
  ]
}

Example: https://playground.wordpress.net/?plugin=web-stories&php-extension-bundle=kitchen-sink

Possible UX blocker:

  • https://github.com/WordPress/wordpress-playground/issues/816

swissspidy avatar Nov 28 '23 09:11 swissspidy

Proposed blueprint from the directory:


{
    "landingPage": "\/wp-admin\/plugins.php",
    "preferredVersions": {
        "php": "8.0",
        "wp": "latest"
    },
    "phpExtensionBundles": [
        "kitchen-sink"
    ],
    "features": {
        "networking": true
    },
    "steps": [
        {
            "step": "installPlugin",
            "pluginZipFile": {
                "resource": "url",
                "url": "https:\/\/downloads.wordpress.org\/plugin\/web-stories.latest-stable.zip"
            },
            "options": {
                "activate": true
            }
        },
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        }
    ]
}

swissspidy avatar Apr 10 '24 13:04 swissspidy

@Swanand01 This one would be a low hanging fruit to pick. We can add a blueprint to our .WordPress-org folder and then I can deploy it to the repo.

The above POC probably needs some updating as the format might have changed in the meantime

swissspidy avatar Jun 17 '24 13:06 swissspidy

The proposed blueprint already seems to work without any changes, I checked it in the Playground.

I'll go ahead and raise a PR for this.

Swanand01 avatar Jun 17 '24 14:06 Swanand01