Skip to content

[VS Code] Make extension settings order consistent with JetBrains

Problem

Extension settings are ordered in alphabetical order by default. That means that settings for a single feature (like code suggestions) can be spread in different places in the settings overview.

image

(Sidenote: we already added specified order for 3 existing items)

Solution

JetBrains went through a UX review of the settings recently [JetBrains] Language Server Settings UX Review (gitlab-org/editor-extensions/gitlab-jetbrains-plugin#491 - closed), we should, when possible, make the settings order the same.

Details

Assigning each settings property an order property in settings.json will sort the settings in the desired order.

Limitations

Property titles

The VS Code automatically transforms the JSON properties names and makes them into Capitalized settings labels. For example, we can't ever have GitLab in the label, we have to have Gitlab (see [VS Code] Apply Proper Casing to Extension Sett... (#1304 - closed) for more details)

The settings contribution points are spread across two package.json files:

Consistent ordering

This might make it difficult to keep consistent ordering over the long term (all the usual z-index issues will apply here). To begin with, we can use some larger integers to denote "features": e.g. 100 - code suggestions, 200 - certificate settings.

No documentation references

Thanks to how VS Code processes the settings schema (contribution points), we can't link to documentation from the settings as JetBrains can. The links won't be clickable.

image

image

JetBrains settings order

This is the structure that JetBrains uses:

1. Account settings

  • This is not applicable to VS Code since account management is not captured in the settings.json (or the UI)
Screenshot

image

Duo features

Next, JetBrains offers:

  1. Feaute enabled flags (code suggestions and chat)
  2. Enabled code suggestion languages
  3. Additional code suggestions languages

image

Advanced settings

  • telemetry
  • Language Server controls
  • streaming
  • HTTP agent (SSL+Proxy)

image

Edited by Tomas Vik