Skip to content

Change name of plugin target to readable form#505

Merged
natecook1000 merged 3 commits into
apple:mainfrom
clayellis:generate-manual-plugin-name
Oct 18, 2022
Merged

Change name of plugin target to readable form#505
natecook1000 merged 3 commits into
apple:mainfrom
clayellis:generate-manual-plugin-name

Conversation

@clayellis
Copy link
Copy Markdown
Contributor

This PR updates the name of the "Generate Manual" plugin so that it appears in a more readable "command" form in the context menu in Xcode.

Before:
image

After:
image

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@clayellis
Copy link
Copy Markdown
Contributor Author

Arguably, there should be an additional parameter on the Plugin target type that allows for an easier "external" name configuration without having to rename actual targets. Maybe it's worth a pitch? Someone else may have to take it up, though.

@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Oct 14, 2022

I'm on board with making the name look better in Xcode, though I'm not a huge fan of having a space in the file path.

@neonichu do you have any thoughts, is this the best solution for improving the display name in Xcode?

@neonichu
Copy link
Copy Markdown
Member

Yep, right now this is the only way. I do think it might be worthwhile to separately look into extending the PluginCommandIntent to offer a display name to separate this from the target name.

@clayellis
Copy link
Copy Markdown
Contributor Author

clayellis commented Oct 15, 2022

I'm on board with making the name look better in Xcode, though I'm not a huge fan of having a space in the file path.

This avoids having a space in the file path (by explicitly declaring a path) and moves the space into the target name.

Copy link
Copy Markdown
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this keeps the command-line verb the same, it looks like the change is really kept local to the package manifest, which then gets picked up by Xcode for the action name. Given that, I think this is fine to merge, especially since it doesn't bind us with source compatibility or anything else if we do discover problems down the road.

@natecook1000
Copy link
Copy Markdown
Member

@swift-ci Please test

@natecook1000 natecook1000 merged commit 76259eb into apple:main Oct 18, 2022
@clayellis clayellis deleted the generate-manual-plugin-name branch October 19, 2022 18:10
@clayellis
Copy link
Copy Markdown
Contributor Author

Thanks for merging this! I hope to contribute in larger ways in the future!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants