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

Development: Web IDE integration #6706

Closed
wants to merge 17 commits into from
Closed

Development: Web IDE integration #6706

wants to merge 17 commits into from

Conversation

daniels98it
Copy link
Contributor

@daniels98it daniels98it commented Jun 13, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I followed the coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Changes affecting Programming Exercises

  • I tested all changes and their related features with all corresponding user types on Test Server 1 (Atlassian Suite).
  • I tested all changes and their related features with all corresponding user types on Test Server 2 (Jenkins and Gitlab).

Motivation and Context

The currently used code editor was and still currently is an important functionality provided by Artemis to solve programming exercises. However, instructors and students expressed their willingness in having more features when coding with it.

Description

This pull request introduces an additional environment for solving programming exercise tasks. This new "webIDE" resembles the currently used code editor, but integrates a new set of features to it. Based on Monaco and leveraging the intellisense capabilities provided by LSP, supports the user during the coding tasks, while keeping the easy to use and familiar coding environment as in the current code editor.

In addition to the new integrated editor, the "webIDE" features a terminal like interface, providing the user with a sandboxed environment to test or run its code using custom commands. While being a more advanced way to run code, a sandboxed environment provides the user with a more flexible way to interact with the produced code, without relying on the predefined CI pipelines.

Currently supported programming languages:

  • Java (Maven/Gradle) ☕
  • Python 🐍
  • C / FACT 💻

Currently supported LSP features:

  • Syntax Highlighting
  • Syntax Error Highlighting
  • Autocompletion / Suggestions
  • Documentation on hover
  • Code lenses

IMPORTANT

  • Currently a Webpack plugin is used to load the Monaco editor resources. With Development: Update to Angular 16 and speedup the build process #6546 custom Webpack configurations have been removed, but still needed in this PR as for the time of writing. Some changes might still be necessary to make it compatible with Vite in the future.
  • The be functional, Artemis needs to communicate to an external LSP Integration Server managing the LSP and terminal sessions and providing the webIDE with the related functionalities.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Programming Exercise with Complaints enabled
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. ...

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Exam with a Programming Exercise
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Make sure that the UI of the programming exercise in the exam mode stays unchanged. You can use the exam mode documentation as reference.
  4. ...

Review Progress

Performance Review

  • I confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Test Coverage

Screenshots

java_example.mp4
python_example.mp4

@github-actions github-actions bot added client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. server Pull requests that update Java code. (Added Automatically!) labels Jun 13, 2023
@github-actions github-actions bot added the tests label Jun 14, 2023
# Conflicts:
#	src/main/webapp/app/exercises/programming/shared/code-editor/code-editor.module.ts
#	src/main/webapp/i18n/en/global.json
@github-actions
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 24, 2023
@github-actions github-actions bot removed the stale label Jun 28, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 5, 2023
terminalInitRequest.put("projectType", programmingParticipation.getProgrammingExercise().getProjectType().name());
}

HttpResponse response = this.sendRequest(new HttpPost(url), terminalInitRequest, true, false);

Check failure

Code scanning / CodeQL

Server-side request forgery

Potential server-side request forgery due to a [user-provided value](1).
filesUpdateRequest.put("changes", fileUpdates);

try {
this.sendRequest(new HttpPut(url), filesUpdateRequest, false, true);

Check failure

Code scanning / CodeQL

Server-side request forgery

Potential server-side request forgery due to a [user-provided value](1). Potential server-side request forgery due to a [user-provided value](2).
fileRenamingRequest.put("new", fileMove.newFilename());

try {
this.sendRequest(new HttpPut(url), fileRenamingRequest, false, true);

Check failure

Code scanning / CodeQL

Server-side request forgery

Potential server-side request forgery due to a [user-provided value](1).
fileRemovalRequest.put("filename", filename);

try {
this.sendRequest(new HttpPut(url), fileRemovalRequest, false, true);

Check failure

Code scanning / CodeQL

Server-side request forgery

Potential server-side request forgery due to a [user-provided value](1).
* @return the current server's status
*/
private LspServerStatus checkLspServerHealth(LspServerStatus serverStatus) {
HttpGet request = new HttpGet(serverStatus.getUrl() + this.lspHealthEndpoint);

Check failure

Code scanning / CodeQL

Server-side request forgery

Potential server-side request forgery due to a [user-provided value](1).
@github-actions github-actions bot removed the stale label Jul 9, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 16, 2023
@github-actions github-actions bot removed the stale label Jul 18, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 26, 2023
@github-actions github-actions bot removed the stale label Aug 3, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 10, 2023
@github-actions github-actions bot closed this Nov 24, 2023
@krusche krusche deleted the feature/web-ide branch April 22, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. server Pull requests that update Java code. (Added Automatically!) stale tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants