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

docs: Rewriting pages about editors #2552

Merged
merged 50 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e567fbb
initial changes
max-cx Feb 10, 2023
93eef14
fix: rewriting the IDE-related pages
max-cx Feb 13, 2023
2462606
edit 'Adding or removing extensions in the embedded Open VSX registry…
max-cx Feb 15, 2023
39b74e3
rewrite the assembly and remove the outdated concept module
max-cx Feb 15, 2023
f2bcf40
new edits
max-cx Feb 16, 2023
d862bca
further edits
max-cx Feb 16, 2023
8aadf90
fix: typo
max-cx Feb 16, 2023
a373437
remove the mention of the editorconfig file
max-cx Feb 17, 2023
ba4cc1e
Update modules/end-user-guide/pages/url-parameter-for-the-cloud-ide.adoc
max-cx Feb 17, 2023
d9ad0d2
Update modules/end-user-guide/pages/url-parameter-for-the-cloud-ide.adoc
max-cx Feb 17, 2023
7accd9e
initial changes in response to Mario's feedback
max-cx Feb 21, 2023
d0c5266
work in progress
max-cx Feb 22, 2023
77b50ae
remove 'cloud' from IDE
max-cx Mar 1, 2023
0b442cf
add an admonition requested by Mario
max-cx Mar 1, 2023
4d20a87
incorporate new feedback from Artem
max-cx Mar 2, 2023
0aeb0c3
Restarting the jobs
max-cx Mar 2, 2023
9743d6f
Add 'Restart Workspace from Local Devfile' command to the correspondi…
RomanNikitenko Mar 9, 2023
3ef0dd1
rewrite of the vsx-related procedure due to changes in vsx.org
max-cx Mar 10, 2023
98d201c
Update modules/end-user-guide/partials/proc_adding-vs-code-extensions…
max-cx Mar 10, 2023
a98bf3c
edit proc_adding-or-removing-extensions-in-the-embedded-open-vsx-regi…
max-cx Mar 10, 2023
5e17d50
Apply suggestions from code review
max-cx Mar 10, 2023
b8c0262
Update modules/end-user-guide/pages/defining-a-common-ide.adoc
max-cx Mar 10, 2023
80378d4
Update modules/end-user-guide/pages/url-parameter-for-the-ide.adoc
max-cx Mar 10, 2023
d24ef3c
Update modules/end-user-guide/pages/ides-in-workspaces.adoc
max-cx Mar 10, 2023
50e778c
Apply suggestions from code review
max-cx Mar 13, 2023
d4deb4a
minor edit
max-cx Mar 13, 2023
8059611
another minor edit
max-cx Mar 13, 2023
1a55e18
another minor edit
max-cx Mar 13, 2023
2fd4265
another minor edit
max-cx Mar 13, 2023
7372f25
another minor edit
max-cx Mar 13, 2023
3c73c24
another minor edit
max-cx Mar 13, 2023
1540524
another minor edit
max-cx Mar 13, 2023
a2416df
minor edit
max-cx Mar 13, 2023
4e7297c
minor edit
max-cx Mar 13, 2023
70e68be
minor edit
max-cx Mar 13, 2023
0bd023f
apply changes requested in https://github.com/eclipse-che/che-docs/pu…
max-cx Mar 13, 2023
698bfd4
manually apply suggestion from code review
max-cx Mar 13, 2023
9733ed6
minor edit
max-cx Mar 13, 2023
293b3f4
test rearranging the steps due to the snippet file
max-cx Mar 13, 2023
74b9d2d
rearrange admonition content
max-cx Mar 13, 2023
bedfd05
minor edit
max-cx Mar 14, 2023
4170924
minor edit
max-cx Mar 14, 2023
958b6cf
Update modules/end-user-guide/pages/microsoft-visual-studio-code-open…
max-cx Mar 14, 2023
2b54c41
Update modules/end-user-guide/partials/proc_adding-vs-code-extensions…
max-cx Mar 14, 2023
47d4edd
rename section heading and file name
max-cx Mar 14, 2023
1cdb621
edit the section heading and file name
max-cx Mar 14, 2023
1484bd3
minor edit
max-cx Mar 14, 2023
31252fe
merge two tips
max-cx Mar 14, 2023
3b3bb4f
temporary xref fix - correct text, parking file
max-cx Mar 14, 2023
d5a6c2c
temporary cross-reference fix
max-cx Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,58 @@ pass:[<!-- vale RedHat.TermsErrors = YES -->]

