Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display registered settings groups by extension #126089

Closed
roblourens opened this issue Jun 11, 2021 · 6 comments
Closed

Display registered settings groups by extension #126089

roblourens opened this issue Jun 11, 2021 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan settings-editor VS Code settings editor issues

Comments

@roblourens
Copy link
Member

roblourens commented Jun 11, 2021

The "configuration" extension contribution point can take a single object of setting keys -> definitions or an array of these, each with their own title. Currently the Extensions node in the settings editor TOC shows extension settings by config section with the registered title, mixed up globally and sorted alphabetically. A couple issues with this:

  • Config section titles can be generic and duplicate other sections
    image
  • There is a LESS section that comes from the builtin css-language-features extension, but there is no way to know which extension it came from
  • If an extension registers multiple sections, they are not grouped together and the specified order is ignored. The split json editor handled this correctly.

So I'm thinking we should actually have the extension name as the top node, put the extension sections under that with their given titles and order. This actually makes extension sections much more useful. This is a good start towards giving extensions more control over the presentation of their settings, like discussed in #70589, and we don't have to extend JSON schema to do it.

@roblourens roblourens added feature-request Request for new features or functionality settings-editor VS Code settings editor issues labels Jun 11, 2021
@roblourens roblourens added this to the June 2021 milestone Jun 11, 2021
@roblourens
Copy link
Member Author

cc @eamodio, may be interesting to you

@eamodio
Copy link
Contributor

eamodio commented Jun 21, 2021

I definitely think this makes a lot of sense -- keeping the extension settings contain with in its own "space"

@rzhao271
Copy link
Contributor

WIP

Here's how a single level of grouping looks:

singlevel

@rzhao271
Copy link
Contributor

\closedWith 22c0c2c

@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Sep 24, 2021
@rzhao271 rzhao271 added on-testplan and removed verification-needed Verification of issue is requested labels Sep 24, 2021
@rzhao271 rzhao271 added the on-release-notes Issue/pull request mentioned in release notes label Oct 4, 2021
@alefragnani
Copy link

I was playing with the released API to organize one of my extension's settings, and if I understand correctly, once I decide to use groups (adding two or more configuration entry), the Settings UI will add each entry inside my extension top node.

I mean, suppose I have something like this:

"configuration": [
        {
            "title": "%projectManager.configuration.title%",
            "properties": {
                "projectManager.removeCurrentProjectFromList": {
                    "type": "boolean",
                    ...
        },
        {
            "title": "Status Bar",
            "properties": {
                "projectManager.showProjectNameInStatusBar": {
                    "type": "boolean",
                    ...
        // and so on...

The Settings view will display:
Screen Shot 2021-10-08 at 01 21 14

The first thing I noticed is the double Project Manager nodes. Reading this issue I understood this is the expected behavior, but I was expecting something similar to how the core settings works, like Text Editor. When you expand it, you see Cursor as the first child node, but there are settings for Text Editor alone, and you have to scroll a lot before entering Cursor. I mean, I would like to have basic settings and grouped settings. What do you think?

Secondly, and I guess this is an issue, you may notice my extension entry is the first one inside Extensions node. But this is not alphabetically sorted anymore, and this is happening because one of my groups is called Any (starts with A). If I remove it, the extension moves down, right after Git (because I have a group called Git).

Let me know if you need more details, or if you would that I create separate issues.

Thank you

@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2021
@rzhao271
Copy link
Contributor

@alefragnani @AlbertoFabbri93 those issues should be fixed in the next Insiders, and are being tracked in #137257 and #137259.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan settings-editor VS Code settings editor issues
Projects
None yet
Development

No branches or pull requests

5 participants
@roblourens @eamodio @alefragnani @rzhao271 and others