Skip to content

OmniSharp Status Bar Icon should be Workspace-level element #2146

@TheRealPiotrP

Description

@TheRealPiotrP

The existing Status Bar element displayed by this extension is a bit confusing, both from a user's perspective as well as the maintainer's. For reference, the element is this:
image

The element is confusing because it represents workspace-wide state but attempts to do so in relation to the Active Text Editor. More specifically, the Status Bar element is only visible if the Active Text Editor is one that O# does/should care about. However, the status bar element communicates the status of the Workspace's O# server, something that is largely independent of the currently active document.

The status element's split intent leads to several undesirable characteristics which we should solve:

  • Though O# is running all the time, the status bar suggests that it's only running while .NET files are open.
  • By appearing in the context of .NET files only, the element suggests that its action [switching projects] is somehow relative to the currently selected document. This is not true, as that action is displaying projects at the VS Code Workspace level.
  • Existing filters used to choose if the element should be shown can lead to odd and confusing states. A key example occurs if one opens a .NET file from outside the current workspace. This causes the element to show the text Switch Projects though it is impossible to select a project that covers the active file. This results in an infinite loop in UX actions.

Proposal

The O# status bar element should be converted to represent the status of the O# server at the VS Code context. This means:

  • Move the element to the left, along with other Workspace-context tools like GIT and the VS Code Problem Reporter
  • The element should appear once the extension is initialized and should remain visible at all times unless the O# server is explicitly stopped
  • The element itself should be explicitly split to represent two concerns:
    • The flame icon should represent the status of the O# server. It should be the default color if things are going well, and should be red if a problem occurs. Clicking the icon should take users to the appropriate output channel.
    • The text should represent the project currently open in the O# server. This element can be in one of several states:
      • Not ready. This includes Downloading, Installing, Starting, and Stopping. The text should express the state that the server is in. Clicking the text should have no effect.
      • Select Project. When the server starts but realizes it does not know which project to open, it must prompt the user. In this state the flame icon should be Yellow in this state. Clicking this text should allow the user to select a project.
      • Running. When the server is running on a specific project, the text will display the name of that project. Clicking on the text should allow the user to select a different project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature RequestfixedFixed and available in the stable version of C# Extension.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions