-
Notifications
You must be signed in to change notification settings - Fork 301
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
Iris
: Load default templates from resource folder
#7418
Conversation
@xHadie @dearjasmina Sorry! The iris settings are available only on TS9, I forgot to mention that. It is deployed there right now if you want to have a look. I will also take a look at why the tests are failing 🤔 |
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.
lgtm, one small suggestion in 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.
code lgtm! also tested on ts9. Worked as described
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.
LGTM
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.
Code changes look good 👍🏻
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
# Conflicts: # src/main/java/de/tum/in/www1/artemis/service/iris/IrisConstants.java # src/main/java/de/tum/in/www1/artemis/service/iris/IrisSettingsService.java
480007b
Checklist
General
Server
Client
No client changes
Motivation and Context
The current solution for default Iris templates is to put them all into a single static utility class,
IrisConstants.java
. This is not scalable, offers no syntax highlighting, and forces the system to be recompiled every time a default template is changed.Description
Each default Iris template now gets its own
.hbs
(handlebars) file in theresources/templates/iris
folder. The files are loaded using theIrisDefaultTemplateService
, which uses theResourceLoaderService
to access the file with the requested filename in the folder. TheIrisSettingsService
then uses this service to load the default templates into the global settings at application startup.The global template version used to be a static int field in IrisConstants, and this has also gotten its own file next to the templates. The content of this file is supposed to be just a single int and incremented every time one of the templates is adapted to trigger a reload from the files on application startup.
Please let me know if I have followed all best practices here!
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked