-
Notifications
You must be signed in to change notification settings - Fork 302
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
Communication
: Remove Metis module from the codebase
#10195
base: develop
Are you sure you want to change the base?
Conversation
Communication
: Remove Metis module from the code
WalkthroughThe pull request involves the removal of the Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
✨ Finishing Touches
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
Communication
: Remove Metis module from the codeCommunication
: Remove Metis module from the codebase
There was a problem hiding this 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
🧹 Nitpick comments (2)
src/main/webapp/app/overview/course-overview.component.ts (2)
Line range hint
1-1000
: Consider splitting this component for better maintainability.The component has grown quite large and handles multiple responsibilities. Consider the following architectural improvements:
- Extract the sidebar logic into a separate component
- Move course actions to a dedicated service
- Simplify course loading logic using async pipe
- Consider using facade pattern to reduce the number of injected dependencies
This will improve maintainability, testability, and make the code more modular.
Line range hint
1-1000
: Optimize performance with RxJS operators.Consider the following performance improvements:
- Debounce the window resize event listener to prevent excessive calculations:
+ private readonly RESIZE_DEBOUNCE_TIME = 150; + @HostListener('window:resize') onResize() { + this.resizeSubject.next(); } + + private resizeSubject = new Subject<void>(); + + ngOnInit() { + this.resizeSubject.pipe( + debounceTime(this.RESIZE_DEBOUNCE_TIME), + takeUntil(this.ngUnsubscribe) + ).subscribe(() => { + if (this.itemsDrop) { + this.updateVisibleNavbarItems(window.innerHeight); + if (!this.anyItemHidden) this.itemsDrop.close(); + } + });
- Simplify subscription cleanup by consistently using the takeUntil operator with ngUnsubscribe Subject.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/webapp/app/overview/course-overview.component.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/overview/course-overview.component.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: server-tests
- GitHub Check: Build and Push Docker Image
- GitHub Check: Analyse
- GitHub Check: Build .war artifact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/test/javascript/spec/component/overview/discussion-section/discussion-section.component.spec.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/test/javascript/spec/component/overview/discussion-section/discussion-section.component.spec.ts (1)
Pattern src/test/javascript/spec/**/*.ts
: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: client-tests-selected
- GitHub Check: server-tests
- GitHub Check: Build and Push Docker Image
- GitHub Check: client-tests
- GitHub Check: Build .war artifact
- GitHub Check: Analyse
...t/javascript/spec/component/overview/discussion-section/discussion-section.component.spec.ts
Show resolved
Hide resolved
...t/javascript/spec/component/overview/discussion-section/discussion-section.component.spec.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS2. Everything works as expected
Checklist
General
Client
Motivation and Context
We updated to Angular 19 and migrated everything to standalone, but still have leftover old code with modules
Description
This PR removes the Metis module out of the communication code
Steps for Testing
Prerequisites:
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
Manual Tests
-->
Screenshots
Summary by CodeRabbit
Module Changes
MetisModule
from multiple modules and test configurations.LinkPreviewModule
in theCourseOverviewComponent
.Component Updates
PostingThreadComponent
andMessageInlineInputComponent
to the discussion section.Test Configuration
MetisModule
references.LinkPreviewService
andLinkifyService
in test configurations.