.Procedure

include::example$snip_{project-context}-steps-to-add-or-remove-extensions-in-openvsx-sync-json.adoc[]
. Get the publisher and extension names of each chosen extension:

.. Find the extension on the link:https://www.open-vsx.org/[Open VSX registry website] and copy the URL of the extension's listing page.

** If the extension is published on link:https://open-vsx.org[open-vsx.org], you can add its extension `id` in the format __<published_by>__.__<unique_identifier>__. You can find the `id` details on the extension's listing page on link:https://open-vsx.org[open-vsx.org].
.. Extract the __<publisher>__ and __<extension>__ names from the copied URL:
+
[source,json,subs="+quotes"]
[subs="+quotes"]
----
{
"id": "__<published_by>__.__<unique_identifier>__"
}
https://www.open-vsx.org/extension/__<publisher>__/__<extension>__
----
+
[TIP]
====
The latest extension version on link:https://open-vsx.org[open-vsx.org] is the default. Alternatively, you can add `"version": "__<extension_version>__"` on a new line to specify a version.

If the extension is only available from link:https://marketplace.visualstudio.com/VSCode[Microsoft Visual Studio Marketplace], but not link:https://open-vsx.org[Open VSX], you can ask the extension publisher to also publish it on link:https://open-vsx.org[open-vsx.org] according to these link:https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension[instructions], potentially using this link:https://github.com/marketplace/actions/publish-vs-code-extension[GitHub action].

If the extension publisher is unavailable or unwilling to publish the extension to link:https://open-vsx.org[open-vsx.org], and if there is no Open VSX equivalent of the extension, consider link:https://github.com/open-vsx/publish-extensions/issues[reporting an issue] to the Open VSX team.

====

** If the extension is only available from link:https://marketplace.visualstudio.com/VSCode[Microsoft Visual Studio Marketplace], but not link:https://open-vsx.org[Open VSX], you can ask the extension publisher to also publish it on link:https://open-vsx.org[open-vsx.org] according to these link:https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#how-to-publish-an-extension[instructions], potentially using this link:https://github.com/marketplace/actions/publish-vs-code-extension[GitHub action].
include::example$snip_{project-context}-steps-to-add-or-remove-extensions-in-openvsx-sync-json.adoc[]

** To add extensions, add the publisher and extension names to the `openvsx-sync.json` file.
** To remove extensions, remove the publisher and extension names from the `openvsx-sync.json` file.
** Use the following JSON syntax:
+
[source,json,subs="+quotes"]
----
{
"id": "__<publisher>__.__<extension>__"
}
----
+
[TIP]
====
* If the extension publisher is unavailable or unwilling to publish the extension to link:https://open-vsx.org[open-vsx.org], and if there is no Open VSX equivalent of the extension, consider link:https://github.com/open-vsx/publish-extensions/issues[reporting an issue] to the Open VSX team.

* If you have a closed-source extension or an extension developed only for internal use in your company, you can add the extension directly from a `.vsix` file by using a URL accessible to your custom plugin registry container:
* The latest extension version on link:https://open-vsx.org[open-vsx.org] is the default. Alternatively, you can add `"version": "__<extension_version>__"` on a new line to specify a version.

* If you have a closed-source extension or an extension developed only for internal use in your organization, you can add the extension directly from a `.vsix` file by using a URL accessible to your custom plugin registry container:
+
[source,json,subs="+quotes"]
----
{
"id": "__<published_by>__.__<unique_identifier>__",
"id": "__<publisher>__.__<extension>__",
"download": "__<url_to_download_vsix_file>__",
"version": "__<extension_version>__"
}
----
====
+
WARNING: Please read the link:https://aka.ms/vsmarketplace-ToU[Terms of Use] for the link:https://marketplace.visualstudio.com/VSCode[Microsoft Visual Studio Marketplace] before using its resources.

