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

(Meetup use case) Create a 'filtered' version for use in Meetups #1536

Closed
IoanaAMuresan opened this issue Jun 22, 2024 · 4 comments
Closed

Comments

@IoanaAMuresan
Copy link

In exploring the possibility of using Playground in introducing non-WP users to the tool, I noticed that the interface is not super beginner friendly.

For instance:

  • after launching a session, clicking on the W to go to the dashboard shows this:
Screenshot 2024-06-22 at 12 22 49
  • when clicking on the dashboard, user sees this:
Screenshot 2024-06-22 at 12 23 44

(neither of which are reassuring to a beginner)

I am just getting started with the product, and have not yet explored all the facets of blueprints, but wondering if it might be possible to have a blueprint that cleans up everything that's not really valuable for a first time explorer.

@IoanaAMuresan IoanaAMuresan changed the title Create a 'filtered' version for use in Meetups (Meetup use case) Create a 'filtered' version for use in Meetups Jun 22, 2024
@bgrgicak
Copy link
Collaborator

bgrgicak commented Jul 3, 2024

I am just getting started with the product, and have not yet explored all the facets of blueprints, but wondering if it might be possible to have a blueprint that cleans up everything that's not really valuable for a first time explorer.

Yes, you could do that with a blueprint. There isn't one today, but I'm sure it's possible to do it with CSS and some WordPress hooks.

If you end up doing something like this, please consider submitting it to the blueprint gallery to help others.

https://github.com/WordPress/blueprints/
https://github.com/WordPress/blueprints/blob/trunk/docs/index.md
https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/

cc @bph @juanmaguitar

@bgrgicak bgrgicak closed this as completed by moving to Not doing in Playground Board Jul 3, 2024
@juanmaguitar
Copy link
Collaborator

Hi @IoanaAMuresan,

There are a lot of possibilities using playground and custom code.
Here's an example of a playground with the welcome panel disabled

see implementation details

It uses this blueprint.json

{
  "landingPage": "/wp-admin",
  "preferredVersions": {
    "wp": "beta",
    "php": "8.0"
  },
  "steps": [
    {
      "step": "login"
    },
    {
      "step": "writeFile",
      "path": "/wordpress/wp-content/plugins/1-plugin.php",
      "data": {
        "resource": "url",
        "url": "https://gist.githubusercontent.com/juanmaguitar/ddaf2b097ac5562cfe6ede5fc58313de/raw/e166b4ff1a55d460aa466a68862af6967dfbe935/beginner-friendly-playground.php"
      }
    },
    {
      "step": "activatePlugin",
      "pluginName": "Beginner Friendly Playground",
      "pluginPath": "1-plugin.php"
    }
  ]
}

and the following plugin code (installed from a gist)

<?php
/**
 * Plugin Name:       Beginner Friendly Playground
 * Description:       Disables everything that's not really valuable for a first time explorer.
 * Version:           0.1.0
 * Requires at least: 6.5
 */

defined( 'ABSPATH' ) || exit;

add_action('load-index.php', 'disable_welcome_panel');

function disable_welcome_panel() {
    remove_action('welcome_panel', 'wp_welcome_panel');
}

... that cleans up everything that's not really valuable for a first time explorer.

What else would you like to see cleaned for a first-time explorer?

@bph
Copy link
Collaborator

bph commented Jul 3, 2024

@IoanaAMuresan
You could also just use the landing page setting
"landingPage": "/wp-admin/?welcome=0"

.. and the welcome page will just not be displayed.

If you want to clear all WordPress content of the site and refill it with your demo content, you could run a wp-cli step with the comment wp site empty --yes

{
	"step": "wp-cli",
		"command": "wp site empty --yes"
}

@bph
Copy link
Collaborator

bph commented Jul 3, 2024

A few weeks ago, I did a presentation on Playground and blueprints: Developer Hours: Creating WordPress Playground Blueprints for Testing and Demos. The examples repo is available on GitHub, too

A great resource is also the Blueprint Gallery with examples that might inspire you to think through other scenarios for your meetup demo site.

@adamziel adamziel closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants