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

Development: Fix modeling assessment for e2e tests #10298

Closed
wants to merge 4 commits into from

Conversation

Anishyou
Copy link
Contributor

@Anishyou Anishyou commented Feb 8, 2025

Checklist

General

Client

  • 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.
  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Description

Reverting changes done in PR: #10145 as 4 of the e2e tests were not passing

Steps for Testing

Run develop branch for e2e tests.(https://bamboo.ase.in.tum.de/browse/ARTEMIS-AEPTMA)
Run this branch for e2e tests

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

Summary by CodeRabbit

  • Refactor
    • Streamlined the UI layout by reorganizing conditional display elements for improved clarity and control.
  • Style
    • Enhanced responsiveness, scrolling, and print support with updated layout and sizing adjustments for a smoother, more consistent user experience.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Feb 8, 2025
@Anishyou Anishyou changed the title Development:Fixing Modeling Exercise for e2e tests Development: Fixing Modeling Assesment for e2e tests Feb 8, 2025
@Anishyou Anishyou marked this pull request as ready for review February 9, 2025 21:18
@Anishyou Anishyou requested a review from a team as a code owner February 9, 2025 21:18
@Anishyou Anishyou requested a review from coolchock February 9, 2025 21:19
Copy link

coderabbitai bot commented Feb 9, 2025

Walkthrough

The pull request revises the modeling assessment component by restructuring its HTML and updating its CSS. In the HTML template, an unnecessary outer container is removed and the conditional rendering order is modified while preserving existing checks for title, display points, draggable options, and explanation editing. The SCSS file sees several style adjustments, including removal of the parent-container class and updates to layout properties, flex settings, and responsiveness for key component elements.

Changes

File(s) Change Summary
src/…/modeling-assessment.component.html Removed outer .parent-container div; reorganized conditional rendering blocks; removed feedback section; adjusted order of draggable resize options and maintained explanation check.
src/…/modeling-assessment.component.scss Removed .parent-container class; updated styles for .modeling-assessment, .resizable, .card-header, .apollon-container, and .apollon-row to enhance layout and responsiveness.

Sequence Diagram(s)

sequenceDiagram
    participant C as Component
    participant T as Title
    participant P as Points
    participant D as Draggable Options
    participant E as Explanation Editor

    C->>T: Check if title exists
    alt Title exists
      T-->>C: Render title
    end
    C->>P: Check if displayPoints enabled
    alt displayPoints true
      P-->>C: Render points
    end
    C->>D: Render horizontal resize option
    D-->>C: Horizontal option rendered
    C->>D: Render vertical resize option
    D-->>C: Vertical option rendered
    C->>E: Check if explanation provided
    alt Explanation provided
      E-->>C: Render explanation editor
    end
Loading

Suggested labels

tests, bugfix, ready for review, playwright

Suggested reviewers

  • LeonWehrhahn
  • maximiliansoelch
  • ItsaaaMeMario
  • krusche

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 (2)
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.scss (2)

19-21: Redundant Variable Declaration in .resizable Block
Within the .resizable block, the variable $draggable-width is re-declared with the same value as the global declaration. If this local override is not intended for specialized nested usage, consider removing it to avoid confusion. If there is a specific purpose, adding a clarifying comment would help future maintainers.


33-41: Print Media Query Adjustments
The media query block effectively adapts the .modeling-assessment container for print, setting height: auto and a max-height of 100vh with !important overrides. Although the use of !important is acceptable in this context, please double-check that these overrides do not conflict with other print styles.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 67a5a03 and 72d705a.

📒 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 (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`src/main/webapp/**/*.html`: @if and @for are new and valid ...

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/app/exercises/modeling/assess/modeling-assessment.component.html
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (7)
src/main/webapp/app/exercises/modeling/assess/modeling-assessment.component.scss (3)

3-17: Flex and Header Style Enhancements in .modeling-assessment
The updated .modeling-assessment class now explicitly uses a relative position and flex display with a column layout. The nested .card-header block’s styling (justify-content, width, font-size, and font-weight) appears well-aligned with typical UI header expectations. Please verify that these values match the client’s design standards.


23-26: Consistent Sizing Applied to .apollon-container
The updates in the .apollon-container block, enforcing both height and width of 100%, ensure that the container takes full available space. This approach is clean and consistent with typical layout practices.


28-31: Updated .apollon-row Flex Settings
The .apollon-row block now explicitly sets the height to 100% while maintaining a flex layout, which should provide a consistent behavior across various viewports.

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

1-12: Simplified Container and Header Rendering
The outer container has been streamlined by directly using the "modeling-assessment" class (with conditional "resizable" binding), and the removal of the unnecessary outer "parent-container" div simplifies the DOM structure. The conditional rendering for title and displayPoints within the header is clear and uses the new Angular @if syntax, which matches the updated coding guidelines.


13-20: Apollon Row and Horizontal Resize Block
The restructuring of the .apollon-row section—with the embedded editor container and conditional horizontal resize control (displaying a draggable handle via the faGripLinesVertical icon)—improves readability and aligns with the new layout. Please ensure that the new conditional blocks (using @if) are correctly processed by the Angular compiler.


21-25: Vertical Resize Control Rendering
The conditional rendering for the vertical resize option is concise and mirrors the horizontal case appropriately. The structure and component placement here look solid.


26-28: Conditional Explanation Editor Integration
The inclusion of the jhi-modeling-explanation-editor component, based on the presence of the explanation variable, cleanly maintains functionality in a less nested layout. This change ensures that the explanation editor is rendered appropriately under the new structure.

@krusche krusche changed the title Development: Fixing Modeling Assesment for e2e tests Development: Fix modeling assessment for e2e tests Feb 9, 2025
@krusche
Copy link
Member

krusche commented Feb 9, 2025

I reverted the original commit directly on develop for now. Please open a separate PR to fix the original issue

@Anishyou
Copy link
Contributor Author

Anishyou commented Feb 9, 2025

I reverted the original commit directly on develop for now. Please open a separate PR to fix the original issue

ok thank you

@Anishyou Anishyou closed this Feb 9, 2025
@Anishyou Anishyou deleted the chore/fix-modeling-exercise-e2e-tests branch February 9, 2025 22:20
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.

2 participants