** You can remove the extension by deleting it from the `openvsx-sync.json` file.
* Read the link:https://aka.ms/vsmarketplace-ToU[Terms of Use] for the link:https://marketplace.visualstudio.com/VSCode[Microsoft Visual Studio Marketplace] before using its resources.

====

. Build the plugin registry container image and publish it to a container registry like link:https://quay.io/[quay.io]:

Expand All @@ -69,7 +84,7 @@ $ ./build.sh -o __<username>__ -r quay.io -t custom
$ {docker-cli} push quay.io/__<username/plugin_registry:custom>__
----

. Edit the `CheCluster` custom resource in your organization's cluster to point to the image (for example, on link:https://quay.io/[quay.io]) and then save the changes:
. Edit the `CheCluster` custom resource in your organization's cluster to point to the image (for example, on link:https://quay.io/[quay.io]) and save the changes:
+
[source,yaml,subs="+quotes"]
----
Expand All @@ -82,6 +97,8 @@ spec:
openVSXURL: ''
----

.Verification

. Check that the `plugin-registry` pod has restarted and is running.

. Restart the workspace and check the available extensions in the *Extensions* view of the workspace IDE.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
====
* The default `openVSXURL` value is `pass:c,a,q[https://open-vsx.org]`.

* To select the embedded Open VSX registry instance in the `plugin-registry` pod, use `openVSXURL: ''`. See the next section for how to customize the included extensions.
* To select the embedded Open VSX registry instance in the `plugin-registry` pod, use `openVSXURL: ''`. See the next section for how to customize the list of included extensions.

* You can also point `openVSXURL` at the URL of a standalone Open VSX registry instance if its URL is accessible from within your organization's cluster and not blocked by a proxy.
====
8 changes: 4 additions & 4 deletions modules/end-user-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
** xref:starting-a-new-workspace-with-a-clone-of-a-git-repository.adoc[]
** xref:optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc[]
*** xref:url-parameter-concatenation.adoc[]
*** xref:url-parameter-for-the-workspace-ide.adoc[]
*** xref:url-parameter-for-the-ide.adoc[]
*** xref:url-parameter-for-starting-duplicate-workspaces.adoc[]
*** xref:url-parameter-for-the-devfile-file-name.adoc[]
*** xref:url-parameter-for-the-devfile-file-path.adoc[]
Expand All @@ -19,9 +19,9 @@
** xref:authenticating-to-a-git-server-from-a-workspace.adoc[]
* xref:customizing-workspace-components.adoc[]
* xref:devfile-introduction.adoc[]
* xref:selecting-a-workspace-ide.adoc[]
** xref:selecting-an-in-browser-ide-for-one-new-workspace.adoc[]
** xref:selecting-an-in-browser-ide-for-all-workspaces-that-clone-the-same-git-repository.adoc[]
* xref:ides-in-workspaces.adoc[]
** xref:defining-a-common-ide.adoc[]
** xref:microsoft-visual-studio-code-open-source-ide.adoc[]
* xref:using-credentials-and-configurations-in-workspaces.adoc[]
** xref:mounting-secrets.adoc[]
*** xref:creating-image-pull-secrets.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ To customize workspace components:

* xref:starting-a-new-workspace-with-a-clone-of-a-git-repository.adoc[Choose a Git repository for your workspace].

* xref:devfile-introduction.adoc[Use a devfile]
* xref:devfile-introduction.adoc[Use a devfile].

* xref:selecting-a-workspace-ide.adoc[Select and customize your in-browser IDE].
* xref:ides-in-workspaces.adoc[Configure an IDE].

* Add {prod-short} specific attributes in addition to the generic devfile specification.
17 changes: 17 additions & 0 deletions modules/end-user-guide/pages/defining-a-common-ide.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:_content-type: PROCEDURE
:navtitle : Defining a common IDE
:description: Defining a common IDE
:keywords: select-IDE, che-editor, che-editor-yaml
:page-aliases: specifying-an-in-browser-ide-for-a-git-repository-by-using-che-editor.yaml.adoc, selecting-an-in-browser-ide-for-all-workspaces-that-clone-the-same-git-repository.adoc

[id="defining-a-common-ide"]
= Defining a common IDE

