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

Organize extension settings into Sections #1024

Merged
merged 1 commit into from
Apr 7, 2022
Merged

Organize extension settings into Sections #1024

merged 1 commit into from
Apr 7, 2022

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Mar 31, 2022

This groups and orders the existing settings into VS Code Setting sections while preserving the exact keys for each setting.

The extension previously utilized different prefixes to indicate different areas like terraform-ls.rootModules or terraform-ls.terraformExecTimeout. This leaves settings in a seemingly random order in the Settings UI and makes it hard to autocomplete inside the json file.

We solve this by organizing the extension settings into sections in the contribute part of the package.json manifest. These sections provide a logical order to extension settings, especially if the extension has many settings or many settings that are nested.

image

This also allows us to separate out configuration options, like a separate section for Experimental Options:

image

@jpogran jpogran changed the title arrange settings Organize Settings Mar 31, 2022
@jpogran jpogran self-assigned this Mar 31, 2022
@jpogran jpogran added the enhancement New feature or request label Mar 31, 2022
@jpogran jpogran added this to the v2.22.0 milestone Mar 31, 2022
@jpogran jpogran requested review from dbanck and radeksimko April 4, 2022 15:38
@jpogran jpogran marked this pull request as ready for review April 4, 2022 15:39
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you for the UX improvement! 🙇🏻‍♂️ 🚀

Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I just opened the JSON file and this came up
Screenshot 2022-04-05 at 16 48 11

@radeksimko radeksimko self-requested a review April 5, 2022 15:49
@jpogran jpogran force-pushed the arrange_settings branch from 2074aea to 9ed9ad4 Compare April 6, 2022 19:48
@jpogran
Copy link
Contributor Author

jpogran commented Apr 6, 2022

Actually I just opened the JSON file and this came up

It is supposed to be greyed out but still read the settings. It would be greyed out because it's technically not a setting anymore, but still read by VS Code because of the way JSON works.

While this worked in testing, it's too much magic to put in a PR that's purpose is to not affect the user. I have walked this back to just organizing sections and we will work in the terraform.languageServer extraction in a later PR.

Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jpogran jpogran changed the title Organize Settings Organize extension settings into Sections Apr 7, 2022
@jpogran jpogran merged commit a85d0f3 into main Apr 7, 2022
@jpogran jpogran deleted the arrange_settings branch April 7, 2022 13:21
@radeksimko radeksimko mentioned this pull request May 3, 2022
@github-actions
Copy link

github-actions bot commented May 8, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants