Skip to content

Conversation

@nose2002kr
Copy link

…Item` function

I am submitting a pull request to extend the function arguments in the createStatusBarItem section of the document below.
Document: https://code.visualstudio.com/api/references/vscode-api#window

There is no associated issue, but I can create one if needed.

…Item` function

Added arguments to the `createStatusBarItem` function for creating grouped status bars in user-developed extensions.

* Since `IStatusbarEntryLocation` must be accessible from the extHost API layer, moved it from browser to common.
* Due to numerous uses of `StatusbarAlignment` within browser/statusbar.ts, retained its definition as a const value.
Copilot AI review requested due to automatic review settings January 25, 2026 13:13
@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/editor/editorStatus.ts
  • src/vs/workbench/browser/parts/statusbar/statusbarModel.ts
  • src/vs/workbench/browser/parts/statusbar/statusbarPart.ts

@nose2002kr
Copy link
Author

@microsoft-github-policy-service agree

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR exposes the StatusBarEntryLocation parameter in the public createStatusBarItem API, allowing extensions to position status bar items relative to other items with fine-grained control over alignment and compact grouping.

Changes:

  • Added StatusBarEntryLocation interface to the public API (vscode.d.ts) with support for positioning items relative to other items
  • Refactored internal status bar types into a new shared module (types.ts) for better code organization
  • Updated all status bar-related type signatures throughout the codebase to use the new type definitions
  • Added comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/vscode-dts/vscode.d.ts Added StatusBarEntryLocation interface and updated createStatusBarItem signatures to accept the new location type
src/vs/workbench/services/statusbar/common/types.ts New file containing shared status bar type definitions including StatusBarAlignment enum, IStatusBarEntryLocation interface, and utility functions
src/vs/workbench/services/statusbar/browser/statusbar.ts Refactored to import types from types.ts and created backward-compatible constants object for internal use
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts Updated imports and type signatures to use the refactored types
src/vs/workbench/browser/parts/statusbar/statusbarModel.ts Updated imports and type signatures to use the refactored types
src/vs/workbench/browser/parts/editor/editorStatus.ts Updated imports and type signatures to use the refactored types
src/vs/workbench/api/common/extHostTypes.ts Removed StatusBarAlignment enum and asStatusBarItemIdentifier function (moved to types.ts)
src/vs/workbench/api/common/extHostStatusBar.ts Updated to handle StatusBarEntryLocation in priority parameter with proper validation and conversion
src/vs/workbench/api/common/extHost.protocol.ts Updated protocol signature to support IStatusBarEntryLocation in priority parameter
src/vs/workbench/api/common/extHost.api.impl.ts Updated API implementation to handle the new StatusBarEntryLocation type in createStatusBarItem
src/vs/workbench/api/browser/statusBarExtensionPoint.ts Updated to handle and process IStatusBarEntryLocation when creating status bar entries
src/vs/workbench/api/browser/mainThreadStatusBar.ts Updated main thread implementation to support the new location type in the protocol
extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts Added test verifying correct behavior when using StatusBarEntryLocation with compact positioning

@bpasero bpasero assigned bpasero and unassigned kycutler Jan 25, 2026
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.

3 participants