While the xref:url-parameter-for-the-ide.adoc[URL parameter for the IDE] enables you to start a workspace with your personal choice of the supported IDE, you might find it more convenient to define the same IDE for all workspaces for the same source code Git repository. To do so, use the `che-editor.yaml` file. This file supports even a detailed IDE configuration.

TIP: If you intend to start most or all of your organization's workspaces with the same IDE other than Microsoft Visual Studio Code - Open Source, an alternative is for the administrator of your organization's {prod-short} instance to specify another supported IDE as the default IDE at the {prod-short} instance level. This can be done with `.spec.devEnvironments.defaultEditor` in the `CheCluster` Custom Resource.
max-cx marked this conversation as resolved.
Show resolved Hide resolved

max-cx marked this conversation as resolved.
Show resolved Hide resolved
include::partial$proc_setting-up-che-editor-yaml.adoc[leveloffset=+1]

include::partial$ref_parameters-for-che-editor-yaml.adoc[leveloffset=+1]

30 changes: 30 additions & 0 deletions modules/end-user-guide/pages/ides-in-workspaces.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:_content-type: PROCEDURE
:description: IDEs in workspaces
:keywords: configuring, workspace, editor, ide, cloud ide
:navtitle: IDEs in workspaces
:page-aliases:

[id="ides-in-workspaces"]
= IDEs in workspaces

== Supported IDEs

The default IDE in a new workspace is Microsoft Visual Studio Code - Open Source. Alternatively, you can choose another supported IDE:

.Supported IDEs

[cols="1,1a,1a"]
|===
| IDE | `id` | Note

include::example$snip_{project-context}-table-of-supported-editors.adoc[]

|===

== Repository-level IDE configuration in {prod-short}

You can store IDE configuration files directly in the remote Git repository that contains your project source code. This way, one common IDE configuration is applied to all new workspaces that feature a clone of that repository. Such IDE configuration files might include the following:

* xref:defining-a-common-ide.adoc[The `/.che/che-editor.yaml` file] that stores a definition of the chosen IDE.

* IDE-specific configuration files that one would typically store locally for a desktop IDE. For example, xref:microsoft-visual-studio-code-open-source-ide.adoc[the `/.vscode/extensions.json` file.]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:_content-type: CONCEPT
:description: Microsoft Visual Studio Code - Open Source IDE
:keywords: user-guide, selecting, IDE, select, selecting, editor, ide, vs-code, visual-studio, visual-studio-code, jetbrains, intellij, pycharm, theia, che-theia
:navtitle: Microsoft Visual Studio Code - Open Source
:page-aliases:

[id="microsoft-visual-studio-code-open-source-ide"]
= Microsoft Visual Studio Code - Open Source IDE

The {prod-short} build of link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] is the default IDE of a new workspace.

You can have extensions automatically installed in this IDE for workspaces, as explained in the next section, from the xref:administration-guide:extensions-for-microsoft-visual-studio-code-open-source.adoc[Open VSX registry].
Copy link

Choose a reason for hiding this comment

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

Do not refer to 'next', 'previous', etc. parts of the docs. Provide a link if pertinent.

Copy link
Contributor Author

@max-cx max-cx Mar 13, 2023

Choose a reason for hiding this comment

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

Responding to the above and #2552 (comment):

I can't provide a link to a procedure module AFAIK. This is a toolchain limitation AFAIK.
If you know how to do so, please tell me. If not, then I'll welcome an alternative suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only thing I can do here is spell out the other section's heading. So I'm not sure what's worse, spelling out a section heading without a URL or saying that it's the next section.

Copy link

Choose a reason for hiding this comment

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

xref:#adding-vs-code-extensions[]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me try.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd get rid of the self-referential bit: "as explained in the next section"

Copy link
Contributor Author

@max-cx max-cx Mar 10, 2023

Choose a reason for hiding this comment

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

:) I actually don't think that this is self-referential. It's referring to another section. Ideally, I would have named and linked the other section (as we cross-reference other sections elsewhere in the docs), but I don't think it's technically possible here. Moreover, it's just the next section, so this also makes it clear to the reader to just keep reading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Modules should be self-contained, however. If the page layout changes and we move things around, the next section you're referring to might be in a different place.

Copy link

Choose a reason for hiding this comment

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

@deerskindoll is right. Referring to previous, next etc. is not a good idea. Do not assume that the docs are read/used in a sequential manner. Either remove the reference, or use a link.


