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

Inconsistent capitalization of plugin and theme names during boot up #1487

Open
ironprogrammer opened this issue Jun 6, 2024 · 3 comments
Open

Comments

@ironprogrammer
Copy link
Contributor

When a Playground instance is spinning up, theme and plugin names displayed may have inconsistent or incorrect capitalization. for example:

"Woocommerce" should be "WooCommerce"
Downloading Woocommerce

"Wordpress importer" should be "WordPress Importer"
Activating Wordpress importer

@dd32
Copy link
Member

dd32 commented Jun 6, 2024

This is due to the install step simply sentence-case capitalising the slug that's being installed.

The 'proper' way here would be to make a theme_information / plugin_information API call to fetch the details.

That would correct the examples provided, but for plugins like Jetpack would result in Downloading Jetpack – WP Security, Backup, Speed, & Growth due to the description-in-title. This would be a better outcome though.

@dd32
Copy link
Member

dd32 commented Jun 11, 2024

Just to add some context to the above..

The existing code for converting a zip name to the human name is this:
https://github.com/WordPress/wordpress-playground/blob/trunk/packages/playground/blueprints/src/lib/utils/zip-name-to-human-name.ts

The existing code doesn't make an API call, and instead downloads directly, IMHO in an attempt for better performance, as the extra API call would add extra steps/latency into the startup procedure.

Given that WordPress plugin slugs are very rarely the same as the plugin name (A good example of this is Yoast SEO, with the historical, wordpress-seo slug) I tend to agree that something does need to change here.

@bgrgicak
Copy link
Collaborator

bgrgicak commented Jul 3, 2024

Thanks, this seems useful and we could prefetch the info from WP.org.

Before we can work on this we need to wrap up the migration of blueprints to PHP, so we can add it there. #1025

@bgrgicak bgrgicak moved this from Inbox to Future work in Playground Board Jul 3, 2024
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

4 participants