-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development
: Update thymeleaf email templates
#10114
Conversation
WalkthroughThe pull request involves a comprehensive update of URLs across multiple files in the Artemis project. The primary change is the replacement of the base URL from Changes
Suggested Labels
Suggested Reviewers
Possibly Related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
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
|
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/resources/templates/mail/notification/exerciseOpenForPracticeEmail.html (1)
18-18
: Consider using th:replace for consistencyWhile both
th:include
andth:replace
are valid, consider usingth:replace
consistently across all fragment references for better maintainability. The template currently usesth:include
only for the difficulty translation fragment.- <li th:include="~{mail/notification/fragments :: difficultyTranslation}"/> + <li th:replace="~{mail/notification/fragments :: difficultyTranslation}"/>README.md (1)
245-245
: Update URL format to follow markdown best practices.While the URL has been correctly updated to
artemis.tum.de
, it should be formatted as a proper markdown link to comply with markdown best practices.- https://artemis.tum.de + [https://artemis.tum.de](https://artemis.tum.de)🧰 Tools
🪛 Markdownlint (0.37.0)
245-245: null
Bare URL used(MD034, no-bare-urls)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (26)
README.md
(3 hunks)docs/admin/registration.rst
(1 hunks)docs/user/mobile-applications.rst
(2 hunks)docs/user/orion.rst
(1 hunks)src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCRepositoryUri.java
(2 hunks)src/main/resources/templates/mail/dataExportFailedAdminEmail.html
(1 hunks)src/main/resources/templates/mail/notification/announcementPostEmail.html
(1 hunks)src/main/resources/templates/mail/notification/attachmentChangedEmail.html
(1 hunks)src/main/resources/templates/mail/notification/dataExportCreatedEmail.html
(1 hunks)src/main/resources/templates/mail/notification/dataExportFailedEmail.html
(1 hunks)src/main/resources/templates/mail/notification/duplicateTestCasesEmail.html
(2 hunks)src/main/resources/templates/mail/notification/exerciseOpenForPracticeEmail.html
(1 hunks)src/main/resources/templates/mail/notification/exerciseReleasedEmail.html
(2 hunks)src/main/resources/templates/mail/notification/exerciseSubmissionAssessedEmail.html
(2 hunks)src/main/resources/templates/mail/notification/fileSubmissionSuccessfulEmail.html
(2 hunks)src/main/resources/templates/mail/notification/fragments.html
(6 hunks)src/main/resources/templates/mail/notification/plagiarismCaseEmail.html
(1 hunks)src/main/resources/templates/mail/notification/plagiarismVerdictEmail.html
(1 hunks)src/main/resources/templates/mail/notification/tutorialGroupBasicEmail.html
(2 hunks)src/main/resources/templates/mail/notification/tutorialGroupDeletedEmail.html
(1 hunks)src/main/resources/templates/mail/notification/tutorialGroupUpdatedEmail.html
(1 hunks)src/main/resources/templates/mail/successfulDataExportsAdminEmail.html
(1 hunks)src/main/resources/templates/mail/weeklySummary.html
(2 hunks)src/main/webapp/app/core/about-us/about-us.component.ts
(1 hunks)src/test/java/de/tum/cit/aet/artemis/programming/icl/RepositoryUriTest.java
(5 hunks)src/test/javascript/spec/service/external-cloning.service.spec.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (21)
- docs/admin/registration.rst
- src/main/resources/templates/mail/notification/tutorialGroupUpdatedEmail.html
- src/main/resources/templates/mail/notification/exerciseSubmissionAssessedEmail.html
- src/main/resources/templates/mail/notification/dataExportCreatedEmail.html
- src/main/resources/templates/mail/notification/exerciseReleasedEmail.html
- src/main/resources/templates/mail/notification/attachmentChangedEmail.html
- src/main/resources/templates/mail/notification/tutorialGroupBasicEmail.html
- src/main/resources/templates/mail/notification/fileSubmissionSuccessfulEmail.html
- src/main/resources/templates/mail/notification/plagiarismVerdictEmail.html
- src/test/java/de/tum/cit/aet/artemis/programming/icl/RepositoryUriTest.java
- src/main/resources/templates/mail/notification/tutorialGroupDeletedEmail.html
- docs/user/orion.rst
- src/main/webapp/app/core/about-us/about-us.component.ts
- src/main/java/de/tum/cit/aet/artemis/programming/service/localvc/LocalVCRepositoryUri.java
- src/main/resources/templates/mail/notification/plagiarismCaseEmail.html
- src/main/resources/templates/mail/notification/announcementPostEmail.html
- docs/user/mobile-applications.rst
- src/main/resources/templates/mail/dataExportFailedAdminEmail.html
- src/main/resources/templates/mail/successfulDataExportsAdminEmail.html
- src/main/resources/templates/mail/notification/duplicateTestCasesEmail.html
- src/main/resources/templates/mail/weeklySummary.html
🧰 Additional context used
📓 Path-based instructions (1)
src/test/javascript/spec/service/external-cloning.service.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}}
🪛 Markdownlint (0.37.0)
README.md
245-245: null
Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: client-tests
- GitHub Check: server-tests
- GitHub Check: Analyse
- GitHub Check: Build and Push Docker Image
- GitHub Check: Build .war artifact
🔇 Additional comments (7)
src/main/resources/templates/mail/notification/dataExportFailedEmail.html (1)
3-3
: Fragment syntax updates look good!The Thymeleaf fragment expressions have been correctly updated to use the new syntax with tilde notation (
~{...}
). This change addresses the deprecation warnings and ensures future compatibility.Also applies to: 5-5, 8-8, 10-10, 13-13
src/main/resources/templates/mail/notification/exerciseOpenForPracticeEmail.html (2)
3-3
: Fragment syntax updates look good!The Thymeleaf fragment expressions have been correctly updated to use the new syntax with tilde notation (
~{...}
). This change addresses the deprecation warnings and ensures future compatibility.Also applies to: 5-5, 8-8, 10-10, 18-18, 21-21, 23-23, 26-26
1-1
: Verify fragment syntax across all templatesLet's ensure all Thymeleaf templates have been updated to use the new fragment syntax.
✅ Verification successful
All templates use correct fragment syntax ✓
No unwrapped fragment expressions found across all 22 email templates, confirming consistent usage of the new syntax.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining unwrapped fragment expressions in Thymeleaf templates # Search for potential unwrapped fragment expressions (negative patterns) echo "Checking for unwrapped fragment expressions..." rg -t html 'th:(replace|include)="[^~]' src/main/resources/templates/ # Verify all templates under mail directory have been checked echo "Listing all email templates for verification..." find src/main/resources/templates/mail -name "*.html" -type fLength of output: 1895
src/test/javascript/spec/service/external-cloning.service.spec.ts (1)
6-6
: LGTM! URL updates are consistent.The changes correctly update the test URLs from
artemis.cit.tum.de
toartemis.tum.de
, maintaining test functionality while reflecting the new domain structure.Also applies to: 15-15
src/main/resources/templates/mail/notification/fragments.html (3)
8-9
: LGTM! Fragment syntax updated correctly.The fragment references now use the complete
~{}
syntax as required by newer Thymeleaf versions, addressing the deprecation warnings mentioned in the PR objectives.
145-145
: LGTM! Logo URL updated consistently.The logo URL has been updated from
artemis.cit.tum.de
toartemis.tum.de
, maintaining consistency with the domain changes.
17-130
: CSS styles are well-organized and maintainable.The CSS section is properly structured with clear comments and logical grouping of styles. The styles provide consistent formatting for email notifications.
thank you @CodeRabbit
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.
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 TS3]
Works flawlessly. Couldn't confirm with the logs though
2cf36df
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.
Works as expected.
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 TS1, everything works as expected
Checklist
General
Server
Motivation and Context
Sending emails leads to deprecation warnings, e.g.
Jan 07 18:48:50 artemis-production-node8.artemis.in.tum.de java[3847328]: 2025-01-07T18:48:50.080+01:00 WARN 3847328 --- [Artemis] [ artemis-task-1] actStandardFragmentInsertionTagProcessor : [THYMELEAF][artemis-task-1][mail/notification/announcementPostEmail] Deprecated unwrapped fragment expression "mail/notification/fragments :: head" found in template mail/notification/announcementPostEmail, line 3, col 11. Please use the complete syntax of fragment expressions instead ("~{mail/notification/fragments :: head}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.
Description
I updated all email templates and while doing that also updated the URLs of the main TUM artemis instance
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
Summary by CodeRabbit
Release Notes
Documentation
artemis.cit.tum.de
toartemis.tum.de
across multiple documentation files, including user guides, registration documentation, and mobile application server selection.Configuration
Test Updates
Frontend
No functional changes were introduced in this release.