TIP: You can use link:https://code.visualstudio.com/Docs/editor/tasks[Tasks] to find and run the commands specified in `devfile.yaml`.

[TIP]
====

You can use *{prod2}* commands by clicking *{prod2}* in the link:https://code.visualstudio.com/api/ux-guidelines/status-bar[Status Bar] or finding them through the link:https://code.visualstudio.com/api/ux-guidelines/command-palette[Command Palette]:
max-cx marked this conversation as resolved.
Show resolved Hide resolved

* *{prod2}: Open Dashboard*
* *{prod2}: Stop Workspace*
* *{prod2}: Restart Workspace*
max-cx marked this conversation as resolved.
Show resolved Hide resolved
RomanNikitenko marked this conversation as resolved.
Show resolved Hide resolved
* *{prod2}: Restart Workspace from Local Devfile*
* *{prod2}: Open Documentation*

====

NOTE: You might see your organization's branding in this IDE if your organization customized it through a branded build.
max-cx marked this conversation as resolved.
Show resolved Hide resolved
max-cx marked this conversation as resolved.
Show resolved Hide resolved
max-cx marked this conversation as resolved.
Show resolved Hide resolved

include::partial$proc_adding-vs-code-extensions.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
When you start a new workspace, {prod-short} configures the workspace according to the instructions in the devfile. When you use a URL to start a new workspace, you can append optional parameters to the URL that further configure the workspace. You can use these parameters to specify a workspace IDE, start duplicate workspaces, and specify a devfile file name or path.

* xref:url-parameter-concatenation.adoc[]
* xref:url-parameter-for-the-workspace-ide.adoc[]
* xref:url-parameter-for-the-ide.adoc[]
* xref:url-parameter-for-starting-duplicate-workspaces.adoc[]
* xref:url-parameter-for-the-devfile-file-name.adoc[]
* xref:url-parameter-for-the-devfile-file-path.adoc[]
Expand Down
27 changes: 0 additions & 27 deletions modules/end-user-guide/pages/selecting-a-workspace-ide.adoc

This file was deleted.

This file was deleted.

This file was deleted.

50 changes: 50 additions & 0 deletions modules/end-user-guide/pages/url-parameter-for-the-ide.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
:_content-type: CONCEPT
:description: URL parameter for the IDE
:keywords: ide, editor, workspace-ide, workspace-editor
:navtitle: URL parameter for the IDE
:page-aliases: url-parameter-for-the-in-browser-ide.adoc

[id="url-parameter-for-the-ide"]
= URL parameter for the IDE

You can use the `che-editor=` URL parameter to specify a supported IDE when starting a workspace.

TIP: Use the `che-editor=` parameter when you cannot add or edit a xref:defining-a-common-ide.adoc[`/.che/che-editor.yaml`] file in the source-code Git repository to be cloned for workspaces.

NOTE: The `che-editor=` parameter overrides the xref:defining-a-common-ide.adoc[`/.che/che-editor.yaml`] file.

This parameter accepts two types of values:

* `che-editor=__<editor_key>__`
+
[source,subs="+quotes,+attributes,+macros"]
----
pass:c,a,q[{prod-url}]#__<git_repository_url>__?che-editor=__<editor_key>__
----
+

.The URL parameter `__<editor_key>__` values for supported IDEs
[cols="1,1a,1a"]
|===
| IDE | `__<editor_key>__` value | Note

include::example$snip_{project-context}-table-of-supported-editors.adoc[]

|===

* `che-editor=__<url_to_a_file>__`
+
[source,subs="+quotes,+attributes,+macros"]
----
pass:c,a,q[{prod-url}]#__<git_repository_url>__?che-editor=__<url_to_a_file>__# <1>
----
<1> URL to a file with link:https://devfile.io/docs/2.2.0/what-is-a-devfile[devfile content].
+
[TIP]
====

* The URL must point to the raw file content.

* To use this parameter with a xref:defining-a-common-ide.adoc[`che-editor.yaml`] file, copy the file with another name or path, and remove the line with `inline` from the file.
max-cx marked this conversation as resolved.
Show resolved Hide resolved

====

This file was deleted.

Loading