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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt new createStatusBarItem API for id and name properties #1543

Closed
bpasero opened this issue Jun 15, 2021 · 2 comments
Closed

Adopt new createStatusBarItem API for id and name properties #1543

bpasero opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
feature New feature or request needs-verification Request for community verification
Milestone

Comments

@bpasero
Copy link

bpasero commented Jun 15, 2021

馃憢 Hi there, Ben here, from the VS Code team.

We just released VSCode 1.57 that landed a new stable API for status bar items to provide id and name properties: https://code.visualstudio.com/updates/v1_57#_status-bar-item-id-and-name-properties

I noticed that your extension is a consumer of the createStatusBarItem API.

Here is an example how using the new API will improve the user experience around managing status bar items:

Without id / name right clicking on the status bar item from your extension will show a generic label that is just the name of the extension:

statusbar

As you can see from the example above, the GH Pull Request extension did not yet adopt this new API and as such, the menu only shows a generic entry (as opposed to the other entries that are more specific).

Another motivation to adopt this new API is that it will enable a user to selectively hide/show status bar entries from your extension in case you register more than one status bar item.

An adoption of the new API involves:

  • configuring "engines": { "vscode": "^1.57.0" } in package.json
  • where createStatusBarItem is called, add a unique id: string property as first parameter
  • in the returned StatusBarItem set name to something that describes the intent of the status bar entry (if you provide multiple status bar entries, make sure the name is different for each entry)

Thanks for the support and the great work! 鉂わ笍

@bpasero bpasero added potential-bug triage Needs to be looked at labels Jun 15, 2021
@eamodio eamodio self-assigned this Jun 22, 2021
@eamodio eamodio added feature New feature or request and removed potential-bug triage Needs to be looked at labels Jun 22, 2021
@eamodio eamodio added this to the Soon鈩 milestone Jun 22, 2021
@eamodio
Copy link
Member

eamodio commented Jun 22, 2021

Can you please verify this fix in tomorrow's GitLens insiders edition?

You can install the GitLens insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first.

@eamodio eamodio added needs-verification Request for community verification pending-release Resolved but not yet released to the stable edition labels Jun 22, 2021
@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Jul 13, 2021
@eamodio eamodio modified the milestones: Soon鈩, Shipped Jul 13, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request needs-verification Request for community verification
Projects
None yet
Development

No branches or pull requests

2 participants