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

General: Migrate test run module to signals, inject and standalone #9914

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

coolchock
Copy link
Contributor

@coolchock coolchock commented Nov 29, 2024

Checklist

General

Client

Description

This pull request migrates test runs module to signals, inject and standalone.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Exam
  1. Log in to Artemis
  2. Navigate to Course Administration -> Select a course -> Exams -> Test Runs
  3. Click Create a Test Run
  4. Verify that modal works and it's possible to create a test run
  5. Verify that buttons and links on Test Run Management page work

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

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features

    • Enhanced dependency management in the Create Test Run and Test Run Management components using Angular's modern inject function.
    • Introduced a new observable for error handling in the Test Run Management component.
    • Added translation capabilities to the Test Run Ribbon component.
  • Bug Fixes

    • Streamlined initialization processes for components, improving overall readability and maintainability.
  • Refactor

    • Removed constructor parameters in favor of direct property assignment for injected services, reducing boilerplate code.
    • Marked components as standalone for improved modularity.
  • Chores

    • Updated module imports to reflect the removal and addition of components in the exam management and participation modules.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 29, 2024
@coolchock coolchock changed the title Chore: Migrate test run module to signals, inject and standalone General: Migrate test run module to signals, inject and standalone Nov 29, 2024
@coolchock coolchock temporarily deployed to artemis-test1.artemis.cit.tum.de November 30, 2024 17:26 — with GitHub Actions Inactive
@coolchock coolchock marked this pull request as ready for review December 2, 2024 08:56
@coolchock coolchock requested a review from a team as a code owner December 2, 2024 08:56
Copy link

coderabbitai bot commented Dec 2, 2024

Walkthrough

The pull request modifies the CreateTestRunModalComponent, TestRunManagementComponent, and TestRunRibbonComponent in the Angular application. It transitions both CreateTestRunModalComponent and TestRunManagementComponent from constructor-based dependency injection to using the inject function for service initialization. The components are marked as standalone, enhancing their modularity. Additionally, the TestRunRibbonComponent is updated to include translation capabilities. The ArtemisExamManagementModule and ArtemisParticipationSummaryModule are updated to reflect the removal and addition of components, respectively.

Changes

File Path Change Summary
src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts Removed constructor; added private activeModal and private artemisDurationFromSecondsPipe; marked as standalone; imported ReactiveFormsModule.
src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts Removed constructor parameters; added services using inject; initialized dialogErrorSource; marked as standalone; imported ArtemisTranslatePipe, FaIconComponent, and ArtemisSharedModule.
src/main/webapp/app/exam/manage/test-runs/test-run-ribbon.component.ts Added TranslateDirective; marked as standalone.
src/main/webapp/app/exam/manage/exam-management.module.ts Removed TestRunManagementComponent and CreateTestRunModalComponent from declarations.
src/main/webapp/app/exam/participate/exam-participation.module.ts Added TestRunRibbonComponent to imports.
src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts Removed TestRunRibbonComponent from declarations and exports.

Possibly related PRs

Suggested labels

tests, ready to merge, maintainer-approved

Suggested reviewers

  • JohannesStoehr
  • SimonEntholzer
  • az108
  • muradium
  • HawKhiem
  • BBesrour

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (4)
src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts (1)

19-24: Consider implementing OnDestroy for proper cleanup

While the component looks good, it's handling exam data and form controls which should be properly cleaned up.

Consider implementing OnDestroy:

-export class CreateTestRunModalComponent implements OnInit {
+export class CreateTestRunModalComponent implements OnInit, OnDestroy {
+    private destroy$ = new Subject<void>();
+
+    ngOnDestroy(): void {
+        this.destroy$.next();
+        this.destroy$.complete();
+    }
src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (3)

Line range hint 38-39: Implement proper cleanup for dialogErrorSource Subject

The dialogErrorSource Subject needs proper cleanup to prevent memory leaks.

Add cleanup in ngOnDestroy:

+    private destroy$ = new Subject<void>();
     private dialogErrorSource = new Subject<string>();
     dialogError$ = this.dialogErrorSource.asObservable();

+    ngOnDestroy(): void {
+        this.dialogErrorSource.complete();
+        this.destroy$.next();
+        this.destroy$.complete();
+    }

Line range hint 51-67: Use destroy$ Subject to manage subscription cleanup

The HTTP subscriptions in ngOnInit should be properly managed to prevent memory leaks.

Implement proper subscription management:

     ngOnInit(): void {
-        this.examManagementService.find(/*...*/).subscribe({
+        this.examManagementService.find(/*...*/)
+            .pipe(takeUntil(this.destroy$))
+            .subscribe({
             next: (response: HttpResponse<Exam>) => {
                 this.exam = response.body!;
                 this.isExamStarted = this.exam.started!;
                 this.course = this.exam.course!;
                 this.course.isAtLeastInstructor = this.accountService.isAtLeastInstructorInCourse(this.course);
-                this.examManagementService.findAllTestRunsForExam(/*...*/).subscribe({
+                this.examManagementService.findAllTestRunsForExam(/*...*/)
+                    .pipe(takeUntil(this.destroy$))
+                    .subscribe({
                     next: (res: HttpResponse<StudentExam[]>) => {
                         this.testRuns = res.body!;
                     },

Line range hint 89-93: Consider using async pipe for dialogError$

Since you're using an Observable for dialog errors, consider leveraging the async pipe in the template for automatic subscription management.

Update the template to use async pipe:

<div *ngIf="dialogError$ | async as error" class="alert alert-danger">
    {{ error }}
</div>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2611d04 and c255253.

📒 Files selected for processing (2)
  • src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts (2 hunks)
  • src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

🔇 Additional comments (2)
src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts (1)

1-1: LGTM: Clean migration to inject() pattern

The migration from constructor injection to the new inject() pattern is well implemented. This change:

  • Reduces boilerplate code
  • Follows modern Angular practices
  • Maintains proper encapsulation with private members

Also applies to: 17-18

src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (1)

23-28: LGTM: Clean service injection implementation

The migration to inject() for all services is well implemented and follows a consistent pattern.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 2, 2024
HawKhiem
HawKhiem previously approved these changes Dec 2, 2024
Copy link

@HawKhiem HawKhiem 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 TS3. Test Run works as described

Screenshot 2024-12-03 001900
Screenshot 2024-12-03 001921
Screenshot 2024-12-03 001944

Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

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

injection change lgtm, but you still need to migrate to standalone and use signals

Comment on lines 30 to 32
course: Course;
exam: Exam;
isLoading: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use signals for the variables here?

sawys777
sawys777 previously approved these changes Dec 6, 2024
Copy link

@sawys777 sawys777 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 TS1, the Test Run feature works as expected and the buttons and links are also correctly being displayed and functioning as well.

kevinfischer4
kevinfischer4 previously approved these changes Dec 9, 2024
Copy link

@kevinfischer4 kevinfischer4 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 TS1. Everything works as it should. Conducting/creating a test run works and all buttons are displayed correctly.

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.

@coolchock coolchock requested a review from a team as a code owner December 21, 2024 01:30
@github-actions github-actions bot added the tests label Dec 21, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (1)

Line range hint 54-71: Improve subscription management in ngOnInit

The nested subscriptions could lead to memory leaks. Consider using RxJS operators to flatten the observable chain.

 ngOnInit(): void {
-    this.examManagementService.find(Number(this.route.snapshot.paramMap.get('courseId')), Number(this.route.snapshot.paramMap.get('examId')), false, true).subscribe({
-        next: (response: HttpResponse<Exam>) => {
-            this.exam = response.body!;
-            this.isExamStarted = this.exam.started!;
-            this.course = this.exam.course!;
-            this.course.isAtLeastInstructor = this.accountService.isAtLeastInstructorInCourse(this.course);
-            this.examManagementService.findAllTestRunsForExam(this.course.id!, this.exam.id!).subscribe({
-                next: (res: HttpResponse<StudentExam[]>) => {
-                    this.testRuns = res.body!;
-                },
-                error: (error: HttpErrorResponse) => onError(this.alertService, error),
-            });
-        },
-        error: (error: HttpErrorResponse) => onError(this.alertService, error),
-    });
+    this.examManagementService
+        .find(Number(this.route.snapshot.paramMap.get('courseId')), Number(this.route.snapshot.paramMap.get('examId')), false, true)
+        .pipe(
+            tap((response: HttpResponse<Exam>) => {
+                this.exam.set(response.body!);
+                this.isExamStarted.set(response.body!.started!);
+                this.course.set(response.body!.course!);
+                this.course().isAtLeastInstructor = this.accountService.isAtLeastInstructorInCourse(this.course()!);
+            }),
+            switchMap((response: HttpResponse<Exam>) => 
+                this.examManagementService.findAllTestRunsForExam(response.body!.course!.id!, response.body!.id!)
+            ),
+            catchError((error) => {
+                onError(this.alertService, error);
+                return EMPTY;
+            })
+        )
+        .subscribe({
+            next: (res: HttpResponse<StudentExam[]>) => {
+                this.testRuns.set(res.body!);
+            },
+            error: (error: HttpErrorResponse) => onError(this.alertService, error),
+        });
🧹 Nitpick comments (2)
src/main/webapp/app/exam/manage/test-runs/test-run-ribbon.component.ts (1)

Line range hint 1-16: LGTM! Clean standalone component migration

The migration to a standalone component is well-implemented with proper translation support. The component follows Angular style guidelines and effectively reuses shared styles.

Consider adding a component description using JSDoc to improve documentation:

/**
 * Displays a ribbon indicating that the current context is a test run.
 * Used in exam management to visually distinguish test runs from actual exams.
 */
@Component({
src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (1)

Line range hint 82-102: Improve error handling in modal interaction

The error handling in the modal interaction could be more consistent with the rest of the application.

 openCreateTestRunModal() {
     const modalRef: NgbModalRef = this.modalService.open(CreateTestRunModalComponent as Component, { size: 'lg', backdrop: 'static' });
     modalRef.componentInstance.exam = this.exam;
     modalRef.result
         .then((testRunConfiguration: StudentExam) => {
-            this.examManagementService.createTestRun(this.course.id!, this.exam.id!, testRunConfiguration).subscribe({
-                next: (response: HttpResponse<StudentExam>) => {
-                    if (response.body != undefined) {
-                        this.testRuns.push(response.body!);
-                    }
-                },
-                error: (error: HttpErrorResponse) => {
-                    onError(this.alertService, error);
-                },
-            });
+            this.examManagementService
+                .createTestRun(this.course().id!, this.exam().id!, testRunConfiguration)
+                .pipe(
+                    catchError((error) => {
+                        onError(this.alertService, error);
+                        return EMPTY;
+                    })
+                )
+                .subscribe((response: HttpResponse<StudentExam>) => {
+                    if (response.body) {
+                        this.testRuns.update(runs => [...runs, response.body!]);
+                    }
+                });
         })
         .catch(() => {});
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c255253 and 1b785d9.

📒 Files selected for processing (6)
  • src/main/webapp/app/exam/manage/exam-management.module.ts (0 hunks)
  • src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts (1 hunks)
  • src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (3 hunks)
  • src/main/webapp/app/exam/manage/test-runs/test-run-ribbon.component.ts (2 hunks)
  • src/main/webapp/app/exam/participate/exam-participation.module.ts (2 hunks)
  • src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • src/main/webapp/app/exam/manage/exam-management.module.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/app/exam/manage/test-runs/create-test-run-modal.component.ts
🧰 Additional context used
📓 Path-based instructions (4)
src/main/webapp/app/exam/participate/exam-participation.module.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/main/webapp/app/exam/participate/summary/exam-result-summary.module.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/main/webapp/app/exam/manage/test-runs/test-run-ribbon.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

🔇 Additional comments (4)
src/main/webapp/app/exam/participate/exam-participation.module.ts (1)

35-36: LGTM! Proper integration of standalone component

The TestRunRibbonComponent is correctly imported and added to the module's imports array, following Angular's standalone component integration pattern.

Let's verify that the component is actually used in this module's context:

Also applies to: 69-69

✅ Verification successful

Component integration verified successfully

The TestRunRibbonComponent is properly imported and actively used in the exam-participation.component.html template with the correct selector jhi-test-run-ribbon. The component is conditionally rendered when testRunId is present, which aligns with its intended usage pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for TestRunRibbonComponent selector usage
rg -l "jhi-test-run-ribbon" "src/main/webapp/app/exam/participate/"

Length of output: 136


Script:

#!/bin/bash
# Check the actual usage of the selector in the HTML file
rg "jhi-test-run-ribbon" "src/main/webapp/app/exam/participate/exam-participation.component.html" -C 2

Length of output: 182

src/main/webapp/app/exam/manage/test-runs/test-run-management.component.ts (3)

Line range hint 1-26: LGTM! Good transition to standalone component

The component has been properly configured as standalone with appropriate imports and dependencies.


28-34: LGTM! Clean dependency injection implementation

Good use of the new inject() function pattern for dependency injection.


Line range hint 35-49: Consider using signals for reactive state management

Properties that represent component state could benefit from using Angular signals for better reactivity and performance. This aligns with the previous review comment and modern Angular practices.

Consider refactoring the state properties to use signals:

- course: Course;
- exam: Exam;
- isLoading: boolean;
- isExamStarted: boolean;
- testRuns: StudentExam[] = [];
- instructor?: User;
+ course = signal<Course | undefined>(undefined);
+ exam = signal<Exam | undefined>(undefined);
+ isLoading = signal<boolean>(false);
+ isExamStarted = signal<boolean>(false);
+ testRuns = signal<StudentExam[]>([]);
+ instructor = signal<User | undefined>(undefined);

This would provide better reactivity and change detection optimization.

ExampleSolutionComponent,
CollapsibleCardComponent,
],
exports: [ExamResultSummaryComponent, ExamGeneralInformationComponent, TestRunRibbonComponent],
exports: [ExamResultSummaryComponent, ExamGeneralInformationComponent],
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Component removal requires updates in exam-participation module

The removal of TestRunRibbonComponent from exam-result-summary.module.ts is incomplete. The component is still being used in:

  • exam-participation.component.html: Uses the component selector <jhi-test-run-ribbon>
  • exam-participation.module.ts: Still imports the component from its old location

Since TestRunRibbonComponent is now standalone, these files need to be updated to:

  1. Import the standalone component directly in exam-participation.module.ts
  2. Update the template usage if the selector has changed with the standalone migration
🔗 Analysis chain

LGTM! Clean removal of component from module

The removal of TestRunRibbonComponent from declarations and exports is correct as part of the standalone migration.

Let's verify there are no remaining references to this component in the summary module's context:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to TestRunRibbonComponent in summary context
rg -l "TestRunRibbonComponent|jhi-test-run-ribbon" "src/main/webapp/app/exam/participate/summary/"

# Search for potential imports that might need updating
rg -l "from.*test-run-ribbon" "src/main/webapp/app/exam/participate/summary/"

Length of output: 176


Script:

#!/bin/bash
# Let's broaden the search to check for any references in the entire webapp directory
rg -l "TestRunRibbonComponent|jhi-test-run-ribbon" "src/main/webapp/"

# Also check for any template usage with the component selector
rg "<jhi-test-run-ribbon" "src/main/webapp/"

# Check for any remaining imports
rg "import.*TestRunRibbonComponent" "src/main/webapp/"

Length of output: 655

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!) small stale tests
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

5 participants