Omnisharp-vscode: OmniSharp Status Bar Icon should be Workspace-level element

Created on 29 Mar 2018  路  6Comments  路  Source: OmniSharp/omnisharp-vscode

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.



Feature Request Resolved-Fixed

Most helpful comment

I think we can segregate the two into two separate status bar items:
1. Omnisharp Server Status: This activates as soon as we activate the extension and shows the status of the Omnisharp server.
- [ ] Downloading
- [ ] Installing
- [ ] Starting
- [ ] Running
- [ ] Error
This will stay throughout the lifetime of the extension.

  1. Project Status: Displays the status of the project open in the current workspace.
  • [ ] 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.
  • [ ] Project Name: 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.

All 6 comments

@akshita31 @DustinCampbell @colombod @rchande

It makes sense to me

This looks good to me. I really like the idea of using colours to indicate the status of the O# server.
I think the one thing that might be good to consider is use icons of icons to show Downloading, Installing, Starting, and Stopping. Just to keep the bar clean; and left side tends to use icons instead. See image below.
capture

Yes, vscode recognises the following set of icons: https://octicons.github.com/. We can use them at appropriate places.

The text that we display will be very similar to the branch name displayed by git. Ours will generally be project name.

I think we can segregate the two into two separate status bar items:
1. Omnisharp Server Status: This activates as soon as we activate the extension and shows the status of the Omnisharp server.
- [ ] Downloading
- [ ] Installing
- [ ] Starting
- [ ] Running
- [ ] Error
This will stay throughout the lifetime of the extension.

  1. Project Status: Displays the status of the project open in the current workspace.
  • [ ] 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.
  • [ ] Project Name: 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.
Was this page helpful?
0 / 5 - 0 ratings