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

General: Add hover effect for sidebar-card-medium #9663

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

Conversation

laxerhd
Copy link

@laxerhd laxerhd commented Nov 3, 2024

Checklist

General

Client

  • 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

There were issues regarding consistency. Most elements have a hover effect, this is not the case with the sidecard-card-medium. It did not feel right to hover over these elements. Fixes #9651.

Description

I added a CSS class for the hover effect of the sidebar-card-medium (which is used for exercises) and added it to the classes in the html file.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Programming Exercise
  1. Log in to Artemis
  2. Navigate to the Course
  3. Hover over the Programming Exercise
  4. You should see the hover effect (change color)

Exam Mode Testing

I'm not sure if the tests are that different than the tests from above. In sidebar-card-medium.component.html there is a mention of the Exam Mode. I'm not sure whether this needs to be tested more thoroughly.

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

Screenshots

sidebar-card-hover-effect.mp4

Summary by CodeRabbit

  • New Features
    • Introduced a hover effect for sidebar cards, enhancing visual feedback when users interact with them.
  • Style
    • Added a new CSS class .hover-effect to improve the user experience with a background color change on hover.

@laxerhd laxerhd requested a review from a team as a code owner November 3, 2024 21:46
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 3, 2024
Copy link

coderabbitai bot commented Nov 3, 2024

Walkthrough

The changes in this pull request involve updates to the sidebar-card-medium component in both HTML and SCSS files. Specifically, the HTML modifications add a hover-effect class to two <div> elements based on the sidebarType condition. The SCSS file introduces the definition for the new .hover-effect class, which alters the background color on hover. These updates aim to provide a visual indication when interacting with the sidebar elements.

Changes

File Change Summary
src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.html Added hover-effect class to <div> elements based on sidebarType condition.
src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.scss Introduced new .hover-effect class that modifies background color on hover.

Assessment against linked issues

Objective Addressed Explanation
Visual indication on hover for test-sidebar-card-medium (Issue #9651)

Possibly related PRs

Suggested labels

enhancement, client, ready for review, component:Communication

Suggested reviewers

  • krusche
  • rabeatwork
  • az108
  • JohannesStoehr

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

🧹 Outside diff range and nitpick comments (1)
src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.scss (1)

9-13: Consider enhancing the hover effect for better UX.

The hover effect could be improved by adding a smooth transition and cursor pointer for better user interaction.

 .hover-effect {
+    cursor: pointer;
+    transition: background-color 0.2s ease;
     &:hover {
         background-color: var(--hover-slightly-darker-body-bg);
     }
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d567cf4 and fd92a89.

📒 Files selected for processing (2)
  • src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.html (2 hunks)
  • src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.scss (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.html
🔇 Additional comments (1)
src/main/webapp/app/shared/sidebar/sidebar-card-medium/sidebar-card-medium.component.scss (1)

9-13: LGTM! Clean implementation of hover effect.

The hover effect implementation is clean, follows the existing styling patterns, and properly uses theme variables for consistent appearance across different themes.

Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 15, 2024
@laxerhd
Copy link
Author

laxerhd commented Nov 15, 2024

Could someone please review this PR.
I would be very grateful.

@github-actions github-actions bot removed the stale label Nov 16, 2024
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!)
Projects
Status: Work In Progress
Development

Successfully merging this pull request may close these issues.

Missing hover effect for test-sidebar-card-medium and others in Tab Exercises
2 participants