-
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
Lecture
: Fix Misaligned Unit Form Components in Edit Lecture
#10178
base: develop
Are you sure you want to change the base?
Lecture
: Fix Misaligned Unit Form Components in Edit Lecture
#10178
Conversation
WalkthroughThe pull request focuses on restructuring the layout and alignment of various lecture unit form components in the Artemis application. The changes primarily involve modifying HTML templates for exercise, online, and video unit forms, aiming to create a more consistent and aligned user interface. The modifications include replacing Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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: 0
🧹 Nitpick comments (4)
src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html (2)
8-18
: Consider simplifying nested row structure.The nested row structure might cause unexpected spacing issues. Consider flattening the structure by combining the title and description into a single row with appropriate column classes.
- <div class="row"> - <div class="row"> - <div class="col-12 mx-auto"> - <h2 jhiTranslate="artemisApp.exerciseUnit.createExerciseUnit.headline"></h2> - </div> - </div> - <div class="row"> - <div class="col-sm-6"> - <p jhiTranslate="artemisApp.exerciseUnit.createExerciseUnit.description"></p> - </div> - </div> + <div class="row"> + <div class="col-12"> + <h2 jhiTranslate="artemisApp.exerciseUnit.createExerciseUnit.headline"></h2> + </div> + <div class="col-sm-6"> + <p jhiTranslate="artemisApp.exerciseUnit.createExerciseUnit.description"></p> + </div>
76-92
: Add spacing between action buttons.While the button placement is correct, consider adding margin between the submit and cancel buttons for better visual separation.
- <button type="button" (click)="cancelForm()" class="btn btn-default"> + <button type="button" (click)="cancelForm()" class="btn btn-default ms-2">src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.html (2)
53-62
: Simplify form layout structure.The current nested structure with an empty column for spacing is overly complex. Consider using Bootstrap's spacing utilities instead.
- <div class="row" style="padding: 0"> - <div class="col-12"> - <div class="row"> - <div class="col-4"> - <label class="required" for="source">{{ 'artemisApp.videoUnit.createVideoUnit.source' | artemisTranslate }}*</label> - </div> - <div class="col-1"></div> - <div class="col-7"> - <label for="urlHelper" jhiTranslate="artemisApp.videoUnit.createVideoUnit.urlVideoHelper"></label> - </div> - </div> + <div class="row"> + <div class="col-4"> + <label class="required" for="source">{{ 'artemisApp.videoUnit.createVideoUnit.source' | artemisTranslate }}*</label> + </div> + <div class="col-7 offset-1"> + <label for="urlHelper" jhiTranslate="artemisApp.videoUnit.createVideoUnit.urlVideoHelper"></label> + </div>
83-110
: Align validation structure with form layout improvements.While the validation messages correctly use the new
@if
directive, their structure should be simplified along with the form layout changes suggested above.- <div class="row"> - <div class="col-4"> - @if (sourceControl?.invalid && (sourceControl?.dirty || sourceControl?.touched)) { - <div class="alert alert-danger"> - @if (sourceControl?.errors?.required) { - <div jhiTranslate="artemisApp.videoUnit.createVideoUnit.sourceRequiredValidationError"></div> - } - @if (sourceControl?.errors?.invalidVideoUrl) { - <div jhiTranslate="artemisApp.videoUnit.createVideoUnit.sourceURLValidationError"></div> - } - </div> - } - </div> - <div class="col-1"></div> - <div class="col-7"> + <div class="row mt-2"> + <div class="col-4"> + @if (sourceControl?.invalid && (sourceControl?.dirty || sourceControl?.touched)) { + <div class="alert alert-danger mb-0"> + @if (sourceControl?.errors?.required) { + <div jhiTranslate="artemisApp.videoUnit.createVideoUnit.sourceRequiredValidationError"></div> + } + @if (sourceControl?.errors?.invalidVideoUrl) { + <div jhiTranslate="artemisApp.videoUnit.createVideoUnit.sourceURLValidationError"></div> + } + </div> + } + </div> + <div class="col-7 offset-1">
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html
(2 hunks)src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.html
(2 hunks)src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/video-unit-form/video-unit-form.component.html
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/online-unit-form/online-unit-form.component.html
🧰 Additional context used
📓 Path-based instructions (2)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: client-style
- GitHub Check: server-style
- GitHub Check: client-tests
- GitHub Check: server-tests
- GitHub Check: Build and Push Docker Image
- GitHub Check: Analyse
- GitHub Check: Build .war artifact
🔇 Additional comments (1)
src/main/webapp/app/lecture/lecture-unit/lecture-unit-management/create-exercise-unit/create-exercise-unit.component.html (1)
Line range hint
52-65
: LGTM! Follows new Angular syntax guidelines.The template correctly uses the new
@for
directive instead of*ngFor
.
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.
@SindiBuklaji that sounds like a good idea. |
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 TS5, 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.
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, all works as expected
Checklist
General
Client
Motivation and Context
There are some inconsistencies in the layout of creating different lecture units in Edit Lecture mode.
Closes #10171.
Description
online-unit-form
: changedcontainer
torow
and removed unnecessary space between obligatory field and starvideo-unit-form
: also changedcontainer
torow
and added a div withcol-12
classcreate-exercise-unit
: removed centering and addedrow
Steps for Testing
Prerequisites:
Lectures
Manage
Edit
Add a new Lecture Unit
Exercise
,Video
andOnline
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
Screenshots
You can compare these screenshots with the ones in issue #10171
Exercise Unit:
Video Unit:
Online Unit:
Summary by CodeRabbit
Style
Documentation
The changes primarily focus on enhancing the visual organization and layout of form components within the lecture unit management section.