-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programming exercises
: Adjust translations for participation mode tooltips
#9468
Programming exercises
: Adjust translations for participation mode tooltips
#9468
Conversation
WalkthroughThis pull request introduces new descriptions for options related to online and offline IDEs in the internationalization JSON files for both German and English. Additionally, it modifies the HTML template of the programming exercise difficulty component by adding Changes
Suggested labels
Suggested reviewers
Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)
🔇 Additional comments (3)
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: 2
🧹 Outside diff range comments (1)
src/main/webapp/app/exercises/programming/manage/update/update-components/programming-exercise-difficulty.component.html (1)
Line range hint
45-108
: Overall implementation looks great!The changes consistently implement help icons for different IDE options (Offline IDE, Online Editor, and Online IDE) using the new Angular syntax. This aligns well with the PR objectives of adding tooltips to participation modes.
Key points:
- Consistent use of
@if
and@else
directives, adhering to the new Angular syntax guidelines.- Conditional rendering of help icons based on IDE selection validity.
- Proper integration with existing code structure.
These changes will significantly improve the user interface by providing clear descriptions for each participation mode option.
To further enhance maintainability, consider extracting the common logic for displaying help icons into a separate component or directive. This would reduce code duplication and make future updates easier.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (3)
- src/main/webapp/app/exercises/programming/manage/update/update-components/programming-exercise-difficulty.component.html (3 hunks)
- src/main/webapp/i18n/de/programmingExercise.json (1 hunks)
- src/main/webapp/i18n/en/programmingExercise.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/app/exercises/programming/manage/update/update-components/programming-exercise-difficulty.component.html (1)
Pattern
src/main/webapp/**/*.html
: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.src/main/webapp/i18n/de/programmingExercise.json (1)
Pattern
src/main/webapp/i18n/de/**/*.json
: German language translations should be informal (dutzen) and should never be formal (sietzen). So the user should always be addressed with "du/dein" and never with "sie/ihr".
🔇 Additional comments (8)
src/main/webapp/app/exercises/programming/manage/update/update-components/programming-exercise-difficulty.component.html (2)
45-47
: LGTM! Adheres to coding guidelines.The changes correctly implement the conditional rendering of the help icon for the "allowOfflineIde" option. The use of
@else
aligns with the new Angular syntax guidelines, replacing the older*ngIf
directive. This addition enhances the user interface by providing contextual help when appropriate.
79-81
: LGTM! Consistent implementation.The changes for the "allowOnlineEditor" option mirror the implementation for "allowOfflineIde". The conditional rendering of the help icon is correctly implemented using the new Angular syntax (
@else
), adhering to the coding guidelines. This consistency in implementation enhances the overall user experience and maintainability of the code.src/main/webapp/i18n/en/programmingExercise.json (4)
133-135
: LGTM: New description for allowOnlineEditor added correctly.The new description for the "allowOnlineEditor" option has been added correctly. It provides a clear and concise explanation of the online editor's features and limitations.
140-142
: LGTM: New description for allowOfflineIde added correctly.The new description for the "allowOfflineIde" option has been added correctly. It clearly explains the purpose of this option and its implications for students.
147-149
: LGTM: New description for allowOnlineIde added correctly.The new description for the "allowOnlineIde" option has been added correctly. It provides a comprehensive explanation of the online IDE's features and capabilities.
133-149
: Changes align well with PR objectives and enhance user experience.The new descriptions for "allowOnlineEditor", "allowOfflineIde", and "allowOnlineIde" have been successfully added to the English translations file. These additions directly address the PR objective of enhancing the user interface by providing clear tooltips for the participation modes in programming exercises.
The descriptions are concise, informative, and highlight the key features and limitations of each mode:
- Online Editor: Emphasizes the text editing capabilities without compilation or execution.
- Offline IDE: Clarifies the option for local development using preferred IDEs.
- Online IDE: Highlights the advanced features, including compilation and execution capabilities.
These changes will significantly improve the user experience by helping students make informed decisions about their preferred participation mode.
src/main/webapp/i18n/de/programmingExercise.json (2)
121-124
: LGTM: Description for Online-Editor is clear and accurate.The description for the online editor is well-written and informative. It correctly uses the informal "du" form as required by the coding guidelines.
135-138
: LGTM: Description for Online-IDE is comprehensive and well-written.The description for the online IDE option is detailed, informative, and correctly uses the informal "du" form. It provides a clear explanation of the features and capabilities of the online IDE.
...s/programming/manage/update/update-components/programming-exercise-difficulty.component.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on ts3, I could see two participation modes and tooltips next to them
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
1bda254
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
🧹 Outside diff range comments (2)
src/test/javascript/spec/component/programming-exercise/update-components/programming-exercise-difficulty.component.spec.ts (2)
Line range hint
63-75
: Enhance test case assertions and mock setup.While the existing test cases cover basic functionality, consider the following improvements:
Use more specific assertions as per our coding guidelines. For example, replace:
expect(comp.theiaEnabled).toBeTrue();with:
expect(comp.theiaEnabled).toBe(true);Consider moving the ProfileService mock setup to a beforeEach block for better organization and to ensure a clean mock for each test.
Add more specific expectations to verify the component's behavior, such as checking if certain elements are rendered based on the theiaEnabled flag.
Would you like assistance in implementing these improvements?
Line range hint
63-75
: Improve test coverage with additional test cases.The current test suite provides minimal coverage for the ProgrammingExerciseDifficultyComponent. Consider adding the following test cases to improve coverage and ensure robust functionality:
- Test the behavior of the component when different programmingExerciseCreationConfig values are provided.
- Verify the rendering and functionality of the DifficultyPickerComponent and TeamConfigFormGroupComponent within this component.
- Test any methods or computed properties that may exist in the ProgrammingExerciseDifficultyComponent.
- Add edge case tests, such as handling of null or undefined values for programmingExercise or programmingExerciseCreationConfig.
Would you like assistance in drafting these additional test cases?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (3)
- src/main/webapp/i18n/de/programmingExercise.json (1 hunks)
- src/main/webapp/i18n/en/programmingExercise.json (1 hunks)
- src/test/javascript/spec/component/programming-exercise/update-components/programming-exercise-difficulty.component.spec.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/i18n/de/programmingExercise.json (1)
Pattern
src/main/webapp/i18n/de/**/*.json
: German language translations should be informal (dutzen) and should never be formal (sietzen). So the user should always be addressed with "du/dein" and never with "sie/ihr".src/test/javascript/spec/component/programming-exercise/update-components/programming-exercise-difficulty.component.spec.ts (1)
Pattern
src/test/javascript/spec/**/*.ts
: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}
🔇 Additional comments (8)
src/test/javascript/spec/component/programming-exercise/update-components/programming-exercise-difficulty.component.spec.ts (2)
17-17
: LGTM: Import statement for ArtemisSharedComponentModule.The import statement for ArtemisSharedComponentModule is correctly added and follows the proper syntax and naming conventions.
28-28
: LGTM: TestBed configuration updated correctly.The addition of ArtemisSharedComponentModule to the imports array is consistent with the new import statement and allows the test suite to use shared components. The order of imports is logical, with ArtemisTestModule followed by ArtemisSharedComponentModule.
It's also worth noting that the test configuration adheres to the coding guideline of avoiding NO_ERRORS_SCHEMA, which is a good practice for more robust tests.
src/main/webapp/i18n/en/programmingExercise.json (4)
133-135
: LGTM: Clear and concise description for Online Editor.The description accurately explains the features and limitations of the Online Editor option.
140-142
: LGTM: Concise description for Offline IDE.The description clearly explains what the Offline IDE option allows students to do.
147-149
: LGTM: Accurate description for Online IDE, incorporating previous feedback.The description clearly explains the features of the Online IDE option, including its basis on Visual Studio Code, code highlighting and formatting features, pre-configuration, and the ability to compile or run code online. This description has already incorporated the suggestion from the previous review comment.
133-149
: LGTM: Clear and consistent descriptions for programming exercise participation modes.The added descriptions for Online Editor, Offline IDE, and Online IDE provide clear and concise explanations of each option. These additions will help users understand the differences between the participation modes, improving the overall user experience. The descriptions are consistent in style and formatting with the rest of the file.
src/main/webapp/i18n/de/programmingExercise.json (2)
121-124
: LGTM! Clear and concise description.The description for the online editor is well-written, accurately describing its features while maintaining the informal tone as per the German language guidelines.
128-130
: LGTM! Description improved as suggested.The description for the offline IDE option has been updated as per the previous review suggestion. It maintains clarity while using the informal "du" form consistently, adhering to the German language guidelines.
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 great
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 👍
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
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 TS9. Still works.
Looks like most changes made it into #9471.
e8f4480
to
5a0bf48
Compare
Programming exercises
: Add tooltips to participation modesProgramming exercises
: Adjust translations for participation mode tooltips
Tip
Most basic functionality is already merged so this PR only includes the leftover review comments :)
Checklist
General
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Changes affecting Programming Exercises
Motivation and Context
As the amount of participation modes grow from
Offline IDE
andOnline Editor
to now also include theOnline IDE
, @bassner mentioned that he'd love a description for those options. Most basic functionality is already merged so this PR only includes the leftover review comments :)Description
This PR adds tooltips to the three participations modes.
Steps for Testing
Prerequisites:
Exam Mode 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
Performance Review
Code Review
Manual Tests
Exam Mode Test
Performance Tests
Test Coverage
Screenshots
Summary by CodeRabbit
These updates aim to provide better guidance and usability for students interacting with programming exercises.