Skip to content

Feature : Identification for Third Party Commands#68573

Open
Vrishabhsk wants to merge 2 commits intoWordPress:trunkfrom
Vrishabhsk:add/third-party-commands
Open

Feature : Identification for Third Party Commands#68573
Vrishabhsk wants to merge 2 commits intoWordPress:trunkfrom
Vrishabhsk:add/third-party-commands

Conversation

@Vrishabhsk
Copy link
Copy Markdown
Contributor

What?

  • Show Plugin Name beside commands registered by Third Party

Why?

How?

  • Extract the plugin name via command.name
  • Limit the plugin name to 12 characters and show ellipsis is greater than 12

Screenshots or screencast

Screenshot 2025-01-09 at 6 52 44 PM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 9, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org>
Co-authored-by: richtabor <richtabor@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Package] Commands /packages/commands labels Jan 11, 2025
@t-hamano t-hamano linked an issue Jan 11, 2025 that may be closed by this pull request
@jasmussen
Copy link
Copy Markdown
Contributor

Honestly, this one feels good to go to me as far as accomplishing the intended design. It also seems to work well.

@t-hamano @Mamaduka I'm selfishly pinging you directly, asking in case either of you have time to look. What do you think?

CC: @WordPress/gutenberg-design for awareness.

@Mamaduka
Copy link
Copy Markdown
Member

@Vrishabhsk, do you mind rebasing this branch on top of the latest trunk and resolving merge conflicts?

@t-hamano
Copy link
Copy Markdown
Contributor

Thanks for the ping!

Personally, I think the approach of using the name field is better avoided, as it's merely an identifier.

  • It doesn't necessarily contain slashes.
  • What if the plugin name consists of multiple words?
  • Consumers won't necessarily enter the plugin name in the name field, which could lead to unintended information leakage.

I believe it's up to the plugin developer whether they want to display the plugin name or not, and for example, plugin developers are free to include their branding in the label using a command like this:

useCommands( [
	{
		name: 'jetpack/activity-log',
		label: __( 'Jetpack > Activity log' ),
		icon: jetpackIcon1,
	},
	{
		name: 'jetpack/activity-log',
		label: __( 'Jetpack > Copy shortlink' ),
		icon: jetpackIcon2,
	},
] );

@Mayank-Tripathi32
Copy link
Copy Markdown
Member

I agree, Instead of plugin name. We should give plugin developer freedom to pick which branding they would like to show end users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Design Feedback Needs general design feedback. [Package] Commands /packages/commands [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for identifying third party commands

5 participants