Skip to content

contributes.configuration configuration property schema: Dropdown menu poorly specified (enum / enumDescriptions / enumItemLabels) #7511

Closed

Description

VS Code allows extensions to create settings with predetermined options based on a list of presets. The Contribution Points page's Configuration property schema subsection documents how to do that using the enum / enumDescriptions / markdownEnumDescriptions / enumItemLabels properties. But given how funky the schema is, it would be best to properly specify that part.

Here are a number of specific issues:

  1. There is no code example of enumItemLabels.
  2. enum is mentioned but not specified.
  3. markdownEnumDescriptions is not mentioned in the title.
  4. "will be rendered as Markdown" would be more accurate as "will be parsed as Markdown".
  5. The relationship between these 4 properties is unspecified. What happens if both markdownEnumDescriptions and enumDescriptions are set, for instance?

Also, the following:

The workbench.iconTheme setting uses both enumDescriptions and enumItemLabels. In the screenshot below, the hovered option has the item label "None", with enum description "No file icons" and enum value null.

…would be clearer as:

For example, the workbench.iconTheme setting shown below uses both enumDescriptions and enumItemLabels. In this screenshot, the hovered option has the item label "None", with enum description "No file icons" and enum value null.

I wish this report is the occasion for a general review of that section but understand that the scope is a little wide. Feel free to consider this as solved once the first specific issue is solved. I will file different tickets for any remaining problems if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

doc-bugout of date, inaccurate, confusing content

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions