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: Migrate the online code editor to a standalone component #9505

Merged
merged 40 commits into from
Oct 24, 2024

Conversation

pzdr7
Copy link
Contributor

@pzdr7 pzdr7 commented Oct 16, 2024

Checklist

General

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 (e.g. using paging).
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).

Motivation and Context

Modernize the component to better follow the client coding guidelines.

Description

  • Migrated the CodeEditorMonacoComponent and CodeEditorHeaderComponents to standalone
  • Added OnPush change detection and signals

Steps for Testing

Prerequisites:

  • 1 Student
  • 1 Instructor
  • 1 Programming exercise with the online code editor enabled. Set a due date and enable manual assessment.

Participation:

  1. Log in as the student.
  2. Navigate to the programming exercise and open the online code editor.
  3. Ensure the online code editor still works by:
  • Editing different files
  • Creating files
  • Deleting files
  • Renaming files
  • and submitting your solution. After submitting, refresh the page and check that your changes were submitted.

(Known issue: resizing the editor may be a bit slow. this is generally a bug in the code editor grid and not related to this PR)

Assessment:

  1. Log in as the instructor. Navigate to Course management > Your course > Exercises.
  2. If it hasn't already passed, set the due date of the programming exercise to now via the Edit view.
  3. Go to the "Scores" view of the exercise and start the assessment of the submission.
  4. Assess the submission by:
  • Navigating through different files
  • Adding feedback widgets in the editor, assigning different scores to each one
  • Submitting your assessment.
  1. As the student, navigate to the programming exercise again and check that you can see the feedback.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Client

Class/File Line Coverage Confirmation (assert/expect)
code-editor-header.component.ts 100%
code-editor-monaco.component.ts 93.33%

Screenshots

No UI changes

Summary by CodeRabbit

  • New Features

    • Enhanced CodeEditorHeaderComponent with improved input handling and event binding.
    • Introduced CodeEditorMonacoComponent with reactive programming features for better state management.
  • Bug Fixes

    • Updated method calls and bindings in templates to ensure accurate data retrieval and rendering.
  • Documentation

    • Added a new helper file for mocking components in tests.
  • Tests

    • Refactored test cases to align with new component structures and reactive patterns.

@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) labels Oct 16, 2024
@pzdr7 pzdr7 temporarily deployed to artemis-test1.artemis.cit.tum.de October 16, 2024 23:06 — with GitHub Actions Inactive
Copy link

@zagemello zagemello left a comment

Choose a reason for hiding this comment

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

tested in TS5, all worked as described.

Copy link

@Cathy0123456789 Cathy0123456789 left a comment

Choose a reason for hiding this comment

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

Tested on TS5. Works great.

Copy link

@Feras797 Feras797 left a comment

Choose a reason for hiding this comment

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

I tested on TS5. (tl;dr: everything works as described.)

  • I was able to manipulate files, delete, edit, create new files with no problems.
  • Assessing the submission as the instructor also worked fine.
  • Finally I was able to see my result as the student.
image

@pzdr7 pzdr7 added this to the 7.6.3 milestone Oct 24, 2024
@krusche krusche merged commit 4c34fe6 into develop Oct 24, 2024
24 of 31 checks passed
@krusche krusche deleted the chore/development/standalone-online-code branch October 24, 2024 20:40
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!) ready for review tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

9 participants