Skip to content

[FEATURE] Support enum and enumDescriptions on Preference Settings View #357

@erha19

Description

@erha19

如果你的需求与问题相关,请在下面描述一下(Is your feature request related to a problem? Please describe.)

configuration 贡献点声明如下:

{
   "contributes": {
     "configuration": {
       "magicCode.sdk.channel": {
          "type": "number",
          "default": 1,
          "enum": [
            1,
            2,
            3,
            4
          ],
          "enumDescriptions": [
            "稳定版本(#1 Stable)",
            "灰度版本(#2 Beta)",
            "开发版本(#3 Dev)",
            "尝鲜版本(#4 Canary)"
          ],
          "description": "Select from which channel to download sdk updates",
          "scope": "application"
        }
     }
   }
}

描述你预期的功能表现(Describe the solution you'd like)

设置面板响应位置应该展示为数组下拉选项,同时支持 description 展示

image

补充信息(Additional context)

初步定位 configuration 的贡献点是有存入数据结构的 configurationDefaults.ts

需要针对视图展示做一下额外处理,视图处理逻辑见 preferenceItem.view.tsx#L38,展示还没时间修复,有兴趣的同学可以着手修复一下

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions