debian-mirror-gitlab/doc/user/project/web_ide/index.md

133 lines
5 KiB
Markdown
Raw Normal View History

2018-05-09 12:01:36 +05:30
# Web IDE
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/4539) in [GitLab Ultimate][ee] 10.4.
2018-05-09 12:01:36 +05:30
> [Brought to GitLab Core](https://gitlab.com/gitlab-org/gitlab-ce/issues/44157) in 10.7.
2019-07-07 11:18:12 +05:30
The Web IDE editor makes it faster and easier to contribute changes to your
projects by providing an advanced editor with commit staging.
2018-05-09 12:01:36 +05:30
## Open the Web IDE
The Web IDE can be opened when viewing a file, from the repository file list,
and from merge requests.
![Open Web IDE](img/open_web_ide.png)
2018-11-08 19:23:39 +05:30
## File finder
2018-05-09 12:01:36 +05:30
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18323) in [GitLab Core][ce] 10.8.
2018-11-08 19:23:39 +05:30
The file finder allows you to quickly open files in the current branch by
searching. The file finder is launched using the keyboard shortcut `Command-p`,
`Control-p`, or `t` (when editor is not in focus). Type the filename or
file path fragments to start seeing results.
2019-07-07 11:18:12 +05:30
## Syntax highlighting
2019-02-15 15:39:39 +05:30
2019-07-07 11:18:12 +05:30
As expected from an IDE, syntax highlighting for many languages within
2019-02-15 15:39:39 +05:30
the Web IDE will make your direct editing even easier.
The Web IDE currently provides:
2019-07-07 11:18:12 +05:30
- Basic syntax colorization for a variety of programming, scripting and markup
languages such as XML, PHP, C#, C++, Markdown, Java, VB, Batch, Python, Ruby
and Objective-C.
- IntelliSense and validation support (displaying errors and warnings, providing
smart completions, formatting, and outlining) for some languages. For example:
TypeScript, JavaScript, CSS, LESS, SCSS, JSON and HTML.
2019-02-15 15:39:39 +05:30
2019-07-07 11:18:12 +05:30
Because the Web IDE is based on the [Monaco Editor](https://microsoft.github.io/monaco-editor/),
you can find a more complete list of supported languages in the
[Monaco languages](https://github.com/Microsoft/monaco-languages) repository.
2019-02-15 15:39:39 +05:30
NOTE: **Note:**
Single file editing is based on the [Ace Editor](https://ace.c9.io).
2018-11-08 19:23:39 +05:30
## Stage and commit changes
After making your changes, click the Commit button in the bottom left to
review the list of changed files. Click on each file to review the changes and
2019-07-07 11:18:12 +05:30
click the tick icon to stage the file.
2018-11-08 19:23:39 +05:30
Once you have staged some changes, you can add a commit message and commit the
2019-07-07 11:18:12 +05:30
staged changes. Unstaged changes will not be committed.
2018-05-09 12:01:36 +05:30
![Commit changes](img/commit_changes.png)
2018-11-08 19:23:39 +05:30
## Reviewing changes
2018-05-09 12:01:36 +05:30
Before you commit your changes, you can compare them with the previous commit
by switching to the review mode or selecting the file from the staged files
list.
An additional review mode is available when you open a merge request, which
shows you a preview of the merge request diff if you commit your changes.
2018-11-08 19:23:39 +05:30
## View CI job logs
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19279) in [GitLab Core][ce] 11.0.
2018-11-08 19:23:39 +05:30
The Web IDE can be used to quickly fix failing tests by opening the branch or
merge request in the Web IDE and opening the logs of the failed job. The status
of all jobs for the most recent pipeline and job traces for the current commit
can be accessed by clicking the **Pipelines** button in the top right.
The pipeline status is also shown at all times in the status bar in the bottom
left.
## Switching merge requests
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19318) in [GitLab Core][ce] 11.0.
2018-11-08 19:23:39 +05:30
Switching between your authored and assigned merge requests can be done without
2019-07-07 11:18:12 +05:30
leaving the Web IDE. Click the dropdown in the top of the sidebar to open a list
2018-11-18 11:00:15 +05:30
of merge requests. You will need to commit or discard all your changes before
2018-11-08 19:23:39 +05:30
switching to a different merge request.
2018-11-18 11:00:15 +05:30
## Switching branches
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20850) in [GitLab Core][ce] 11.2.
2018-11-18 11:00:15 +05:30
Switching between branches of the current project repository can be done without
2019-07-07 11:18:12 +05:30
leaving the Web IDE. Click the dropdown in the top of the sidebar to open a list
2018-11-18 11:00:15 +05:30
of branches. You will need to commit or discard all your changes before
switching to a different branch.
## Client Side Evaluation
2019-02-15 15:39:39 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19764) in [GitLab Core][ce] 11.2.
2018-11-18 11:00:15 +05:30
The Web IDE can be used to preview JavaScript projects right in the browser.
This feature uses CodeSandbox to compile and bundle the JavaScript used to
2018-11-20 20:47:30 +05:30
preview the web application.
2018-11-18 11:00:15 +05:30
![Web IDE Client Side Evaluation](img/clientside_evaluation.png)
2018-11-20 20:47:30 +05:30
Additionally, for public projects an `Open in CodeSandbox` button is available
to transfer the contents of the project into a public CodeSandbox project to
quickly share your project with others.
2018-11-18 11:00:15 +05:30
### Enabling Client Side Evaluation
The Client Side Evaluation feature needs to be enabled in the GitLab instances
admin settings. Client Side Evaluation is enabled for all projects on
GitLab.com
![Admin Client Side Evaluation setting](img/admin_clientside_evaluation.png)
Once it has been enabled in application settings, projects with a
`package.json` file and a `main` entry point can be previewed inside of the Web
IDE. An example `package.json` is below.
```json
{
"main": "index.js",
"dependencies": {
"vue": "latest"
}
}
```
2018-11-08 19:23:39 +05:30
[ce]: https://about.gitlab.com/pricing/
2018-05-09 12:01:36 +05:30
[ee]: https://about.gitlab.com/pricing/