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

Improve the networking disabled error message #927

Closed
ironnysh opened this issue Jan 9, 2024 · 4 comments
Closed

Improve the networking disabled error message #927

ironnysh opened this issue Jan 9, 2024 · 4 comments

Comments

@ironnysh
Copy link
Collaborator

ironnysh commented Jan 9, 2024

Hi,

When users try to install a theme or a plugin in a Playground instance whose networking feature is disabled (the default state), they get an error message, which could be more helpful.

Screenshot 2024-01-09 at 15 55 19

While the discussion in the GitHub issue is valuable, it doesn't provide a practical solution to the problem (namely, enabling networking 😀).

I'd suggest the following rewrite of the text here:

Note

Network access is an experimental opt-in feature, which means you need to enable it to allow Playground to access the Plugins/Themes directories.
You can enable global networking support using the Query API (for example, https://playground.wordpress.net/?networking=yes) or the Blueprint API (add "features": { "networking": true } to the JSON file).

Bonus: A unified error message for both the Themes and Plugins pages.

I'm happy to open a PR if the proposed changes are good to go.

A few additional comments:

  • There's no reference to the networking option in the Blueprints API documentation—only in the Blueprint JSON schema.
  • Should streamline the boolean value: yes in the Query API vs. "true" in the Blueprints API.
  • The error message includes a Try Again button, which does nothing.
  • The error message appears twice on the Featured plugins tab.
Screenshot 2024-01-09 at 15 56 04
@adamziel
Copy link
Collaborator

This sounds fantastic @ironnysh! If you'd like to open a PR, I'll be happy to review and merge :)

@adamziel
Copy link
Collaborator

Should streamline the boolean value: yes in the Query API vs. "true" in the Blueprints API.

That's a good note, we could make the Query API accept both yes and true, and perhaps even use true in the documentation.

@ironnysh
Copy link
Collaborator Author

This sounds fantastic @ironnysh! If you'd like to open a PR, I'll be happy to review and merge :)

Coolio, on it. Thanks!

we could make the Query API accept both yes and true, and perhaps even use true in the documentation.

I imagine most developers would associate boolean with true, but doesn't hurt to have options ;-)

@ironnysh
Copy link
Collaborator Author

ironnysh commented Jan 11, 2024

BTW, I found a reference to networking in the documentation. I'll open a PR for this one as well to clarify common use cases covered by networking (there's also this issue).

Finally, can (or even should... 🤨) the Try Again button be used to regenerate the same Playground instance with networking enabled, or is it too much? :-)

Hmm, the button is part of core. Is there a way to hide it?

adamziel pushed a commit that referenced this issue Jan 23, 2024
… and themes (#936)

Displays a revised error message when trying to install a new plugin or
theme while networking is disabled (the default state). See
[#927](#927).

## What problem is it solving?

The current version of the error message doesn't include an explanation
on how to enable networking.

## How is the problem addressed?

Suggests two possible ways to solve the problem, including examples and
links to the documentation.

## Testing Instructions

Launch a Playground instance, navigate to [Add
Themes](https://playground.wordpress.net/?url=/wp-admin/theme-install.php)
or [Add
Plugins](https://playground.wordpress.net/?url=/wp-admin/plugin-install.php),
and see the error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants