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
@@ -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.