Skip to content

Added ability to output extension info to clipboard#54433

Closed
lannonbr wants to merge 707 commits intomicrosoft:masterfrom
lannonbr:extension-info-action
Closed

Added ability to output extension info to clipboard#54433
lannonbr wants to merge 707 commits intomicrosoft:masterfrom
lannonbr:extension-info-action

Conversation

@lannonbr
Copy link
Contributor

Implements #47296

I added an action to the extensions actions cog to copy a chunk of metadata from an extension to the clipboard.

The copied text includes: id, description, version, publisher, and marketplace link.

This also could be useful so if a user has a bug with an extension, they could copy this into an issue and the extension maintainer could know some metadata like the extension version when they're trying to debug an issue.

@sandy081 sandy081 requested review from ramya-rao-a and sandy081 and removed request for sandy081 July 19, 2018 15:39
@sandy081 sandy081 assigned ramya-rao-a and unassigned sandy081 Jul 23, 2018
roblourens and others added 24 commits July 25, 2018 14:45
Makes sure webviews don't show up in the history quick pick. We already do this filtering properly when there is a query, just not when there is no query
* Support tags on settings to filter in settings editor

* Revert adding tags to api until we are ready
Make sure we always invoke the applyCodeActionCommand. This is needed for telemetry to be sent properly
Try to normalize file cases on case-insensitive file systems
- Remove noop optional method
- Use double quotes for strings
- Mark fields readonly
Avoids registering class on unsupported ts versions
- Avoids extra checks when response cannot be null
…-icon

Show the "method" icon for constructors
export class ExtensionInfoAction extends Action implements IExtensionAction {

static readonly ID = 'extensions.extensionInfo';
static LABEL = localize('extensionInfoAction', "Copy Extension info to clipboard");
Copy link
Contributor

Choose a reason for hiding this comment

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

The to clipboard here is unnecessary. We have other copy actions in the product where it is assumed that the user knows that the text is copied to clipboard.

How about Copy Extension information?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

const clipboardStr = `${localizedExtension}\n${localizedDescription}\n${localizedVersion}\n${localizedPublisher}\n${localizedVSMarketplaceLink}`;

clipboard.writeText(clipboardStr);
this.notificationService.info(localize('extensionInfoActionNotification', 'Extension info copied to clipboard'));
Copy link
Contributor

Choose a reason for hiding this comment

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

To stay consistent with other copy actions in the product that do not show any notifications on copy (For eg: Copy Path), let's skip the notification here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@ramya-rao-a
Copy link
Contributor

@lannonbr This PR is currently in a very bad state most probably due to a bad merge from master. I'll close this PR. Can you create a new one?

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.