Skip to content
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

Modeling exercises: Fix layout overlapping in modeling assessment #10145

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Anishyou
Copy link
Contributor

@Anishyou Anishyou commented Jan 14, 2025

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.

Motivation and Context

#10139

Description

  • Added a parent container to manage the layout flow of modeling-assessment and additional-feedback sections.
  • Ensured proper stacking of sections using flexbox and dynamic height adjustments.
  • Restricted modeling-assessment height to prevent overlap in landscape mode.
  • Enabled smooth scrolling within modeling-assessment to improve usability.
  • Added responsive handling for landscape orientation to ensure consistent layout behavior.

Steps for Testing

  1. Log in to Artemis
  2. create a modeling exercise
  3. solve it
  4. assess it and write feedback
  5. when you see as a student, modelling should not be overlapping as shown in the bug

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

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

Summary by CodeRabbit

  • UI/UX Improvements

    • Enhanced layout and responsiveness for the modeling assessment component
    • Introduced a new parent container with improved spacing and scrolling behavior
    • Added flexibility to component height and layout
  • Layout Updates

    • Implemented dynamic height adjustments for assessment sections
    • Added support for vertical scrolling
    • Introduced media query for landscape orientation display
  • Styling Enhancements

    • Updated CSS classes to improve overall component presentation
    • Added gap properties for better content spacing
    • Ensured content containment with overflow handling

- Added a parent container to manage the layout flow of modeling-assessment and additional-feedback sections.
- Ensured proper stacking of sections using flexbox and dynamic height adjustments.
- Restricted modeling-assessment height to prevent overlap in landscape mode.
- Enabled smooth scrolling within modeling-assessment to improve usability.
- Added responsive handling for landscape orientation to ensure consistent layout behavior.
@Anishyou Anishyou linked an issue Jan 14, 2025 that may be closed by this pull request
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jan 14, 2025
@Anishyou Anishyou changed the title ´Modeling exercises´: Fix layout overlapping in modeling assessment Modeling exercises: Fix layout overlapping in modeling assessment Jan 14, 2025
@Anishyou Anishyou marked this pull request as ready for review January 16, 2025 00:27
@Anishyou Anishyou requested a review from a team as a code owner January 16, 2025 00:27
Copy link

coderabbitai bot commented Jan 16, 2025

Walkthrough

The pull request introduces layout and styling modifications to the modeling assessment component. A new parent container with the class parent-container is added to the HTML structure, providing improved layout organization. The accompanying SCSS changes enhance the component's flexibility by implementing dynamic height adjustments, better spacing, and improved scrolling behavior. The changes aim to create a more responsive and user-friendly interface for the modeling assessment view.

Changes

File Change Summary
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.html - Added new parent <div> with parent-container class
- Introduced apollon-row with modified inner structure
- Added conditional block for explanation editor
- Included empty additional-feedback section
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.scss - Created .parent-container with flex layout and spacing
- Updated .modeling-assessment for dynamic height and scrolling
- Modified .apollon-container and .apollon-row to have auto height
- Added media query for landscape orientation

Possibly related PRs

Suggested labels

bugfix, ready to merge, small

Suggested reviewers

  • EneaGore
  • LeonWehrhahn
  • HawKhiem
  • krusche
  • SimonKaran13

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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/exercises/modeling/assess/modeling-assessment.component.scss (2)

11-17: Consider removing redundant spacing.

Since the parent container already implements gap spacing, the margin-bottom: 2rem might be redundant and could lead to inconsistent spacing between elements.

 .modeling-assessment {
     position: relative;
     height: auto;
     max-height: 80vh;
     overflow-y: auto;
-    margin-bottom: 2rem;
     scroll-behavior: smooth;
 }

42-46: Optimize overflow behavior in landscape mode.

Consider using overflow-y: auto instead of scroll to prevent showing unnecessary scrollbars when content fits within the container.

 @media screen and (orientation: landscape) {
     .modeling-assessment {
         max-height: 70vh;
-        overflow-y: scroll;
+        overflow-y: auto;
     }
 }
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.html (2)

14-20: Enhance resize handle accessibility.

Consider adding ARIA attributes to improve the resize handle's accessibility:

-            <div class="draggable-right">
+            <div class="draggable-right" role="separator" aria-label="Resize horizontally">
                 <fa-icon [icon]="faGripLinesVertical" />
             </div>

22-29: Add accessibility attributes to vertical resize handle.

Similar to the horizontal resize handle, enhance accessibility:

-            <div class="draggable-bottom">
+            <div class="draggable-bottom" role="separator" aria-label="Resize vertically">
                 <fa-icon [icon]="faGripLines" />
             </div>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 247e7fb and 6708f62.

📒 Files selected for processing (2)
  • src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.html (1 hunks)
  • src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.scss (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.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.

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: server-tests
  • GitHub Check: server-style
  • GitHub Check: client-tests
  • GitHub Check: client-style
  • GitHub Check: Build and Push Docker Image
  • GitHub Check: Build .war artifact
  • GitHub Check: Analyse
🔇 Additional comments (4)
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.scss (2)

3-9: Well-structured parent container implementation!

The new parent container effectively uses flexbox layout with proper spacing and overflow handling, which should help resolve the layout issues.


33-33: Good use of dynamic height adjustment!

The change from fixed to dynamic height in both containers will help prevent content overflow issues while maintaining proper layout structure.

Also applies to: 39-39

src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.html (2)

1-13: Excellent implementation of new Angular syntax!

The code correctly uses the new @if syntax as per guidelines, and the header structure is well-organized with proper flex layout.


32-34: Clarify the purpose of the empty feedback section.

The additional feedback section is currently empty. Please either:

  1. Add a TODO comment explaining the intended implementation
  2. Remove it if it's not needed for this PR

Copy link

@zagemello zagemello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, tested on TS1

Copy link

@HawKhiem HawKhiem left a 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 as described

image

Copy link

@ItsaaaMeMario ItsaaaMeMario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS1, works as described.
Bildschirmfoto 2025-01-16 um 16 04 56

Copy link

@sachmii sachmii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS1, works just fine.

image

Copy link

@vinceclifford vinceclifford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS1, works as expected.

Copy link

@kevinfischer4 kevinfischer4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS1, works as expected. The boxes are not overlapping anymore.

Copy link

@sawys777 sawys777 left a 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

Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link

@SindiBuklaji SindiBuklaji left a 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 described. :)

@SindiBuklaji SindiBuklaji added client Pull requests that update TypeScript code. (Added Automatically!) and removed client Pull requests that update TypeScript code. (Added Automatically!) lock:artemis-test5 labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review
Projects
Status: Work In Progress
Development

Successfully merging this pull request may close these issues.

Feedback for Modeling Exercises not visible