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

preferences: add json commands #9832

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

vince-fugnitto
Copy link
Member

What it does

The pull-request adds the following commands:

  • open user preferences (json)
  • open workspace preferences (json)
  • open folder preferences (json)

The folder command will prompt users to first select a root before opening.

How to test

  1. in a single-root workspace execute open user preferences (json) - the user settings.json should be opened in an editor.
  2. in a single-root workspace execute open workspace preferences (json) - the workspace settings.json should be opened in an editor.
  3. in a multi-root workspace with multiple folders execute open folder preferences (json) - the respective settings.json should be opened after selecting a root.
  4. confirm that open folder preferences (json) does not appear in a single-root workspace or a multi-root workspace without any root folders.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

The commit adds the following commands:
- `open user preferences (json)`
- `open workspace preferences (json)`
- `open folder preferences (json)`

The folder command will prompt users to first select a root before
opening.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto added the preferences issues related to preferences label Aug 3, 2021
@vince-fugnitto vince-fugnitto self-assigned this Aug 3, 2021
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

That already looks really good. I have a few questions/points of discussion before approving though.

Comment on lines +150 to +154
export const OPEN_FOLDER_PREFERENCES_JSON: Command = {
id: 'workbench.action.openFolderSettingsFile',
category: 'Preferences',
label: 'Open Folder Preferences (JSON)',
};
Copy link
Member

Choose a reason for hiding this comment

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

As far as I can see there's no normal Open Folder Preferences command in Theia right now. Perhaps it is out of scope for this PR, but do you mind adding it? The appropriate frontend UI in the preferences view is already supported for that:

image

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

Looks good to me. I confirm the new commands appear and work when they're supposed to, and do not appear when they should not. They all have the ID's that a VSCode plugin would expect.

@vince-fugnitto
Copy link
Member Author

@msujew I'll merge and @colin-grant-work mentioned a follow-up pull-request to add the missing command (out of scope for this pull-request) with some possible additional refactorings.

@vince-fugnitto vince-fugnitto merged commit 617d5b1 into master Aug 4, 2021
@vince-fugnitto vince-fugnitto deleted the vf/preferences-json branch August 4, 2021 15:19
@github-actions github-actions bot added this to the 1.17.0 milestone Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences issues related to preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants