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

Plagiarism checks: Fix scrolling issue on side-by-side viewer for modeling #9748

Merged
merged 7 commits into from
Nov 16, 2024

Conversation

AjayvirS
Copy link
Contributor

@AjayvirS AjayvirS commented Nov 11, 2024

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 principle of data economy for all client-server REST calls.
  • 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 integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

Scroll-down action the modelling exercises in the comparison of plagiarism checks does not seem to be working properly
(Fixes #5402 )

(Note: Bigger generated SVG seem to be cut even with the scrolling enabled and should be looked at in a future issue.)

Description

By allowing y overflow through styling, scrolling is enabled.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Student submissions with sufficient enough graph sizes
  • 1 modelling exercise
  1. Log in to Artemis
  2. Navigate to Plagiarism Detection
  3. Attempt to scroll in both views.

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.

x





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

Demo_Scrolling

Summary by CodeRabbit

  • New Features

    • Enhanced styling for the read-only diagram section with improved scrolling capabilities.
    • Introduced a new class for better scrollbar appearance and handling in various browsers.
    • Added conditional styling for full-screen mode to improve user experience.
  • Bug Fixes

    • Maintained existing functionality for help buttons and resizing options without any issues.
    • Improved robustness in the editing functionality by updating the method for locating the "Edit" link.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 11, 2024
@HawKhiem HawKhiem temporarily deployed to artemis-test3.artemis.cit.tum.de November 12, 2024 17:07 — with GitHub Actions Inactive
HawKhiem
HawKhiem previously approved these changes Nov 12, 2024
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!

vinceclifford
vinceclifford previously approved these changes Nov 13, 2024
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.

Works as expected. Tested on TS5

@AjayvirS AjayvirS marked this pull request as ready for review November 14, 2024 15:02
@AjayvirS AjayvirS requested a review from a team as a code owner November 14, 2024 15:02
Copy link

coderabbitai bot commented Nov 14, 2024

Walkthrough

The pull request introduces modifications to the modeling-editor.component HTML and SCSS files. It adds a scroll-container class to enhance the styling of the read-only diagram section, enabling both horizontal and vertical scrolling. The CSS updates include changing the overflow property of the .readonly-diagram class to allow scrolling. The existing functionality, including conditional rendering and resizing options, remains unchanged.

Changes

File Path Change Summary
src/main/webapp/app/exercises/modeling/shared/modeling-editor.component.html Added scroll-container class to <div> for read-only diagram styling and conditional full-screen-margin.
src/main/webapp/app/exercises/modeling/shared/modeling-editor.component.scss Updated .readonly-diagram to overflow-x: auto; overflow-y: auto;, added .scroll-container and .full-screen-margin classes.

Assessment against linked issues

Objective Addressed Explanation
Enable scroll-down functionality in the comparison of modeling exercises (#5402)

Possibly related PRs

  • General: Make exercise view scrollable #8688: The changes in this PR involve making the exercise view scrollable, which relates to the modifications in the HTML and CSS of the modeling-editor.component that enhance the layout and scrolling behavior of the read-only diagram section.
  • Exam mode: Remove exercise title from solution containers  #9442: This PR modifies the display of exercise titles in solution containers during exams, which is relevant to the changes made in the modeling-editor.component as both involve adjustments to the UI presentation in the context of exercises.
  • General: Elevate toggle sidebar button #9411: The enhancements to the sidebar toggle button visibility and functionality in this PR relate to the overall user interface improvements, which align with the changes made to the modeling-editor.component for better user experience.
  • General: Animate content sidebar on toggle #9412: The addition of animations to the sidebar toggle in this PR complements the UI changes made in the modeling-editor.component, focusing on improving the user interface interactions.
  • Development: Migrate the git diff report module to standalone components #9443: The migration of the git diff report module to standalone components reflects a broader effort to modernize the UI components, similar to the updates made in the modeling-editor.component for improved functionality and responsiveness.

Suggested labels

tests, bugfix, small, user interface

Suggested reviewers

  • edkaya
  • pzdr7
  • Jan-Thurner
  • rabeatwork
  • coolchock

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 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: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d266ee6 and cfdb328.

📒 Files selected for processing (2)
  • src/main/webapp/app/exercises/modeling/shared/modeling-editor.component.html (1 hunks)
  • src/main/webapp/app/exercises/modeling/shared/modeling-editor.component.scss (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/webapp/app/exercises/modeling/shared/modeling-editor.component.html

…component.scss

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@AjayvirS AjayvirS dismissed stale reviews from vinceclifford and HawKhiem via 6590f0a November 14, 2024 15:52
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@az108 az108 left a comment

Choose a reason for hiding this comment

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

code looks mostly fine to me, just this little question

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 14, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 14, 2024
az108
az108 previously approved these changes Nov 14, 2024
Copy link
Contributor

@az108 az108 left a comment

Choose a reason for hiding this comment

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

Code LGTM 👍

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

🧹 Outside diff range and nitpick comments (1)
src/test/playwright/support/pageobjects/exam/ExamExerciseGroupsPage.ts (1)

25-28: Great improvement in selector robustness!

The change from text-based to role-based selector (getByRole('link', { name: 'Edit' })) is a significant improvement because:

  • It's more resilient to UI changes
  • It follows accessibility best practices
  • It handles internationalization better than direct text matching

Consider adding a constant for the selector name to improve maintainability:

+ private readonly EDIT_LINK_NAME = 'Edit';

  async clickEditGroupForTestExam() {
-   await this.page.getByRole('link', { name: 'Edit' }).click();
+   await this.page.getByRole('link', { name: this.EDIT_LINK_NAME }).click();
  }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 633662b and 52f3bc4.

📒 Files selected for processing (1)
  • src/test/playwright/support/pageobjects/exam/ExamExerciseGroupsPage.ts (1 hunks)

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 worked as described.

@krusche krusche changed the title Usability: Fix scrolling issue on side-by-side viewer Plagiarism checks: Fix scrolling issue on side-by-side viewer Nov 16, 2024
@krusche krusche added this to the 7.7.1 milestone Nov 16, 2024
@krusche krusche changed the title Plagiarism checks: Fix scrolling issue on side-by-side viewer Plagiarism checks: Fix scrolling issue on side-by-side viewer for modeling Nov 16, 2024
@krusche krusche merged commit f05b0a5 into develop Nov 16, 2024
37 of 41 checks passed
@krusche krusche deleted the bugfix/general/5402-scrolldown-plagiarism-editor branch November 16, 2024 09:22
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!) playwright ready for review tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Plagiarism checks: Scroll-down in the comparison of modelling exercises is working in some cases and other no.
8 participants