Skip to content

Commit 65ff0cb

Browse files
feat: allow to configure product.json using Config Map (#2877)
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com> Co-authored-by: Jana Vrbkova <jvrbkova@redhat.com>
1 parent 4ca07e7 commit 65ff0cb

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

modules/administration-guide/pages/configuring-single-and-multiroot-workspaces.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
With the multi-root workspace feature, you can work with multiple project folders in the same workspace. This is useful when you are working on several related projects at once, such as product documentation and product code repositories.
1111

12-
TIP: See link:https://code.visualstudio.com/docs/editor/workspaces[What is a VS Code "workspace"] for better understanding and authoring the workspace files.
12+
TIP: See link:https://code.visualstudio.com/docs/editing/workspaces/workspaces[What is a VS Code workspace] for better understanding and authoring the workspace files.
1313

1414
[NOTE]
1515
====

modules/administration-guide/pages/editor-configurations-for-microsoft-visual-studio-code.adoc

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ The following sections are currently supported:
1515

1616
* settings.json
1717
* extensions.json
18+
* product.json
1819

19-
The `settings.json` section contains various settings that allow to customize different parts of the Code - OSS editor. +
20-
The `extensions.json` section contains recommented extensions are installed when a workspace is started.
20+
The *settings.json* section contains various settings with which you can customize different parts of the Code - OSS editor. +
21+
The *extensions.json* section contains recommended extensions that are installed when a workspace is started. +
22+
The *product.json* section contains properties that you need to add to the editor's *product.json* file. If the property already exists, its value will be updated.
2123

2224
.Procedure
2325

@@ -47,6 +49,19 @@ data:
4749
"titleBar.activeForeground": "#ffffff"
4850
}
4951
}
52+
product.json: |
53+
{
54+
"extensionEnabledApiProposals": {
55+
"ms-python.python": [
56+
"contribEditorContentMenu",
57+
"quickPickSortByLabel",
58+
]
59+
},
60+
"trustedExtensionAuthAccess": [
61+
"<publisher1>.<extension1>",
62+
"<publisher2>.<extension2>"
63+
]
64+
}
5065
immutable: false
5166
----
5267
====
@@ -67,4 +82,7 @@ Make sure that the Configmap contains data in a valid JSON format.
6782
* Go to the `Extensions` view (`F1 → View: Show Extensions`) and check that the extensions are installed
6883
* Ensure that the extensions from the ConfigMap are present in the `.code-workspace` file by using the `F1 → File: Open File...` command. By default, the workspace file is placed at `/projects/.code-workspace`.
6984

70-
85+
. Verify that product properties defined in the ConfigMap are being added to the Visual Studio Code *product.json*:
86+
* Open a terminal, run the command `cat /checode/entrypoint-logs.txt | grep "Node.js dir"` and copy the Visual Studio Code path.
87+
* Press `Ctrl + O`, paste the copied path and open *product.json* file.
88+
* Ensure that *product.json* file contains all the properties defined in the ConfigMap.

0 commit comments

Comments
 (0)