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 git diff report module to standalone components #9443

Merged
merged 41 commits into from
Oct 12, 2024

Conversation

pzdr7
Copy link
Contributor

@pzdr7 pzdr7 commented Oct 8, 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 strictly followed the client coding and design 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

The new client coding guidelines specify that we should use signals/standalone components.

Description

  • Migrated all components in the GitDiffReportModule to standalone components
  • Introduced signals, effects, and the OnPush change detection in those components
  • Simplified the layout handling of the diff editor to make it less error-prone

Steps for Testing

Prerequisites:

  • Test Server with LocalVC (e.g. TS1-TS3)
  • 1 Instructor
  • 1 Programming Exercise
  1. Navigate to Course management > Your course > Exercises and click the title of your programming exercise.
  2. Scroll down to "Review changes" and check that the modal opens as expected.
  3. Close the modal.
  4. Navigate to the repository view of any repository (e.g. for the template repository. Click the "Code" button and
    image to open the repository view).
  5. Click "Open commit history" and then on a commit hash
  6. Verify that the commit diff is displayed correctly

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

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Client

Class/File Line Coverage Confirmation (assert/expect)
programming-diff-report-detail.component.ts 100%
programming-exercise-exam-diff.component.ts 97.26%
git-diff-file-panel-title.component.ts 100%
git-diff-file-panel.component.ts 100%
git-diff-file.component.ts 100%
git-diff-line-stat.component.ts 100%
git-diff-report-modal.component.ts 100%
git-diff-report.component.ts 98.66%
monaco-diff-editor.component.ts 98%
monaco-editor.service.ts 100%

Screenshots

No UI changes

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new GitDiffLineStatComponent for enhanced line statistics.
    • Added GitDiffReportComponent for improved reporting on Git diffs.
  • Improvements

    • Transitioned several components to utilize Angular's reactive signals for better state management.
    • Updated various components to use method calls for property access, enhancing dynamic behavior.
    • Enhanced the Monaco Diff Editor with new styling and automatic layout configuration.
  • Bug Fixes

    • Adjusted modal behavior and test cases for better reliability.
  • Chores

    • Removed deprecated modules and updated styles for the Monaco Diff Editor.

@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) labels Oct 8, 2024
@krusche krusche merged commit 87d73ec into develop Oct 12, 2024
26 of 39 checks passed
@krusche krusche deleted the chore/development/migrate-diff branch October 12, 2024 17:10
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!) deployment-error Added by deployment workflows if an error occured ready for review tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants