Commit 2b5947ce authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'fix-WebIDE-doc-Vale-issues' into 'master'

Fixed Vale linting standard issues #235010

Closes #235010

See merge request gitlab-org/gitlab!42658
parents 79c1f7df 1400a20a
...@@ -32,7 +32,7 @@ file path fragments to start seeing results. ...@@ -32,7 +32,7 @@ file path fragments to start seeing results.
## Syntax highlighting ## Syntax highlighting
As expected from an IDE, syntax highlighting for many languages within As expected from an IDE, syntax highlighting for many languages within
the Web IDE will make your direct editing even easier. the Web IDE makes your direct editing even easier.
The Web IDE currently provides: The Web IDE currently provides:
...@@ -143,7 +143,7 @@ The Web IDE supports configuration of certain editor settings by using ...@@ -143,7 +143,7 @@ The Web IDE supports configuration of certain editor settings by using
[`.editorconfig` files](https://editorconfig.org/). When opening a file, the [`.editorconfig` files](https://editorconfig.org/). When opening a file, the
Web IDE looks for a file named `.editorconfig` in the current directory Web IDE looks for a file named `.editorconfig` in the current directory
and all parent directories. If a configuration file is found and has settings and all parent directories. If a configuration file is found and has settings
that match the file's path, these settings will be enforced on the opened file. that match the file's path, these settings are enforced on the opened file.
The Web IDE currently supports the following `.editorconfig` settings: The Web IDE currently supports the following `.editorconfig` settings:
...@@ -166,7 +166,7 @@ review the list of changed files. ...@@ -166,7 +166,7 @@ review the list of changed files.
Once you have finalized your changes, you can add a commit message, commit the Once you have finalized your changes, you can add a commit message, commit the
changes and directly create a merge request. In case you don't have write changes and directly create a merge request. In case you don't have write
access to the selected branch, you will see a warning, but still be able to create access to the selected branch, you see a warning, but can still create
a new branch and start a merge request. a new branch and start a merge request.
To discard a change in a particular file, click the **Discard changes** button on that To discard a change in a particular file, click the **Discard changes** button on that
...@@ -201,8 +201,7 @@ left. ...@@ -201,8 +201,7 @@ left.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19318) in [GitLab Core](https://about.gitlab.com/pricing/) 11.0. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19318) in [GitLab Core](https://about.gitlab.com/pricing/) 11.0.
To switch between your authored and assigned merge requests, click the To switch between your authored and assigned merge requests, click the
dropdown in the top of the sidebar to open a list of merge requests. You will dropdown in the top of the sidebar to open a list of merge requests. You need to commit or discard all your changes before switching to a different merge
need to commit or discard all your changes before switching to a different merge
request. request.
## Switching branches ## Switching branches
...@@ -211,7 +210,7 @@ request. ...@@ -211,7 +210,7 @@ request.
To switch between branches of the current project repository, click the dropdown To switch between branches of the current project repository, click the dropdown
in the top of the sidebar to open a list of branches. in the top of the sidebar to open a list of branches.
You will need to commit or discard all your changes before switching to a You need to commit or discard all your changes before switching to a
different branch. different branch.
## Markdown editing ## Markdown editing
...@@ -226,7 +225,7 @@ supports [GitLab Flavored Markdown](../../markdown.md#gitlab-flavored-markdown-g ...@@ -226,7 +225,7 @@ supports [GitLab Flavored Markdown](../../markdown.md#gitlab-flavored-markdown-g
You can also upload any local images by pasting them directly in the Markdown file. You can also upload any local images by pasting them directly in the Markdown file.
The image is uploaded to the same directory and is named `image.png` by default. The image is uploaded to the same directory and is named `image.png` by default.
If another file already exists with the same name, a numeric suffix is automatically If another file already exists with the same name, a numeric suffix is automatically
added to the file name. added to the filename.
## Live Preview ## Live Preview
...@@ -249,7 +248,7 @@ The Live Preview feature needs to be enabled in the GitLab instances ...@@ -249,7 +248,7 @@ The Live Preview feature needs to be enabled in the GitLab instances
admin settings. Live Preview is enabled for all projects on admin settings. Live Preview is enabled for all projects on
GitLab.com GitLab.com
![Admin Live Preview setting](img/admin_live_preview_v13_0.png) ![Administrator Live Preview setting](img/admin_live_preview_v13_0.png)
Once you have done that, you can preview projects with a `package.json` file and Once you have done that, you can preview projects with a `package.json` file and
a `main` entry point inside the Web IDE. An example `package.json` is shown a `main` entry point inside the Web IDE. An example `package.json` is shown
...@@ -292,7 +291,7 @@ to work: ...@@ -292,7 +291,7 @@ to work:
[enabled](../../../administration/integration/terminal.md#enabling-and-disabling-terminal-support). **(ULTIMATE ONLY)** [enabled](../../../administration/integration/terminal.md#enabling-and-disabling-terminal-support). **(ULTIMATE ONLY)**
If you have the terminal open and the job has finished with its tasks, the If you have the terminal open and the job has finished with its tasks, the
terminal will block the job from finishing for the duration configured in terminal blocks the job from finishing for the duration configured in
[`[session_server].session_timeout`](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section) [`[session_server].session_timeout`](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section)
until you close the terminal window. until you close the terminal window.
...@@ -308,15 +307,15 @@ In order to enable the Web IDE terminals you need to create the file ...@@ -308,15 +307,15 @@ In order to enable the Web IDE terminals you need to create the file
file is fairly similar to the [CI configuration file](../../../ci/yaml/README.md) file is fairly similar to the [CI configuration file](../../../ci/yaml/README.md)
syntax but with some restrictions: syntax but with some restrictions:
- No global blocks can be defined (ie: `before_script` or `after_script`) - No global blocks can be defined (i.e., `before_script` or `after_script`)
- Only one job named `terminal` can be added to this file. - Only one job named `terminal` can be added to this file.
- Only the keywords `image`, `services`, `tags`, `before_script`, `script`, and - Only the keywords `image`, `services`, `tags`, `before_script`, `script`, and
`variables` are allowed to be used to configure the job. `variables` are allowed to be used to configure the job.
- To connect to the interactive terminal, the `terminal` job must be still alive - To connect to the interactive terminal, the `terminal` job must be still alive
and running, otherwise the terminal won't be able to connect to the job's session. and running, otherwise the terminal cannot connect to the job's session.
By default the `script` keyword has the value `sleep 60` to prevent By default the `script` keyword has the value `sleep 60` to prevent
the job from ending and giving the Web IDE enough time to connect. This means the job from ending and giving the Web IDE enough time to connect. This means
that, if you override the default `script` value, you'll have to add a command that, if you override the default `script` value, you have to add a command
which would keep the job running, like `sleep`. which would keep the job running, like `sleep`.
In the code below there is an example of this configuration file: In the code below there is an example of this configuration file:
...@@ -333,40 +332,39 @@ terminal: ...@@ -333,40 +332,39 @@ terminal:
NODE_ENV: "test" NODE_ENV: "test"
``` ```
Once the terminal has started, the console will be displayed and we could access Once the terminal has started, the console is displayed and we could access
the project repository files. the project repository files.
**Important**. The terminal job is branch dependent. This means that the **Important**. The terminal job is branch dependent. This means that the
configuration file used to trigger and configure the terminal will be the one in configuration file used to trigger and configure the terminal is the one in
the selected branch of the Web IDE. the selected branch of the Web IDE.
If there is no configuration file in a branch, an error message will be shown. If there is no configuration file in a branch, an error message is shown.
### Running interactive terminals in the Web IDE ### Running interactive terminals in the Web IDE
If Interactive Terminals are available for the current user, the **Terminal** button If Interactive Terminals are available for the current user, the **Terminal** button is visible in the right sidebar of the Web IDE. Click this button to open
will be visible in the right sidebar of the Web IDE. Click this button to open
or close the terminal tab. or close the terminal tab.
Once open, the tab will show the **Start Web Terminal** button. This button may Once open, the tab shows the **Start Web Terminal** button. This button may
be disabled if the environment is not configured correctly. If so, a status be disabled if the environment is not configured correctly. If so, a status
message will describe the issue. Here are some reasons why **Start Web Terminal** message describes the issue. Here are some reasons why **Start Web Terminal**
may be disabled: may be disabled:
- `.gitlab/.gitlab-webide.yml` does not exist or is set up incorrectly. - `.gitlab/.gitlab-webide.yml` does not exist or is set up incorrectly.
- No active private runners are available for the project. - No active private runners are available for the project.
If active, clicking the **Start Web Terminal** button will load the terminal view If active, clicking the **Start Web Terminal** button loads the terminal view
and start connecting to the runner's terminal. At any time, the **Terminal** tab and start connecting to the runner's terminal. At any time, the **Terminal** tab
can be closed and reopened and the state of the terminal will not be affected. can be closed and reopened and the state of the terminal is not affected.
When the terminal is started and is successfully connected to the runner, then the When the terminal is started and is successfully connected to the runner, then the
runner's shell prompt will appear in the terminal. From here, you can enter runner's shell prompt appears in the terminal. From here, you can enter
commands that will be executed within the runner's environment. This is similar commands executed within the runner's environment. This is similar
to running commands in a local terminal or through SSH. to running commands in a local terminal or through SSH.
While the terminal is running, it can be stopped by clicking **Stop Terminal**. While the terminal is running, it can be stopped by clicking **Stop Terminal**.
This will disconnect the terminal and stop the runner's terminal job. From here, This disconnects the terminal and stops the runner's terminal job. From here,
click **Restart Terminal** to start a new terminal session. click **Restart Terminal** to start a new terminal session.
### File syncing to web terminal ### File syncing to web terminal
...@@ -408,14 +406,14 @@ terminal: ...@@ -408,14 +406,14 @@ terminal:
more information. more information.
- `$CI_PROJECT_DIR` is a - `$CI_PROJECT_DIR` is a
[predefined environment variable](../../../ci/variables/predefined_variables.md) [predefined environment variable](../../../ci/variables/predefined_variables.md)
for GitLab Runner. This is where your project's repository will be. for GitLab Runners. This is where your project's repository resides.
Once you have configured the web terminal for file syncing, then when the web Once you have configured the web terminal for file syncing, then when the web
terminal is started, a **Terminal** status will be visible in the status bar. terminal is started, a **Terminal** status is visible in the status bar.
![Web IDE Client Side Evaluation](img/terminal_status.png) ![Web IDE Client Side Evaluation](img/terminal_status.png)
Changes made to your files via the Web IDE will sync to the running terminal Changes made to your files via the Web IDE sync to the running terminal
when: when:
- <kbd>Ctrl</kbd> + <kbd>S</kbd> (or <kbd>Cmd</kbd> + <kbd>S</kbd> on Mac) - <kbd>Ctrl</kbd> + <kbd>S</kbd> (or <kbd>Cmd</kbd> + <kbd>S</kbd> on Mac)
...@@ -425,7 +423,7 @@ when: ...@@ -425,7 +423,7 @@ when:
### Limitations ### Limitations
Interactive Terminals is in a beta phase and will continue to be improved upon in upcoming Interactive Terminals is in a beta phase and continues to be improved in upcoming
releases. In the meantime, please note that the user is limited to having only one releases. In the meantime, please note that the user is limited to having only one
active terminal at a time. active terminal at a time.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment