-
Notifications
You must be signed in to change notification settings - Fork 359
Development: Migrate Angular animations to CSS animations
#11816
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
Conversation
WalkthroughRemoved Angular animation triggers/metadata from many components, replaced them with CSS keyframes/wrapper enter/leave bindings or class-based visibility, added a centralized test helper for noop animations, updated many specs to remove animation modules or use the helper, and removed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/webapp/app/app.config.ts (1)
35-79: Add animation provider to appConfig.
The configuration lacksprovideAnimations()orprovideNoopAnimations(). Angular 20.x requires one of these at runtime when Material or other animation-dependent libraries are present. Without it, Material components (dialogs, menus, tooltips, expansion panels, etc.) will fail at runtime with missing animation provider errors. AddprovideAnimations()from@angular/platform-browser/animationsto the providers array, or useprovideNoopAnimations()if animations should be disabled.
🧹 Nitpick comments (7)
src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.scss (1)
6-25: Consider namespacing the keyframes + honoringprefers-reduced-motion.
@keyframes fade-inis very generic (global scope) and can collide; also consider disabling/reducing animations for reduced-motion users.-@keyframes fade-in { +@keyframes course-notification-fade-in { from { opacity: 0; } to { opacity: 1; } } .fade-animation-delayed-enter { - animation: fade-in 200ms 400ms ease-in-out forwards; + animation: course-notification-fade-in 200ms 400ms ease-in-out forwards; opacity: 0; } .notification-wrap-animation-enter { - animation: fade-in 200ms ease-in-out forwards; + animation: course-notification-fade-in 200ms ease-in-out forwards; } + +@media (prefers-reduced-motion: reduce) { + .fade-animation-delayed-enter, + .notification-wrap-animation-enter { + animation: none; + opacity: 1; + } +}src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss (1)
2-16: Consider addingprefers-reduced-motionsupport.The CSS animation implementation is correct. However, for better accessibility, consider respecting the user's motion preferences.
Apply this pattern to disable or reduce animations when users prefer reduced motion:
.notification-animation-enter { animation: notification-scale-in 200ms ease-in-out forwards; + + @media (prefers-reduced-motion: reduce) { + animation: none; + opacity: 1; + transform: scale(1); + } }src/main/webapp/app/core/alert/alert-overlay.component.scss (1)
22-24: Consider addingprefers-reduced-motionsupport for accessibility.For better accessibility, respect users' motion preferences by disabling or reducing animations when requested.
.alert-animation-enter { animation: alert-slide-in 0.4s cubic-bezier(0.2, 1.22, 0.64, 1) forwards; + + @media (prefers-reduced-motion: reduce) { + animation: none; + margin-bottom: 15px; + transform: translateX(0); + } }src/main/webapp/app/communication/answer-post/answer-post.component.scss (1)
6-19: Considerprefers-reduced-motion+ keyframes namespacing to avoid global collisions.
Suggested tweak:-@keyframes fade-in { +@keyframes answer-post-fade-in { from { opacity: 0; } to { opacity: 1; } } .fade-animation-enter { - animation: fade-in 300ms ease-in forwards; + animation: answer-post-fade-in 300ms ease-in forwards; +} + +@media (prefers-reduced-motion: reduce) { + .fade-animation-enter { + animation: none; + } }src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.ts (1)
55-68: Optional: addprovideNoopAnimationsForTests()here for future-proofing (unless you intentionally want “real” animations in this spec).
Right now this is probably OK due to CSS migration, but noop-animations tends to prevent flaky UI tests when someone later reintroduces a library component that depends on Angular animations.src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.html (1)
6-6: Clean migration from trigger-based animation to CSS state classes.
Thebubble-visible/bubble-hiddensplit is straightforward and keeps the template logic simple.If you want to avoid relying on truthy/falsy object values, consider normalizing to booleans (e.g.,
!!newIrisMessage) for readability.src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss (1)
60-64: Consider simplifying the dual animation or adding a clarifying comment.The
.message-animation-enterclass applies themessage-enterkeyframe twice with different timing functions:
- First:
0.3s ease-in-out forwards(immediate)- Second:
0.3s 0.1s cubic-bezier(0.2, 1.22, 0.64, 1) forwards(delayed with bounce)Since both animations target the same properties (
height,transform) and useforwardsfill mode, the second animation will override the first. If the intention is to create a bounce effect, consider either:
- Using only the second animation with the cubic-bezier easing
- Adding a CSS comment explaining the dual-animation approach
Option 1: Simplified single animation
.message-animation-enter { - animation: - message-enter 0.3s ease-in-out forwards, - message-enter 0.3s 0.1s cubic-bezier(0.2, 1.22, 0.64, 1) forwards; + animation: message-enter 0.3s 0.1s cubic-bezier(0.2, 1.22, 0.64, 1) forwards; }Option 2: Add clarifying comment
.message-animation-enter { + // Dual-stage animation: initial ease-in followed by bounce effect animation: message-enter 0.3s ease-in-out forwards, message-enter 0.3s 0.1s cubic-bezier(0.2, 1.22, 0.64, 1) forwards; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (54)
src/main/webapp/app/app.config.ts(1 hunks)src/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.ts(2 hunks)src/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.ts(2 hunks)src/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.ts(2 hunks)src/main/webapp/app/communication/answer-post/answer-post.component.html(1 hunks)src/main/webapp/app/communication/answer-post/answer-post.component.scss(1 hunks)src/main/webapp/app/communication/answer-post/answer-post.component.spec.ts(2 hunks)src/main/webapp/app/communication/answer-post/answer-post.component.ts(0 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.html(2 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.scss(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.ts(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.ts(0 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.html(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.ts(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.ts(0 hunks)src/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.ts(1 hunks)src/main/webapp/app/communication/faq/faq-update.component.spec.ts(2 hunks)src/main/webapp/app/communication/faq/faq.component.spec.ts(1 hunks)src/main/webapp/app/communication/post/post.component.spec.ts(2 hunks)src/main/webapp/app/communication/post/post.component.ts(0 hunks)src/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.ts(1 hunks)src/main/webapp/app/core/alert/alert-overlay.component.html(1 hunks)src/main/webapp/app/core/alert/alert-overlay.component.scss(1 hunks)src/main/webapp/app/core/alert/alert-overlay.component.spec.ts(0 hunks)src/main/webapp/app/core/alert/alert-overlay.component.ts(0 hunks)src/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.ts(2 hunks)src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts(2 hunks)src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.ts(2 hunks)src/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts(2 hunks)src/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.ts(2 hunks)src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.ts(2 hunks)src/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.ts(1 hunks)src/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.ts(1 hunks)src/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.ts(2 hunks)src/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.ts(2 hunks)src/main/webapp/app/core/course/shared/course-sidebar/course-sidebar.component.spec.ts(0 hunks)src/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.ts(3 hunks)src/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.ts(2 hunks)src/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.ts(2 hunks)src/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.ts(2 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.ts(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts(0 hunks)src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.html(1 hunks)src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.scss(1 hunks)src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.ts(1 hunks)src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.ts(0 hunks)src/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.ts(2 hunks)src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts(2 hunks)src/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.ts(1 hunks)src/main/webapp/app/programming/manage/update/update-components/information/programming-exercise-information.component.spec.ts(0 hunks)src/test/javascript/spec/helpers/animations.ts(1 hunks)
💤 Files with no reviewable changes (10)
- src/main/webapp/app/programming/manage/update/update-components/information/programming-exercise-information.component.spec.ts
- src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.ts
- src/main/webapp/app/core/alert/alert-overlay.component.spec.ts
- src/main/webapp/app/communication/post/post.component.ts
- src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.ts
- src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.ts
- src/main/webapp/app/core/alert/alert-overlay.component.ts
- src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
- src/main/webapp/app/core/course/shared/course-sidebar/course-sidebar.component.spec.ts
- src/main/webapp/app/communication/answer-post/answer-post.component.ts
🧰 Additional context used
📓 Path-based instructions (8)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scsssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.scsssrc/main/webapp/app/communication/answer-post/answer-post.component.htmlsrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.tssrc/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.tssrc/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.tssrc/main/webapp/app/communication/faq/faq.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.htmlsrc/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.tssrc/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.tssrc/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.tssrc/main/webapp/app/app.config.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.tssrc/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.tssrc/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.tssrc/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.spec.tssrc/main/webapp/app/communication/post/post.component.spec.tssrc/main/webapp/app/core/alert/alert-overlay.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.scsssrc/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.tssrc/main/webapp/app/core/alert/alert-overlay.component.scsssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.tssrc/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.htmlsrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.htmlsrc/main/webapp/app/communication/faq/faq-update.component.spec.tssrc/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.tssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scsssrc/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.scss
src/main/webapp/app/**/*.component.html
📄 CodeRabbit inference engine (AGENTS.md)
In Angular templates, use built-in control-flow syntax (@if, @for, @switch) and never use legacy structural directives (*ngIf, *ngFor, *ngSwitch)
Files:
src/main/webapp/app/communication/answer-post/answer-post.component.htmlsrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.htmlsrc/main/webapp/app/core/alert/alert-overlay.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.htmlsrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.html
src/main/webapp/**/*.html
⚙️ CodeRabbit configuration file
@if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.
Files:
src/main/webapp/app/communication/answer-post/answer-post.component.htmlsrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.htmlsrc/main/webapp/app/core/alert/alert-overlay.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.htmlsrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.htmlsrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.html
src/main/webapp/app/**/*.spec.ts
📄 CodeRabbit inference engine (AGENTS.md)
Co-locate client tests with TypeScript components (Jest specs alongside component files)
Files:
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.tssrc/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.tssrc/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.tssrc/main/webapp/app/communication/faq/faq.component.spec.tssrc/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.tssrc/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.tssrc/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.tssrc/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.tssrc/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.tssrc/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.spec.tssrc/main/webapp/app/communication/post/post.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.tssrc/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.tssrc/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.tssrc/main/webapp/app/communication/faq/faq-update.component.spec.tssrc/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.tssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
In TypeScript/JavaScript files, prefer single quotes over double quotes
Files:
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.tssrc/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.tssrc/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.tssrc/main/webapp/app/communication/faq/faq.component.spec.tssrc/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.tssrc/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.tssrc/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.tssrc/test/javascript/spec/helpers/animations.tssrc/main/webapp/app/app.config.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.tssrc/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.tssrc/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.tssrc/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.spec.tssrc/main/webapp/app/communication/post/post.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.tssrc/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.tssrc/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.tssrc/main/webapp/app/communication/faq/faq-update.component.spec.tssrc/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.tssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts
src/main/webapp/app/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/main/webapp/app/**/*.{ts,tsx}: Use latest Angular/TypeScript features and avoid null, preferring undefined
Avoid spread operator for objects in TypeScript; prefer explicit property handling
Prefer 100% type safety in TypeScript code
Files:
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.tssrc/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.tssrc/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.tssrc/main/webapp/app/communication/faq/faq.component.spec.tssrc/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.tssrc/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.tssrc/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.tssrc/main/webapp/app/app.config.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.tssrc/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.tssrc/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.tssrc/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.spec.tssrc/main/webapp/app/communication/post/post.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.tssrc/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.tssrc/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.tssrc/main/webapp/app/communication/faq/faq-update.component.spec.tssrc/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.tssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts
src/main/webapp/**/*.ts
⚙️ CodeRabbit configuration file
Files:
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.tssrc/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.tssrc/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.tssrc/main/webapp/app/communication/faq/faq.component.spec.tssrc/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.tssrc/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.tssrc/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.tssrc/main/webapp/app/app.config.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.tssrc/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.tssrc/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.spec.tssrc/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.tssrc/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.tssrc/main/webapp/app/communication/answer-post/answer-post.component.spec.tssrc/main/webapp/app/communication/post/post.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.tssrc/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.tssrc/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.tssrc/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.tssrc/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.tssrc/main/webapp/app/communication/faq/faq-update.component.spec.tssrc/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.tssrc/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.tssrc/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts
src/test/javascript/spec/**/*.ts
⚙️ CodeRabbit configuration file
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}}
Files:
src/test/javascript/spec/helpers/animations.ts
🧬 Code graph analysis (17)
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
src/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts (1)
src/test/javascript/spec/helpers/animations.ts (1)
provideNoopAnimationsForTests(27-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: client-tests
- GitHub Check: server-tests
- GitHub Check: client-style
- GitHub Check: server-style
- GitHub Check: client-tests-selected
- GitHub Check: Analyse
🔇 Additional comments (37)
src/main/webapp/app/communication/faq/faq.component.spec.ts (1)
5-5: Sanity-check: if this spec gets flaky post-migration, switch to the shared noop-animations helper.
Given the codebase-wide removal ofBrowserAnimationsModule, ifFaqComponent(or any nested third-party UI) still schedules animations/timers in tests, consider addingprovideNoopAnimationsForTests()to the TestBed providers (per the new test helper pattern used elsewhere in this PR).src/main/webapp/app/programming/manage/update/programming-exercise-update.component.spec.ts (1)
73-89: Removal of BrowserAnimationsModule from this spec looks safe.
This test setup doesn’t appear to depend on Angular animation providers, so dropping it should reduce noise and align with the migration.src/main/webapp/app/communication/post/post.component.spec.ts (2)
1-4: Keep ng-mocks import update consistent (OK).
No concerns with theMockDirectiveaddition itself.
85-116:NgbTooltipis correctly imported as a standalone directive. ng-bootstrap v14+ (including v19.x) supports standalone directives, soimports: [NgbTooltip, OverlayModule]is valid and will not break tests. No changes needed.src/main/webapp/app/app.config.ts (1)
6-12: RouterModule removal is consistent withprovideRouterusage.
No issues with the import change itself.src/main/webapp/app/core/course/manage/course-management-container/course-management-container.component.spec.ts (1)
165-177: Dropping BrowserAnimationsModule from this spec looks safe and reduces test coupling.src/main/webapp/app/communication/shared/discussion-section/discussion-section.component.spec.ts (1)
71-99: TestBed imports cleanup (removing BrowserAnimationsModule) looks good.src/main/webapp/app/core/course/overview/course-overview/course-overview.component.spec.ts (1)
190-207: FaIconComponent in TestBed imports is correct.The change is consistent with the codebase pattern.
FaIconComponentfrom @fortawesome/angular-fontawesome 3.0.0 is a standalone component and correctly belongs in theimportsarray.src/main/webapp/app/communication/faq/faq-update.component.spec.ts (1)
46-55: TestBed configuration is correct.
FaIconComponentis a standalone component in @fortawesome/angular-fontawesome and can be imported directly via theimportsarray. The change fromBrowserAnimationsModuleto[FaIconComponent]is valid.src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.scss (1)
32-46: LGTM! Clean migration to CSS-based visibility animations.The transform-origin and transition properties work well together with the visibility state classes. The approach properly handles the scale animation for show/hide states.
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.html (1)
10-10: LGTM! Correctly applies CSS animation class.The migration from Angular animation binding to CSS class is implemented correctly and aligns with the corresponding SCSS definitions.
src/main/webapp/app/core/alert/alert-overlay.component.html (1)
2-2: LGTM! Consistent migration to CSS animation classes.Both the dismiss-all button and alert-wrap elements correctly apply the CSS animation class, matching the pattern used throughout this PR.
Also applies to: 10-10
src/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.ts (1)
25-25: LGTM! Proper migration to centralized test helper.The switch to
provideNoopAnimationsForTests()aligns with the project-wide test infrastructure standardization. The helper correctly delegates toprovideNoopAnimations()while providing a consistent import path across all test files.Also applies to: 58-58
src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.ts (1)
17-17: LGTM! Consistent use of centralized animation test helper.The migration follows the same pattern as other test files in this PR, ensuring consistency across the test suite.
Also applies to: 62-62
src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts (1)
10-10: LGTM! Proper use of standardized animation test helper.The test configuration correctly adopts the centralized
provideNoopAnimationsForTests()helper, maintaining consistency with the broader test infrastructure updates in this PR.Also applies to: 24-24
src/main/webapp/app/exercise/statistics/exercise-statistics.component.spec.ts (1)
17-18: Good: centralized noop animations provider in TestBed to keep tests deterministic.
Given Angular’s provider typing changes across versions, it’s worth confirming this compiles cleanly in CI with the current Angular version.Also applies to: 50-60
src/main/webapp/app/exam/manage/exam-scores/exam-scores.component.spec.ts (1)
49-50: Good: switching from module-based animations to provider-based noop animations matches the migration strategy.Also applies to: 266-294
src/main/webapp/app/communication/course-notification/course-notification/course-notification.component.spec.ts (1)
47-50: Verify that the component template no longer contains Angular animation triggers before removingNoopAnimationsModule.If
course-notification.component.htmluses@triggerdirectives or if the component class defines animations metadata, tests will fail with "Unexpected synthetic property" errors. Confirm the migration to CSS animations is complete and no animation bindings remain in the template.src/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.ts (1)
13-13: Import path and helper function verified as valid.The import from
test/helpers/animationsresolves correctly (mapped tosrc/test/javascript/spec/helpers/animations.ts), andprovideNoopAnimationsForTestsis properly exported. This pattern is consistently used across 18+ spec files in the codebase, confirming the path alias and helper work as expected.src/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.ts (1)
13-14: Consistent noop-animations setup for calendar tests—verify the custom helper exists.The import
from 'test/helpers/animations'references a custom project helper rather than a standard Angular package. Confirm thatprovideNoopAnimationsForTestsis properly exported fromtest/helpers/animations.tsand that this helper correctly wraps Angular'sprovideNoopAnimations().Also applies to: 60-66
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.spec.ts (1)
76-76: Removing NoopAnimationsModule here seems fine after CSS migration—just ensure nothing still depends on the animations engine.
Given the component no longer uses Angular animations and children are mocked, dropping the module should be safe; please verify by running this spec (and any Iris-related spec suite) to catch hidden dependencies.src/main/webapp/app/communication/answer-post/answer-post.component.html (1)
68-69: CSS class-based entry animation hookup looks correct.
Applyingfade-animation-enteron the conditionally-rendered reactions bar should reproduce the former “enter” behavior without Angular animations.src/main/webapp/app/core/course/overview/course-statistics/course-statistics.component.spec.ts (1)
25-26: Nice: centralized noop-animations provider keeps specs consistent.
UsingprovideNoopAnimationsForTests()here aligns with the new testing approach and should reduce churn when Angular deprecations land.Also applies to: 343-346
src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts (1)
19-20: Provider-based noop animations update is consistent and low-risk.
Looks good; should behave like the priorprovideNoopAnimations()usage while keeping specs aligned with the new helper.Also applies to: 49-54
src/main/webapp/app/atlas/manage/course-competencies-relation-graph/course-competencies-relation-graph.component.spec.ts (1)
6-7: Good alignment with the shared animations test helper.
Switching fromNoopAnimationsModuletoprovideNoopAnimationsForTests()is consistent with the repo-wide direction and should keep these graph tests stable.Also applies to: 56-65
src/main/webapp/app/iris/overview/exercise-chatbot/exercise-chatbot-button.component.spec.ts (1)
73-75: VerifyHtmlForMarkdownPipestandalone status in TestBed configuration.The placement of
MockPipe(HtmlForMarkdownPipe)depends on whether the pipe is standalone: useimportsonly if it's standalone (Angular 14+), otherwise usedeclarations. Without confirming the pipe's definition, the current configuration cannot be validated. Check theHtmlForMarkdownPipeclass definition for thestandalone: trueflag to determine correct placement.src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.ts (1)
5-5: LGTM: Test animation helper migration completed correctly.The migration from
provideNoopAnimations()toprovideNoopAnimationsForTests()is consistent with the centralized test helper pattern introduced in this PR.Also applies to: 17-17
src/main/webapp/app/atlas/manage/course-competencies-relation-modal/course-competencies-relation-modal.component.spec.ts (1)
13-13: LGTM: Consistent migration to provider-based animation stubbing.The change from
NoopAnimationsModuletoprovideNoopAnimationsForTests()aligns with the project-wide test strategy.Also applies to: 59-59
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss (1)
35-70: LGTM: CSS animations successfully replace Angular animations.The keyframe animations and CSS classes provide a clean replacement for the Angular animation metadata that was removed from the component TypeScript file.
src/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts (1)
8-8: LGTM: Test helper migration is consistent.The migration follows the established pattern across all test files in this PR.
Also applies to: 18-18
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html (2)
172-172: LGTM: Animation trigger replaced with CSS class.The change from
@suggestionAnimationtrigger tosuggestion-animation-enterCSS class correctly implements the migration to CSS-based animations.
179-179: LGTM: Conditional animation correctly migrated to CSS class binding.The migration from
@messageAnimationwith[@.disabled]="!shouldAnimate"to[class.message-animation-enter]="shouldAnimate"preserves the conditional animation behavior while using CSS classes. This is the correct approach for CSS-based animations.src/main/webapp/app/atlas/manage/competency-graph/competency-graph.component.spec.ts (1)
7-7: LGTM: Module-based animation stubbing replaced with provider-based approach.The migration from
NoopAnimationsModuletoprovideNoopAnimationsForTests()is correctly implemented and consistent with the project-wide pattern.Also applies to: 34-41
src/main/webapp/app/exam/manage/exam-scores/average-scores-graph/exam-scores-average-scores-graph.component.spec.ts (1)
15-15: LGTM: Animation module migration completed correctly.The change from
BrowserAnimationsModulein imports toprovideNoopAnimationsForTests()in providers follows the established pattern for this PR.Also applies to: 55-69
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.spec.ts (1)
54-60: Verify whether animation stubbing is needed for consistency.Animation modules (
BrowserAnimationsModule,NoopAnimationsModule) were removed from imports, butprovideNoopAnimationsForTests()was not added to providers. According to the PR objectives, the helper is intended to consolidate animation stubbing for third-party libraries (PrimeNG, ngx-charts, ngx-graph).Please verify whether:
- The component or its dependencies (including
CourseNotificationComponent) use any third-party libraries that require animation support- If so, add
provideNoopAnimationsForTests()to the providers array for consistency with other test files in this PRIf no animation support is needed, this change is acceptable.
src/main/webapp/app/core/course/overview/visualizations/exercise-scores-chart/exercise-scores-chart.component.spec.ts (1)
15-15: Centralized noop-animations provider usage looks correct.Switching from importing animation modules to
provideNoopAnimationsForTests()inprovidersmatches the PR direction and keeps the test setup lightweight.Also applies to: 41-53
src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.html (1)
44-47: Potential regression: animations may not play when the overlay is opened.Because these animation classes are always present, the keyframes may run while the overlay is hidden and won't replay on open unless your SCSS scopes animation to the
.is-shownstate (or otherwise re-triggers). Consider toggling the classes withisShown:- <div class="fade-animation-delayed-enter"> + <div [class.fade-animation-delayed-enter]="isShown"> @for (notification of notificationsForSelectedCategory; track notification) { - <div class="course-notification-overview-notification-wrap notification-wrap-animation-enter"> + <div + class="course-notification-overview-notification-wrap" + [class.notification-wrap-animation-enter]="isShown" + > <jhi-course-notification [courseNotification]="notification" [isUnseen]="notification.status === CourseNotificationViewingStatus.UNSEEN" [isShowClose]="true" [isRedirectToUrl]="true" (onCloseClicked)="closeClicked(notification)" /> </div> } <div class="py-1"></div> </div> } @else { - <div class="course-notification-overview-notification-empty-prompt fade-animation-delayed-enter"> + <div + class="course-notification-overview-notification-empty-prompt" + [class.fade-animation-delayed-enter]="isShown" + >Also applies to: 59
src/main/webapp/app/communication/answer-post/answer-post.component.spec.ts
Show resolved
Hide resolved
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||||||||||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
src/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.ts(0 hunks)src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts(0 hunks)src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.ts(0 hunks)src/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts(0 hunks)src/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.ts(0 hunks)src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.ts(1 hunks)src/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.ts(0 hunks)src/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.ts(0 hunks)src/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts(1 hunks)src/test/javascript/spec/helpers/animations.ts(1 hunks)
💤 Files with no reviewable changes (7)
- src/main/webapp/app/core/calendar/shared/calendar-events-per-day-section/calendar-events-per-day-section.component.spec.ts
- src/main/webapp/app/core/calendar/desktop/overview/calendar-desktop-overview.component.spec.ts
- src/main/webapp/app/core/calendar/desktop/month-presentation/calendar-desktop-month-presentation.component.spec.ts
- src/main/webapp/app/core/calendar/mobile/overview/calendar-mobile-overview.component.spec.ts
- src/main/webapp/app/exam/manage/students/room-distribution/students-room-distribution-dialog.component.spec.ts
- src/main/webapp/app/core/calendar/shared/calendar-event-detail-popover-component/calendar-event-detail-popover.component.spec.ts
- src/main/webapp/app/lecture/manage/lecture-series-create/lecture-series-create.component.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/test/javascript/spec/helpers/animations.ts
🧰 Additional context used
📓 Path-based instructions (5)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
src/main/webapp/app/**/*.spec.ts
📄 CodeRabbit inference engine (AGENTS.md)
Co-locate client tests with TypeScript components (Jest specs alongside component files)
Files:
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
In TypeScript/JavaScript files, prefer single quotes over double quotes
Files:
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
src/main/webapp/app/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/main/webapp/app/**/*.{ts,tsx}: Use latest Angular/TypeScript features and avoid null, preferring undefined
Avoid spread operator for objects in TypeScript; prefer explicit property handling
Prefer 100% type safety in TypeScript code
Files:
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
src/main/webapp/**/*.ts
⚙️ CodeRabbit configuration file
Files:
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.tssrc/main/webapp/app/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: server-tests
- GitHub Check: client-style
- GitHub Check: client-tests-selected
- GitHub Check: client-tests
- GitHub Check: server-style
- GitHub Check: Analyse
🔇 Additional comments (1)
src/main/webapp/app/core/calendar/shared/calendar-subscription-popover/calendar-subscription-popover.component.spec.ts (1)
15-15: No action required—the test configuration is correct.The component uses PrimeNG components (Popover, Checkbox, SelectButton), which as of PrimeNG 21 no longer require animation providers in tests. The removal of
provideNoopAnimations()is appropriate and aligns with the PR's migration away from Angular animations. The centralizedprovideNoopAnimationsForTests()helper is specifically for libraries like ngx-charts and ngx-graph that still depend on@angular/animations; this component doesn't use those libraries.
...p/lecture/manage/lecture-series-edit-modal/lecture-series-draft-edit-modal.component.spec.ts
Show resolved
Hide resolved
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
FelixTJDietrich
left a comment
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 staging works as expected in the mentioned locations of the testing steps. The code also looks good and nothing strange sticks out, except for provideNoopAnimationsForTests but that is explained in the helper.
Use Angular 21's animate.enter and animate.leave attributes to properly trigger animations when elements enter/leave the DOM. Use CSS Grid (grid-template-rows: 0fr → 1fr) to animate height since CSS cannot interpolate to height: auto.
…ore/angular-animation
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: 0
🧹 Nitpick comments (1)
src/main/webapp/app/core/alert/alert-overlay.component.scss (1)
24-32: Consider ifmax-height: 200pxis sufficient for all alert content.The
max-height: 200pxis used for the height animation, which is correct (browsers can interpolatemax-heightunlikeheight: auto). However, if an alert has very long content (e.g., multi-line error messages with action buttons), it might get clipped.If this becomes an issue, consider increasing to a larger value like
500px— sincemax-heightonly constrains the animation endpoint and doesn't affect final rendered height once animation completes.Also applies to: 56-57, 69-73
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/main/webapp/app/core/alert/alert-overlay.component.html(1 hunks)src/main/webapp/app/core/alert/alert-overlay.component.scss(2 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss
- src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html
🧰 Additional context used
📓 Path-based instructions (3)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/core/alert/alert-overlay.component.htmlsrc/main/webapp/app/core/alert/alert-overlay.component.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: server-tests
- GitHub Check: client-tests
- GitHub Check: client-style
- GitHub Check: server-style
- GitHub Check: client-tests-selected
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Analyse
🔇 Additional comments (4)
src/main/webapp/app/core/alert/alert-overlay.component.html (2)
1-31: LGTM — Clean migration to CSS-based animations.The template correctly:
- Uses modern
@ifand@forcontrol flow syntax- Wraps animated elements in dedicated animation wrapper divs
- Applies enter/leave animation classes via Angular's animation directives
The structure aligns well with the SCSS animation definitions.
2-2:animate.enterandanimate.leaveare valid Angular animation APIs.
animate.enterandanimate.leaveare special APIs supported directly by the Angular compiler, not directives. These features were introduced in Angular v20.2 and accept either a simple string with spaces for multiple classes or a string array. The syntax shown in your template is correct and has been a stable, documented Angular feature since August 2025.Likely an incorrect or invalid review comment.
src/main/webapp/app/core/alert/alert-overlay.component.scss (2)
1-85: Well-structured CSS animation implementation.The animation approach is solid:
- Separate keyframes for height, margin, and slide transform allow fine-grained control
overflow: visibleduring animation ensures content remains visible while wrapper height expands- Different durations for enter (0.35s) vs leave (0.25s) creates nice asymmetric UX
- The
cubic-bezier(0.16, 1, 0.3, 1)timing function provides smooth deceleration
178-183: Responsive selector correctly updated to target the new wrapper.The media query now correctly targets
.alert-animation-wrapperinstead of the previous.alert-wrapand.dismiss-allselectors, ensuring the width constraint applies to the animation wrapper at larger screen sizes.
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: 0
🧹 Nitpick comments (4)
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.scss (1)
11-11: Good consistency improvement; consider specifying transition properties.Matching the parent's 0.3s duration creates a more cohesive animation experience. However, using
transition: allcan impact performance since it monitors every property for changes.Consider specifying only the properties that actually transition:
- transition: all 0.3s; + transition: max-height 0.3s, min-height 0.3s, padding 0.3s;This applies to both line 2 (
.chat-status-bar) and line 11 (.display) if you'd like to optimize performance across the component.src/main/webapp/app/iris/overview/services/iris-chat.service.ts (1)
191-201: Verify UX implications of delayed suggestion clearing.Suggestions are now cleared after the HTTP response succeeds (line 193) rather than before sending the message. This means suggestions remain visible during the HTTP request. Consider whether this delay could confuse users, especially with network latency. Alternatively, if this change was intentional to preserve suggestions on send failures, please confirm this behavior aligns with the desired user experience.
Consider clearing suggestions before the HTTP call for immediate feedback, then restore them only if the request fails:
public sendMessage(message: string): Observable<undefined> { if (!this.sessionId) { return throwError(() => new Error('Not initialized')); } // Trim messages (Spaces, newlines) message = message.trim(); const newMessage = new IrisUserMessage(); newMessage.content = [new IrisTextMessageContent(message)]; + const previousSuggestions = this.suggestions.getValue(); + this.suggestions.next([]); return this.irisChatHttpService.createMessage(this.sessionId, newMessage).pipe( tap((m) => { - this.suggestions.next([]); this.replaceOrAddMessage(m.body!); }), map(() => undefined), catchError((error: HttpErrorResponse) => { + this.suggestions.next(previousSuggestions); this.handleSendHttpError(error); return of(); }), ); }src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts (2)
134-134: Consider clearing animatingMessageIds after animations complete to prevent memory growth.The
animatingMessageIdsSet accumulates message IDs indefinitely and is only cleared on session changes. While the memory impact is minimal (storing numbers), this represents unbounded growth. Consider removing message IDs from the Set after their animations complete (typically a few hundred milliseconds).Apply this approach to clear animation IDs after animations complete:
// In the message tracking section (lines 190-198) if (this.shouldAnimate) { const existingIds = new Set(this.messages?.map((m) => m.id) ?? []); messages.forEach((m) => { if (m.id && !existingIds.has(m.id)) { this.animatingMessageIds.add(m.id); + // Clear after animation completes (e.g., 300ms for typical CSS animation) + setTimeout(() => this.animatingMessageIds.delete(m.id), 300); } }); }
171-176: Clarify setTimeout delay for re-enabling animations.The
setTimeoutcall on line 175 has no explicit delay parameter, defaulting to 0ms (next tick). This means animations are re-enabled almost immediately, before messages actually load. If the intent is to wait for messages to load, consider either:
- Adding an explicit delay (e.g., 100-200ms), or
- Moving this logic to the messages subscription handler to enable animations only after messages arrive
Option 1 - Add explicit delay:
-setTimeout(() => (this.shouldAnimate = true)); +setTimeout(() => (this.shouldAnimate = true), 100);Option 2 - Enable in messages subscription:
if (this.currentSessionId !== sessionId) { this.animatingMessageIds.clear(); this.shouldAnimate = false; - setTimeout(() => (this.shouldAnimate = true)); }Then in the messages subscription (after line 199):
this.messages = _.cloneDeep(messages).reverse(); +// Re-enable animations after messages load following session change +if (!this.shouldAnimate && messages.length > 0) { + this.shouldAnimate = true; +}
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.scss(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss(1 hunks)src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts(8 hunks)src/main/webapp/app/iris/overview/services/iris-chat.service.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.scss
🧰 Additional context used
📓 Path-based instructions (9)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/iris/overview/base-chatbot/chat-status-bar/chat-status-bar.component.scsssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.htmlsrc/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/app/**/*.component.html
📄 CodeRabbit inference engine (AGENTS.md)
In Angular templates, use built-in control-flow syntax (@if, @for, @switch) and never use legacy structural directives (*ngIf, *ngFor, *ngSwitch)
Files:
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html
src/main/webapp/**/*.html
⚙️ CodeRabbit configuration file
@if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.
Files:
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
In TypeScript/JavaScript files, prefer single quotes over double quotes
Files:
src/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/app/**/*.{component,service,directive,pipe,module}.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/main/webapp/app/**/*.{component,service,directive,pipe,module}.ts: Use PascalCase for Angular class and service names
Use camelCase for Angular class members (properties and methods)
Files:
src/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/app/**/*.{component,service}.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use Angular Signals for component state and obtain dependencies via inject() function; prohibit legacy decorator-based state patterns and constructor-based dependency injection
Files:
src/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/app/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/main/webapp/app/**/*.{ts,tsx}: Use latest Angular/TypeScript features and avoid null, preferring undefined
Avoid spread operator for objects in TypeScript; prefer explicit property handling
Prefer 100% type safety in TypeScript code
Files:
src/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/**/*.ts
⚙️ CodeRabbit configuration file
Files:
src/main/webapp/app/iris/overview/services/iris-chat.service.tssrc/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
src/main/webapp/app/**/*.component.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use kebab-case for Angular component file names (e.g.,
course-detail.component.ts)
Files:
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts
🧬 Code graph analysis (1)
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts (1)
src/main/webapp/app/iris/overview/services/iris-chat.service.ts (2)
sessionId(74-76)sessionId(78-80)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: client-style
- GitHub Check: server-tests
- GitHub Check: client-tests
- GitHub Check: client-tests-selected
- GitHub Check: server-style
- GitHub Check: Analyse
🔇 Additional comments (7)
src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.html (2)
171-183: LGTM! Suggestion animation migration implemented correctly.The migration from Angular animations to CSS animations is well-implemented. The suggestion buttons are properly disabled during loading (line 174), and the spinner feedback when clicking a suggestion (lines 175-179) provides good user experience.
186-190: LGTM! Message animation wrapper correctly configured.The message animation wrapper properly uses the
animate.enterattribute and conditional class binding to control animations based on theanimatingMessageIdsSet. Thetransform-originstyling is preserved for proper animation direction.src/main/webapp/app/iris/overview/base-chatbot/iris-base-chatbot.component.ts (5)
6-6: LGTM! FontAwesome icon added for loading feedback.The
faCircleNotchicon is correctly imported and exposed for use in the template to display a spinner when a suggestion is clicked.Also applies to: 93-93
190-198: LGTM! New message animation tracking implemented correctly.The logic properly identifies new messages by comparing existing IDs and marks them for animation only when
shouldAnimateis enabled. This ensures initial page loads don't trigger animations.
239-239: LGTM! Clicked suggestion properly reset.Resetting
clickedSuggestionwhen new suggestions arrive ensures the spinner icon clears correctly and prevents stale state.
256-258: LGTM! Initial animation delay prevents unwanted entrance effects.The 500ms delay before enabling animations ensures that messages already present on page load don't animate in, which would be jarring UX.
479-485: LGTM! Clicked suggestion tracking implemented correctly.The
clickedSuggestionstate properly tracks which suggestion was clicked, enabling the spinner feedback in the template. The flow correctly sets the message content and sends it.
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
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: 0
🧹 Nitpick comments (2)
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss (2)
28-69: Consider addingprefers-reduced-motionsupport for accessibility.Users who are sensitive to motion may experience discomfort with scale animations. Adding a media query to respect this preference is a recommended accessibility practice.
Add this after the keyframe definitions:
@media (prefers-reduced-motion: reduce) { .notification-entering > *, .notification-leaving > * { animation: none; opacity: 1; transform: scale(1); } }
90-103: Missing Firefox scrollbar hiding.The
::-webkit-scrollbarpseudo-elements only work in WebKit/Blink browsers. Firefox users will still see the scrollbar.Add Firefox support:
+.course-notification-popup-overlay { + scrollbar-width: none; /* Firefox */ +} + .course-notification-popup-overlay::-webkit-scrollbar { background-color: transparent; display: none; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/main/webapp/app/communication/answer-post/answer-post.component.html(1 hunks)src/main/webapp/app/communication/answer-post/answer-post.component.scss(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.html(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.scss(2 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.html(1 hunks)src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.scss
- src/main/webapp/app/communication/answer-post/answer-post.component.scss
- src/main/webapp/app/communication/course-notification/course-notification-overview/course-notification-overview.component.html
- src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.html
- src/main/webapp/app/communication/answer-post/answer-post.component.html
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: server-tests
- GitHub Check: server-style
- GitHub Check: client-tests-selected
- GitHub Check: client-tests
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: Analyse
- GitHub Check: submit-gradle
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: 0
🧹 Nitpick comments (1)
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss (1)
7-9: Consider aligning transition timing with animation duration.The wrapper transitions use 0.4s while the enter/leave animations (lines 33, 54) use 0.2s. This timing mismatch means notifications will finish scaling in/out before they finish repositioning, which could feel slightly disjointed.
Consider standardizing both to 0.2s for snappier, more synchronized motion:
transition: - opacity 0.4s ease-out, - bottom 0.4s ease-in-out; + opacity 0.2s ease-out, + bottom 0.2s ease-in-out;
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss(4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/**/*.{ts,tsx,html,scss,css}
📄 CodeRabbit inference engine (AGENTS.md)
Place Angular client code in
src/main/webapp/app/with feature modules, shared utilities inapp/shared, and assets/translations incontent/
Files:
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Build and Push Docker Image / Build linux/arm64 Docker Image for ls1intum/artemis
- GitHub Check: Build and Push Docker Image / Build linux/amd64 Docker Image for ls1intum/artemis
- GitHub Check: Build .war artifact
- GitHub Check: client-tests
- GitHub Check: server-tests
- GitHub Check: Analyse
- GitHub Check: submit-gradle
🔇 Additional comments (7)
src/main/webapp/app/communication/course-notification/course-notification-popup-overlay/course-notification-popup-overlay.component.scss (7)
28-46: LGTM! Well-structured enter animation.The scale-in animation is properly implemented with correct initial state, keyframes, and fill-mode. The comment about Angular's animationend detection is helpful for maintainability.
48-67: LGTM! Proper leave animation with good UX considerations.The scale-out animation is correctly implemented with
pointer-events: noneto prevent interaction during exit. The ease-in timing complements the ease-out enter animation.
69-91: LGTM! Proper pointer-events pattern for overlay UX.The changes to height, overflow, and pointer-events work well together:
overflow: visibleenables the stacking effect, while the pointer-events pattern ensures clicks only interact with actual notifications, not empty overlay space.
108-111: LGTM! Clear delegation to animation wrapper.The comment clearly documents that positioning is now handled by
.notification-animation-wrapper, making the architectural change explicit.
124-126: LGTM! Good use of aspect-ratio for circular buttons.The
aspect-ratio: 1property ensures buttons remain perfectly circular. Note that this requires modern browsers (Chrome 88+, Firefox 89+, Safari 15+), which should be acceptable for this Angular application.
129-144: LGTM! Properly adapted for wrapper-based architecture.The expanded state correctly targets
.notification-animation-wrapperand the 0.5s delay on the collapse button's opacity transition provides good UX sequencing—notifications appear before the collapse controls.
12-26: The nth-last-child stacking logic is safe and does not create harmful DOM coupling.The collapse element is unconditionally rendered after the notification loop in the template, guaranteeing it is always the last child. The nth-last-child selectors (2, 3, 4) reliably target the last three notifications. Notifications beyond the 3rd position correctly fall back to the default
bottom: 1.5remdefined on line 5, which is intentional cascading behavior. No changes are needed.
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||
e4b4330 to
41c07da
Compare
This PR migrates all custom Angular animations (
@angular/animations) to native CSS animations (@keyframes,transition). This follows Angular's recommended migration path as the legacy animation system is deprecated.Checklist
General
Client
Motivation and Context
Angular's legacy animation system (
@angular/animationswithtrigger(),state(),transition(),animate()) is deprecated as of Angular 20.2. The Angular team recommends migrating to native CSS animations. See: https://angular.dev/guide/animations/migrationThis PR migrates all custom Angular animations in the Artemis codebase to native CSS animations using
@keyframesand CSS transition properties, following Angular's recommended migration path.Description
Components migrated to CSS animations (7 total):
@keyframes@keyframes@keyframes@keyframes@keyframeswith cubic-bezier timingConfiguration changes:
app.config.tsTest infrastructure:
provideNoopAnimationsForTests()helper insrc/test/javascript/spec/helpers/animations.tsprovideNoopAnimations()calls needed for third-party libraries (PrimeNG, ngx-charts, ngx-graph) into a single fileSteps for Testing
Prerequisites:
1. Iris Chatbot Button Animation
2. Iris Chatbot Messages Animation
3. Answer Post Animation
4. Course Notification Popup Animation
5. Course Notification Overview Animation
6. Alert Overlay Animation
- Success alert: Save course settings successfully
- Error alert: Try to submit invalid form data
- Info alert: Perform an action that shows an info message
7. Theme Verification
Testserver States
You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.
Review Progress
Code Review
Manual Tests
Test Coverage
Summary by CodeRabbit
New Features
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.